natnet_ros_cpp
ROS driver for the NatNet 4.0 protocol used for the OptiTrack motion capture system and Motive application
Science Score: 52.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
✓Institutional organization owner
Organization l2s-lab has institutional domain (l2s.centralesupelec.fr) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Keywords
Repository
ROS driver for the NatNet 4.0 protocol used for the OptiTrack motion capture system and Motive application
Basic Info
Statistics
- Stars: 35
- Watchers: 3
- Forks: 22
- Open Issues: 2
- Releases: 3
Topics
Metadata Files
README.md
NatNet 4 ROS driver
if you are using software for any publication or article, we would be delighted if you could cite it from here.
NOTE: This is not maintained a lot. For ROS 2 version visit here. Which is continuation of this work.
Introduction
This package contains a ROS driver for the NatNet protocol used by the OptiTrack motion capture system. It supports NatNet versions 4.0 (Motive 2.2 and higher). The NatNet SDK provided by the optitrack can be found here. It will be downloaded under deps/NatnetSDK while building it for the first time. NatNet protocol is used for streaming live motion capture data (rigid bodies, skeletons etc) across the shared network.
This package is only tested with the Natnet 4.0 and ROS noetic but probably will work with the older versions of both as well.
Current Features:
- Stable and with more functionality than mocap_optitrack
- Rigid bodies are published as
geometry_msgs/PoseStampedunder name given in the Motive, i.e/natnet_ros/<body-name>/pose. Plus those are also broadcasting astfframe for rviz - Markers of the rigid bodies are published ad
geometry_msgs/PointStampedunuder the name/natnet_ros/<body-name>/marker#/pose - Unlabeled markers with the initial position and the name mentione in the
/config/initiate.yamlare published asgeometry_msgs/PoseStampedunuder the name/natnet_ros/<name-in-config-file>/pose. Plus those are also broadcasting astfframe for rviz. The marker position is updated based on Iterative closest point (nearest neighbour) - Unlabled markers can be also published as
sensor_msgs/PointCloud - Different options for publishing and logging the data
Work under progress:
- Include Skeleton and other devices in the system to make it package as whole.
- Considering position and orientation for similar marker configurations (at least 3 markers)
- Considering compensation of time delay (~5-6ms) to the ROS time stamp.
- Adding an option for the axis orientation (Z UP or Y UP)
- Creating package for ROS2.
How to use it
Building the package
requirements
sudo apt install -y ros-$ROS_DISTRO-tf2* wget
Keep your system connected to the internet while building the package for the first time.
cd ~/catkin_ws/src
git clone https://github.com/L2S-lab/natnet_ros_cpp
cd ..
catkin build #OR catkin_make
. devel/setup.bash
Setup the Motive for this package
- Disable the firewall for the network on which the data is being published.
- Open the Motive app.
- In the motive app, open the streaming panel.
- Disable the other streaming Engines like VRPN, Trackd etc.
- Under the OptiTrack Streaming Engine, turn on the Broadcast Frame.
- Select the correct IP address in the Local Interface.
- Select the Up Axis as Z.
Here is an example of how your streaming settings should look.

Easy way
Using GUI tool
Here, you can use simple tool and follow the instruction from the output area on the right bottom corner.
roslaunch natnet_ros_cpp gui_natnet_ros.launch

Difficult way
Using Non gui approach
roslaunch natnet_ros_cpp natnet_ros.launch
Understanding the launch file
Launch file natnet_ros.launch contains the several configurable arguments. The details are mentioned in the launch file. Following are several important argument for the connection and the data transfer. Other connection arguments are for the advanced option.
serverIP: The IP address of the host PC. (The one selected in the Local Interface in Motive app)clientIP: The IP address of the PC on which the file will be launchedserverType: Two possible options,multicastandunicast
Publishing the single marker
It is possible to track the single marker as a rigid body with constant orientation. Go to the config/initiate.yaml It is suggested to make a copy of the file and rename the new file.
The file contains the details on what to modify.
The question might arise on how to check the position of the single marker. For that, you can log the frames of the incoming data in the terminal. To do so, enable the log_frames in the launch file.
After configuring the initiate.yaml, in the launch file, enable the pub_individual_marker. Change the name of the config file in the argument conf_file if needed and launch the file.
Replacing existing package
You can easily replace the current package with this package. In the natnet_ros.launch change the name of node to the node you currently using. For an example,
If you are using the vrpn_client_node
changes are following
<node pkg="natnet_ros_cpp" type="natnet_ros_cpp" name="vrpn_client_node" output="screen" >
Citation
If you use this software, please consider citing it from here
Owner
- Name: L2S
- Login: L2S-lab
- Kind: organization
- Location: Gif sur Yvette
- Website: https://l2s.centralesupelec.fr/
- Repositories: 1
- Profile: https://github.com/L2S-lab
Laboratoire des signaux et systèmes
Citation (CITATION.cff)
cff-version: 1.2.0
message: 'If you use this software, please cite it as below.'
title: Seamless integration of Optitrack motion capture with ROS
type: software
conference: "Conférence annuelle des développeurs et utilisateurs ROS (ROSCon Fr 2022), Toulouse, June 23, 2022"
license: GNU General Public License v3.0
url: https://github.com/L2S-lab/natnet_ros_cpp
date-released: 2022-06-23
version: v1.1.0
authors:
- given-names: Aarsh
family-names: THAKKER
email: aarsh.thakker@l2s.centralesupelec.fr
GitHub Events
Total
- Watch event: 6
- Push event: 275
- Fork event: 4
Last Year
- Watch event: 6
- Push event: 275
- Fork event: 4
Dependencies
- actions/checkout v3 composite
- ros-tooling/action-ros-ci 0.2.6 composite
- ros-tooling/setup-ros 0.3.4 composite
- jgehrcke/github-repo-stats RELEASE composite