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
ros2
packages. The current development is based ofros2 humble
. Installation steps are described here. -
Source your
ros2
environment:source /opt/ros/humble/setup.bash
NOTE: 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
~/.bashrc
file. -
Install
colcon
and 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.xacro
file using the following macro. All the mentioned.rom
files 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.yaml
file by adding their names insensor_names
and IDs insensor_ids
. Also, edit theworld_frame
andstate_publish_rate
parameters to match your application.One constraint: Make sure to match
sensor_names[]
content with the names you chose earlier in thepolaris.ros2_control.xacro
file. 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_broadcaster
in a new terminal after sourcingndisys_ros2
and ROS2. See this link for a guide to do
ICube Laboratory, University of Strasbourg, France
Maciej Bednarczyk: [email protected], @github: mcbed
Adnan SAOOD: [email protected], @github: adnan-saood