Skip to content

Latest commit

 

History

History
110 lines (68 loc) · 4.28 KB

README.md

File metadata and controls

110 lines (68 loc) · 4.28 KB

mocap4ros2_optitrack

Build Status

This repository contains the drivers to run the mocap4ros2_project with optitrack.

To use and compile this project is obligatory to download first the mocap_msgs repository in your workspace and follow the next instructions:

OptiTrack NatNet SDK

Get the official binaries released in the official download page here.

You can check the documentation here.

Installing on Linux

Copy all the libraries to /usr/local/lib and move the headers to /usr/local/include/optitrack/.

sudo mkdir /usr/local/include/optitrack
sudo mv {YOUR_NatNetSDK}/include/* /usr/local/include/optitrack/ 
sudo mv {YOUR_NatNetSDK}/lib/* /usr/local/lib/

Update the LD_LIBRARY_PATH environment variable:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/

It's convenient to automatically update this environment variable in your bash session every time a new shell is launched, so type it into your .bashrc file:

echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/"

Installing on Windows

Execute the installer of your distribution (typically Win64).

SDK files are placed to C:\Program Files\? by default, so update the PATH environment variable with this SDK path:

set PATH=%PATH%;C:\Program Files\?

Guide

  • Connect your computer/laptop to the same network as OptiTrack system is connected.

  • Run Nexus (Vicon software) and calibrate cameras (if required).

  • Edit some parameters on configuration file (mocap4ros2_drivers/vicon2_driver/config/vicon2_driver_params.yaml).
    e.g. host_name parameter.

  • Launch the Vicon-ROS2 driver launcher: ros2 launch vicon2_driver vicon2.launch.py

  • Check new topics where Vicon info is received in custom message format and TFs format.

    • This driver has one publisher that publish the markers and other TransformBroadcaster that publish the TFs.
  • The vicon driver_node works to the frequency established by Vicon System.

  • The vicon2_driver is a lifecycle node that has this differents states, to know the different states you can run the next command in a terminal:

        ` 
        ros2 lifecycle list vicon2_driver_node
             - cleanup [2]
                  Start: inactive
                  Goal: cleaningup
             - activate [3]
                  Start: inactive
                  Goal: activating
             - shutdown [6]
                  Start: inactive
                  Goal: shuttingdown 
        ` 
    
  • If you want to start the vicon2_driver you have to run in other terminal:

    ros2 lifecycle set vicon2_driver_node activate

  • If you want to stop the vicon2_driver you have to run in other terminal:

    ros2 lifecycle set vicon2_driver_node shutdown

  • Is important to do the "source" of the ROS2-Foxy workspace and the Vicon_ws before run one of this commands:

    call local_setup.bat (Windows)

MOCAP4ROS2

This project provides support for ROS2 integration with OptiTrack cameras (MOCAP systems based on vision) and Technaid TechMCS IMUs (MOCAP systems based on motion sensors).

The project MOCAP4ROS2 is funded as a Focused Technical Project by ROSIN.

rosin_logo

Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components.
More information: rosin-project.eu

eu_flag

This project has received funding from the European Union’s Horizon 2020
research and innovation programme under grant agreement no. 732287.


mocap4ros_arch