Skip to content

OPT4SMART/ros2-vicon-receiver

Repository files navigation

Vicon receiver for ROS 2 GitHub tag (latest by date)

ros2-vicon-receiver is a ROS 2 package, written in C++, that retrieves data from Vicon software and publishes it on ROS 2 topics. The code is partly derived from a mixture of Vicon-ROS2 and Vicon bridge.

This is NOT an official ROS 2 package and is not supported. The package has been successfully tested with ROS 2 Dashing Diademata, ROS 2 Foxy, ROS 2 Galactic and ROS 2 Humble on the operating systems Ubuntu 18.04 Bionic Beaver, Ubuntu 20.04 Focal Fossa and MacOS 10.13 High Sierra.

Requirements

Installation of dependencies

If you are using Ubuntu 18.04 Bionic Beaver, you can install all the dependencies by simply cd'ing into the main project folder and then running

$ ./install_ubuntu_bionic.sh

Otherwise, proceed as follows. Make sure you have ROS 2 installed (follow the instructions at the ROS 2 website).

Then, install Colcon and CMake :

$ sudo apt install -y python3-colcon-common-extensions cmake

Installation of Datastream SDK and other libraries

The Datastream SDK libraries are required to be installed in the system. You can find them on the official website.

This package is shipped with Datastream SDK 10.1 (the latest version at the time of writing). If you are running Linux x64 and you want to install this version, simply cd into the main project folder and issue the command

$ ./install_libs.sh

Quick start

Building the package

⚠️ Do not forget to source the ROS 2 workspace: source /opt/ros/dashing/setup.bash

Enter the project folder and build the executable

$ cd vicon_receiver
$ colcon build --symlink-install

Running the program

Open a new terminal and source the project workspace:

$ source vicon_receiver/install/setup.bash

To run the program, use the launch file template provided in the package. First, open the file and edit the parameters. Running colcon build is not needed because of the --symlink-install option previously used.

Now you can the program with

$ ros2 launch vicon_receiver client.launch.py

Exit the program with CTRL+C.

Information on ROS 2 topics and messages

The ros2-vicon-receiver package creates a topic for each segment in each subject with the pattern namespace/subject_name/segment_name. Information is published on the topics as soon as new data is available from the vicon client (typically at the vicon client frequency). The message type Position is used.

Example: suppose your namespace is the default vicon and you have two subjects (subject_1 and subject_2) with two segments each (segment_1 and segment_2). Then ros2-vicon-receiver will publish Position messages on the following topics:

vicon/subject_1/segment_1
vicon/subject_1/segment_2
vicon/subject_2/segment_1
vicon/subject_2/segment_2

Constributors

ros2-vicon-receiver is developed by Andrea Camisa, Andrea Testa and Giuseppe Notarstefano

Acknowledgements

This result is part of a project that has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 638992 - OPT4SMART).

About

Vicon Receiver for ROS2

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages