|
1 | | -# zed-ros2-interfaces |
2 | | -ROS2 interfaces for the ZED ROS2 Wrapper |
| 1 | + |
| 2 | + |
| 3 | +# Stereolabs ZED Camera - ROS2 Interfaces |
| 4 | + |
| 5 | +The `zed-ros2-interfaces` repository install the `zed_interfaces` ROS2 package which defines the custom topics, services and actions used by the [ZED ROS2 Wrapper](https://github.com/stereolabs/zed-ros2-wrapper) to interface with ROS2. |
| 6 | + |
| 7 | +If you already installed the [ZED ROS2 Wrapper](https://github.com/stereolabs/zed-ros2-wrapper) or you plan to install it on this machine, this package is not required because it is automatically integrated by `zed-ros2-wrapper` as a git submodule to satisfy all the required dependencies. |
| 8 | + |
| 9 | +You must instead install this package on a remote system that must retrieve the topics sent by the ZED Wrapper (e.g. the list of detected objects obtained with the Object Detection module) or call services and actions to control the status of the ZED Wrapper. |
| 10 | + |
| 11 | +**Note:** this package does not require CUDA, hence it can be used to receive the ZED data also on machines not equipped with an Nvidia GPU. |
| 12 | + |
| 13 | +### Prerequisites |
| 14 | + |
| 15 | +- Ubuntu 20.04 |
| 16 | +- [ROS2 Foxy](https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html) |
| 17 | + |
| 18 | +### Build the repository |
| 19 | + |
| 20 | +The `zed_interfaces` is a colcon package. It depends on the following ROS packages: |
| 21 | + |
| 22 | +- ament_cmake |
| 23 | +- builtin_interfaces |
| 24 | +- std_msgs |
| 25 | +- geometry_msgs |
| 26 | +- rosidl_default_generators |
| 27 | +- rosidl_default_runtime |
| 28 | +- rosidl_interface_packages |
| 29 | + |
| 30 | +Open a terminal, clone the repository, update the dependencies and build the packages: |
| 31 | + |
| 32 | +``` |
| 33 | + $ cd ~/catkin_ws/src |
| 34 | + $ git clone https://github.com/stereolabs/zed-ros2-interfaces.git |
| 35 | + $ cd ../ |
| 36 | + $ rosdep install --from-paths src --ignore-src -r -y |
| 37 | + $ colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release |
| 38 | + $ echo source $(pwd)/install/local_setup.bash >> ~/.bashrc |
| 39 | + $ source ~/.bashrc |
| 40 | +``` |
| 41 | + |
| 42 | +*Note*: If rosdep is missing you can install it with: |
| 43 | + |
| 44 | +`$ sudo apt-get install python-rosdep python-rosinstall-generator python-vcstool python-rosinstall build-essential` |
| 45 | + |
| 46 | +'Note': The option '--symlink-install' is very important, it allows to use symlinks instead of copying files to the ROS2 folders during the installation, where possible. Each package in ROS2 must be installed and all the files used by the nodes must be copied into the installation folders. Using symlinks allows you to modify them in your workspace, reflecting the modification during the next executions without the needing to issue a new colcon build command. This is true only for all the files that don't need to be compiled (Python scripts, configurations, etc.). |
| 47 | + |
| 48 | +*Note*: If you are using a different console interface like zsh, you have to change the `source` command as follows: `echo source $(pwd)/install/local_setup.zsh >> ~/.zshrc and source ~/.zshrc`. |
| 49 | + |
| 50 | +## Custom Topics |
| 51 | + |
| 52 | + - BoundingBox2Df |
| 53 | + - BoundingBox2Di |
| 54 | + - BoundingBox3D |
| 55 | + - Keypoint2Df |
| 56 | + - Keypoint2Di |
| 57 | + - Keypoint3D |
| 58 | + - Object |
| 59 | + - ObjectsStamped |
| 60 | + - Skeleton2D |
| 61 | + - Skeleton3D |
| 62 | + |
| 63 | +You can get more information reading the [Stereolabs online documentation](https://www.stereolabs.com/docs/ros2/zed-node/) |
| 64 | + |
| 65 | +## Custom Services |
| 66 | + |
| 67 | + - SetPose |
| 68 | + - StartSvoRec |
| 69 | + |
| 70 | +You can get more information reading the [Stereolabs online documentation](https://www.stereolabs.com/docs/ros2/zed-node/#services) |
0 commit comments