VRPN ROS Package

This page illustrates setup of the VRPN ROS package along with its configuration.

With the Pi connected to the internet on the same router as the motion capture system, the vrpn package can now be installed and data can be streamed from the motion capture system to the Clover. The vrpn ROS package can be found on the ROS website. If the Ubuntu machine has ROS kinetic, then the vrpn driver can be installed with the following:

sudo apt-get install ros-kinetic-vrpn-client-ros -y

with newer versions of ROS, it must be installed and built from source. The following two links: one and two, provide good insight on how to do this. The steps needed to build from source are provided for ROS noetic:

cd /path/to/your/catkin_ws/src
git clone -b kinetic-devel https://github.com/ros-drivers/vrpn_client_ros.git
cd /path/to/your/catkin_ws
rosdep update
rosdep install --from-paths src/ --ignore-src --rosdistro noetic

The package build commands were for ROS noetic. If it was for another version like ROS melodic then the noetic would simply be replaced by melodic in the fifth line as such:

rosdep install --from-paths src/ --ignore-src --rosdistro melodic

Once the vprn ROS driver is installed in Ubuntu, you can obtain the rigid body pose on an individual topic by running:

roslaunch vrpn_client_ros sample.launch server:=<mocap machine ip>

If the rigid body was named RigidBody2 a topic will be produced like /vrpn_client_node/RigidBody2/pose as seen:

What I found easier is go into the sample.launch file and manually set the server IP address as the motion capture system IP so the command can be run without the server definition. Also, in order to compare the pose estimation of the external vision source with the onboard pose estimation (EKF output), the frame ID should be set to "map" where it is originally set to "world". This is because the onboard position estimation topic /mavros/local_position/pose is in the map frame and in order for RViz to render the external pose estimation for comparison the topic must be in the "map" reference frame. These setting changes can be seen in the following figure:

Last updated