Skip to content

Driver for ros2_control for communication with NDI measurement systems

License

Notifications You must be signed in to change notification settings

ICube-Robotics/ndisys_ros2

Repository files navigation

ndisys_ros2

Licence CI

This stack includes drivers for ros2_control for communication with NDI measurement systems.

Compatible devices

The driver is compatible with the following NDI measurement systems:

  • Polaris
  • Aurora

Installation

Required setup : Ubuntu 22.04 LTS

  1. Install ros2 packages. The current development is based of ros2 humble. Installation steps are described here.

  2. 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.

  3. Install colcon and its extensions :

    sudo apt install python3-colcon-common-extensions
  4. 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
  5. Compile and source the workspace by using:

    colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --symlink-install
    source install/setup.bash

Running the driver

  • 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 in sensor_names and IDs in sensor_ids. Also, edit the world_frame and state_publish_rate parameters to match your application.

    One constraint: Make sure to match sensor_names[] content with the names you chose earlier in the polaris.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 sourcing ndisys_ros2 and ROS2. See this link for a guide to do

Contacts

icube

ICube Laboratory, University of Strasbourg, France

Maciej Bednarczyk: m.bednarczyk@unistra.fr, @github: mcbed

Adnan SAOOD: asaood@unistra.fr, @github: adnan-saood