Reading Data from Optitrack with ROS
The easiest way to read motion capture data is with the Virtual Reality Peripheral Network (VRPN). VRPN is already integrated with Motive and can also be used with ROS. Additionally, Natural Point offers a SDK for Motive if you prefer to interface with Optitrack without ROS.
Preliminary
Refer to Connecting to the Local Network, Motive Software, and Using ROS
Start the VRPN Server in Motive
In Motive, under the Data Streaming
pane, ensure the settings correspond to the ones shown below.
The default pose that is published by VRPN is in the Y-up configuration. If desired, this can be changed to a Z-up configuration.
Start the VRPN Client in ROS
On your ROS-enabled machine, install the ROS package vrpn_client_ros. This package ships with a launch file sample.launch
. Make a copy of this launch file and add it to your local catkin workspace (e.g., in the launch folder of one of your packages). Finally, modify the copied launch file by changing line 3 from
<arg name="server" default="localhost"/>
to
<arg name="server" default="mocap.local"/>
Launching this new launch file will publish a geometry_msgs/PoseStamped
message on the topic vrpn/[asset_name]/pose
, where [asset_name]
is the name of your asset (rigid body) in Motive.