This ROS2 package is heavily derived from ros2-vicon-receiver but is now working on Ubuntu 22.04 and ROS2 Humble.
This package integrates Vicon motion capture data using the Vicon DataStream SDK.
Make sure you have ROS2 installed on your system. This package is tested on Ubuntu 22.04 and ROS2 Humble. You can follow the installation guide here.
To install the Vicon DataStream SDK, run the following command:
wget -qO- https://github.com/atarbabgei/miscellaneous/raw/main/mocap_vicon/scripts/install_vicon_datastream_sdk.sh | sudo bash
Ensure that the necessary dependencies are installed.
sudo apt update
sudo apt install libboost-all-dev python3-colcon-common-extensions cmake
Create a new directory for your ROS2 workspace and navigate into it:
mkdir -p ~/mocap_ros2_ws/src
cd ~/mocap_ros2_ws
Clone the `mocap_msgs` and `mocap_vicon_client` repositories into the `src` directory:
cd src
git clone https://github.com/atarbabgei/mocap_vicon_client.git
Navigate to the root of your workspace and build the packages using `colcon`:
cd ~/mocap_ros2_ws
colcon build --packages-select mocap_vicon_client
Before running the nodes, make sure to source your ROS2 workspace:
source ~/mocap_ros2_ws/install/setup.bash
You can launch the node using the provided launch file. The parameters such as server address, buffer size, and namespace can be set from the command line.
Here's an example command to launch the node with the Vicon server at a specific IP (e.g. 192.168.0.100):
ros2 launch mocap_vicon_client client.launch.py server:=192.168.0.100
Special thanks to the contributors and maintainers of the Vicon DataStream SDK and the following projects: