This project provides support for ROS2 integration with Vicon cameras (MOCAP systems based on vision) as part of the project MOCAP4ROS2.
Vicon drivers for ROS2 are based on Vicon DataStream SDK 1.11.0. When compiling the mocap_vicon_driver
, SDK is downloaded and installed, requiring packages wget
and p7zip-full
for this.
Also, our package depends on other two repositories from MOCAP4ROS2 Project:
A rosinstall file is provided to automatically manage them.
The following commands cover all the necessary steps to install DataStream SDK, dependencies and Vicon driver:
## dependencies
sudo apt-get install wget git p7zip-full
## create workspace
mkdir -p ~/mocap_ws/src
cd ~/mocap_ws/src
## clone vicon repository
git clone https://github.com/MOCAP4ROS2-Project/mocap4ros2_vicon.git -b master
## clone necessary mocap repositories
cp mocap4ros2_vicon/mocap4ros2.rosinstall .rosinstall
wstool update
## For ROS Galactic or Foxy only, copy Humble's tf2_geometry_msgs.hpp replacing tf2_geometry_msgs.h
sudo cp tf2_geometry_msgs.hpp.copy /opt/ros/galactic/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp
## manage ros2 dependencies for our workspace
# rosdep init may not be needed
sudo rosdep init
rosdep update
rosdep install --from-paths . --ignore-packages-from-source --rosdistro humble -y
## build all
cd ~/mocap_ws/
colcon build --symlink-install --packages-up-to mocap_vicon_driver
Check config/mocap_vicon_driver_params.yaml
for the available parameters. Note that host_name
should be the IP address and port of the machine running VICON tracker.
After sourcing the workspace, the Vicon driver can be started using the provided launcher:
ros2 launch mocap_vicon_driver mocap_vicon_driver_launch.py
Remember that the vicon driver is a lifecycle node, so it needs to be signaled to start:
ros2 lifecycle set /mocap_vicon_driver_node activate
The project MOCAP4ROS2 is funded as a Focused Technical Project by ROSIN. Visit mocap4ros2-project github.io for additional info and documentation.
Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components.
More information: rosin-project.eu
This project has received funding from the European Union’s Horizon 2020
research and innovation programme under grant agreement no. 732287.