Skip to content

An explanation and guide on how to publish data from the optitrack system into a roscore

Notifications You must be signed in to change notification settings

IERoboticsAILab/optitrack-ros-data-publisher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

OptiTrack to ROS

This guide explains how to publish data from the OptiTrack system to a ROS core. The OptiTrack System utilizes Motive Software to interpret the data.

  1. Log into the Robotics Lab Server

If you are in the Robotics Lab, log into Hydra using your username and password:

ssh username@hydra
  1. Install the VRPN Package

You need to install the VRPN package into the ROS environment. Run the following command in your terminal:

sudo apt install ros-$(rosversion -d)-vrpn-client-ros
  1. Create a Catkin Package

Create a Catkin package named optitrack_ros_client. Replace with any additional dependencies your project might require:

catkin_create_pkg optitrack_ros_client std_msgs rospy roscpp <dependencies>
  1. Create a Launch Folder and File

Create a launch folder in your package directory, and then create a launch file inside this folder.

Here's an example of what you might include in optitrack.launch. Remember, the IP address should be that of the computer running the Motive Software:

<launch>

  <arg name="server" default="10.205.3.3"/>

  <node pkg="vrpn_client_ros" type="vrpn_client_node" name="optitrack" output="screen">
    <rosparam subst_value="true">
      server: $(arg server)
      port: 3883

      update_frequency: 120.0
      frame_id: world

      # Use the VRPN server's time, or the client's ROS time.
      use_server_time: false
      broadcast_tf: true

      # Must either specify refresh frequency > 0.0, or a list of trackers to create
      refresh_tracker_frequency: 1.0
      #trackers:
      #- FirstTracker
      #- SecondTracker
    </rosparam>
  </node>

</launch>
  1. Launch the Node

Run the following command to start the node and begin receiving data from OptiTrack:

roslaunch optitrack_ros_client optitrack.launch

This setup should help you integrate OptiTrack data into your ROS environment efficiently.  You can see the topics getting published by running the following command:

rostopic list | grep

Once you have this, you can create a script to subscribe to these topics and work with the data however you'd like.

About

An explanation and guide on how to publish data from the optitrack system into a roscore

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published