mje-nz / natnet_ros

NatNet 3 ROS driver
BSD 3-Clause "New" or "Revised" License
19 stars 9 forks source link

NatNet 3 ROS driver

Build Status codecov

This package contains a ROS driver for the NatNet protocol used by the NaturalPoint OptiTrack motion capture system. It supports NatNet versions 3.0 and 3.1 (the versions used by Motive 2.0 and 2.1), which are a bit more efficient than older verions and add more accurate timing. The actual NatNet implementation is in mje-nz/python_natnet, which is included as a submodule and repackaged.

The NatNet protocol is used for streaming live motion capture data (rigid bodies, skeletons etc) across a network. If you're just looking to record some motion capture data and you don't need to synchronise it with other sensors, the easiest method is to record it in Motive directly.

Only tested on Motive 2.0 and 2.1, although older versions (i.e., older NatNet protocol versions) probably mostly work. Skeletons, force plates, and other peripherals probably mostly work in the underlying library but are not tested and are not published as ROS topics.

Only supported on ROS Melodic and Kinetic, but it works on Indigo and probably on newer distributions too. The underlying library supports Python 2.7 and 3.4+ on Linux, Windows and macOS. Both this package and the library have CI for all supported platforms.

Note: The dev branch is quite a bit ahead of master at the moment; if you run into problems then check if they're fixed there.

Features:

TODO

Installation

From Kinetic (any metapackage) or Indigo (any metapackage plus pip):

mkdir -p catkin_ws/src/
cd catkin_ws/src
git clone --recursive https://github.com/mje-nz/natnet_ros.git
cd ..
rosdep install -y --from-paths src --ignore-src
catkin_make
source devel/setup.bash

Then, if you have a ROS Master running, you can test it with a fake server:

rosrun natnet_ros client _fake:=true

or run against your real Motive instance:

rosrun natnet_ros client _server:=(Motive IP)

ROS API

The client node connects to a NatNet server and publishes the data as ROS topics. The data and descriptions are used directly, so make to give your rigid bodies unique streaming IDs and sensible names, and set the axis convention to z-up. If you need Motive to use y-up for some reason, you can fix it with:

rosrun tf static_transform_publisher 0 0 0 0 0 1.57079632679 mocap_z_up mocap 100

Published topics

Parameters