Client node to publish data generated by Vicon Tracker on a ROS2 network.
vicon_tracker_ros is a ROS2 package, written in C++, that receives data from Vicon Tracker software, using Datastream SDK, and publishes it on ROS2 topics. The package has been designed for using Vicon motion tracking as an ideal localization device to control ground and aerial drones.
This is NOT an official ROS2 package and is not supported. The package has been successfully tested with ROS2 Humble on the operating system Ubuntu 22.04 Jammy.
In order to use vicon_tracker_ros Datastream SDK libraries must be installed in the system. You can find them on the official website.
This package is shipped with some script files, included in the vicon_sdk folder, that allows to easily install/uninstall the required Datastream SDK libraries. To use the scripts, enter the vicon_sdk folder and
$ ./sdk_libs_x.xx.sh -i name_of_sdk_file.zip
to install the libraries, or
$ ./sdk_libs_x.xx.sh -u
to uninstall the libraries (where x.xx is the version of the SDK you would like to install/uninstall).
source /opt/ros/humble/setup.bash
Enter the project folder and build the executable
$ cd vicon_tracker_ros
$ colcon build --symlink-install
Open a new terminal and source the project workspace:
$ source vicon_tracker_ros/install/setup.bash
To run the program use one of the two available launch files
$ ros2 launch vicon_tracker_ros vicon_tracker_client.py
to run the client, or
$ ros2 launch vicon_tracker_ros vicon_tracker_rviz.py
to run the client and rviz that shows TF data received by the client.
A yaml file is provided to configure the client. This file should be used to specify:
- server_address: the IP address of the server running Vicon Tracker
- a list of objects (corresponding to the ones defined in Tracker), each one open by the tag object-x, where x is the progressive number associated to the object, and followed by 5 nested parameters
- object_name: the name of the object as it has been called in Tracker
- pose_topic: the name of the topic to publish 3D pose data
- pose2d_topic: the name of the topic to publish 2D pose data
- child_frame_id: the name of the child frame to publish TF data
- parent_frame_id: the name of the parent frame to publish TF data