This stack includes drivers for ros2_control for communication with NDI measurement systems.
The driver is compatible with the following NDI measurement systems:
- Polaris
- Aurora
Required setup : Ubuntu 22.04 LTS
-
Install
ros2packages. The current development is based ofros2 humble. Installation steps are described here. -
Source your
ros2environment:source /opt/ros/humble/setup.bashNOTE: The ros2 environment needs to be sources in every used terminal. If only one distribution of ros2 is used, it can be added to the
~/.bashrcfile. -
Install
colconand its extensions :sudo apt install python3-colcon-common-extensions
-
Pull relevant packages, install dependencies by using rosdep:
git clone https://github.com/ICube-Robotics/ndisys_ros2.git src/ndisys_ros2 rosdep install --ignore-src --from-paths . -y -r -
Compile and source the workspace by using:
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install source install/setup.bash
-
Add you markers in the
polaris_description/ros2_control/polaris.ros2_control.xacrofile using the following macro. All the mentioned.romfiles here will be loaded to the NDI device and will be tracked. It is advised to load only the markers you are interested in broadcasting.<xacro:tracker name="marker1" srom="path_to_rom_bin_file1" /> <xacro:tracker name="marker2" srom="path_to_rom_bin_file2" />
-
You can now choose what trackers to publish in the
polaris_bringup/config/polaris_broadcaster.yamlfile by adding their names insensor_namesand IDs insensor_ids. Also, edit theworld_frameandstate_publish_rateparameters to match your application.One constraint: Make sure to match
sensor_names[]content with the names you chose earlier in thepolaris.ros2_control.xacrofile. Preserving order.Example:
rigid_pose_broadcaster: ros__parameters: state_publish_rate: 10 sensor_names: - marker1 - marker2 sensor_ids: - 1998 - 2023 world_frame: polaris_frame
-
After sourcing ros2 and this package in a shell run:
source install/setup.bash ros2 launch polaris_bringup vega.launch.py -
Start and activate the controller
rigid_pose_broadcasterin a new terminal after sourcingndisys_ros2and ROS2. See this link for a guide to do
ICube Laboratory, University of Strasbourg, France
Maciej Bednarczyk: m.bednarczyk@unistra.fr, @github: mcbed
Adnan SAOOD: asaood@unistra.fr, @github: adnan-saood
