|
1 | 1 | # realsense_ROS2_interface
|
2 |
| -This package interfaces the robot/joystick with the realsense ROS2 wrapper |
| 2 | + |
| 3 | +This ROS2 package interfaces robots and/or joysticks with the official Intel RealSense ROS wrapper. |
| 4 | + |
| 5 | +While it's targeting Intel RealSense and Sony Playstation Joystick, the package can be easily modified to work with any USB camera and controller. |
| 6 | + |
| 7 | +For any questions, please contact the author, [Irving Fang](https://irvingf7.github.io/). |
| 8 | + |
| 9 | +This package is heavily influenced and inspired by a [similar ROS1 package](https://github.com/ripl/capture-images) written by [Dr. Takuma Yoneda](https://takuma.yoneda.xyz/) from TTIC. |
| 10 | + |
| 11 | +## Setup |
| 12 | +This package is only tested on `Ubuntu 22.04` and `ROS humble` distribution. |
| 13 | + |
| 14 | +It requires the official [RealSense ROS2 wrapper](https://github.com/IntelRealSense/realsense-ros) and the Intel RealSense SDK. |
| 15 | + |
| 16 | +I expect this package to be easily portable to other Ubuntu versions and ROS 2 distros, since it does not utilize anything specific to `Ubuntu 22.04` and `ROS humble`. |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +After acquiring all the prerequisites, simply put this folder (which contains two ROS2 packages, technically speaking) inside your ROS workspace's `src` folder and run the following command in your ROS workspace. |
| 23 | + |
| 24 | +``` |
| 25 | +colcon build |
| 26 | +``` |
| 27 | + |
| 28 | + |
| 29 | +## Package Breakdown |
| 30 | +I will walk through the package structure briefly here. Feel free to skip over if you are familiar with how a typical ROS2 package works. |
| 31 | + |
| 32 | +This project is actually made of two ROS2 packages: |
| 33 | + |
| 34 | +- `realsense_capture`: contains all the code that actually does the job. |
| 35 | + |
| 36 | +- `realsense_interface_msg`: contains the definition for the service message type that's being used. |
| 37 | + |
| 38 | +It's a conventional ROS practice to dedicate an independent package for message type definitions. |
| 39 | + |
| 40 | +Inside `realsense_capture`: |
| 41 | +- `realsense_image_server.py`: responsible for constantly getting images from the camera, and is ready to serve the image whenever requested, that is, the capture button on the joystick is hit. |
| 42 | + |
| 43 | +- `realsense_image_client.py`: responsible for acquiring the image whenever the capture button on the joystick is hit. |
| 44 | + |
| 45 | + |
| 46 | +## Usage |
| 47 | +To use the package, run |
| 48 | + |
| 49 | +```bash |
| 50 | +ros2 launch realsense_capture realsense_sys_launch.py |
| 51 | +``` |
| 52 | + |
| 53 | +***Note***: The launch file also launches Foxglove, a visualization/monitoring app for ROS2. Get rid of related lines if desired. |
| 54 | + |
| 55 | +There is no need to launch the RealSense ROS wrapper separately, as they are integrated in the launch file. |
| 56 | + |
| 57 | + |
| 58 | +## Contributing |
| 59 | + |
| 60 | +Contributions to this project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository. |
| 61 | + |
| 62 | +## Citation |
| 63 | +If you find this little package helpful, please consider citing it in your paper/work. |
0 commit comments