Introduction to OptiTrack
Welcome to the world of OptiTrack, where precision meets innovation. As a leading provider of motion capture technology, OptiTrack empowers robotics enthusiasts, researchers, and industry professionals with unparalleled tracking solutions. In today's rapidly evolving robotics landscape, the ability to accurately capture and analyze motion data is crucial for pushing the boundaries of robotic performance. With OptiTrack, users can achieve sub-millimeter accuracy, allowing for precise control and analysis of robotic systems. Our journey with OptiTrack begins here, as we explore the features and capabilities that make it the preferred choice for robotics applications. Join us as we delve into the world of high-precision motion capture and discover how OptiTrack is revolutionizing the field of robotics.
Key Features of OptiTrack
OptiTrack offers a wide range of features designed to meet the diverse needs of robotics professionals. Here are some of the key features that set OptiTrack apart:
- High-Precision Tracking: OptiTrack delivers sub-millimeter accuracy, allowing for precise measurement and analysis of robotic motion.
- Flexible Configurations: Whether indoor or outdoor tracking, OptiTrack offers flexible configurations to suit various environments and applications.
- Real-Time Data Streaming: With OptiTrack, users can stream motion capture data in real-time, enabling instant feedback and control of robotic systems.
- Easy Integration: OptiTrack seamlessly integrates with popular robotics platforms and software tools, making it easy to incorporate motion capture into existing workflows.
- Scalable Solutions: From small-scale research projects to large-scale industrial applications, OptiTrack offers scalable solutions to meet the needs of any project or budget.
Feature Spotlight: Real-Time Humanoid Robot Tracking
One of the standout features of OptiTrack is its capability to perform high-precision, real-time tracking of complex robotic systems, such as the H1 humanoid robot. This feature highlights the robustness and accuracy of the OptiTrack system in dynamic and intricate scenarios.
In this example, the H1 humanoid robot is outfitted with reflective markers on its left and right hands, showcasing OptiTrack's ability to capture detailed and precise movements. The system utilizes high-speed cameras to gather motion data, which is then processed in real-time by the Motive software. This data is streamed over the network to a ROS-enabled PC via the VRPN streaming engine, where it is transformed into ROS TFs, facilitating seamless integration with other ROS nodes and applications.
The accompanying GIFs below illustrate this feature in action. The first GIF shows the real-time movements of the H1 humanoid robot, demonstrating its agility and responsiveness. The second GIF highlights the precision of OptiTrack's motion capture as the robot's movements are tracked in the Motive software. The third GIF provides a visual representation of the robot's movements in RViz, emphasizing the integration capabilities of OptiTrack with ROS-enabled visualization tools.
H1 Humanoid Robot in Real
H1 Humanoid Robot being tracked by OptiTrack in Motive
H1 Humanoid Robot being tracked in RViz by subscribing to Motive data
This example underscores the comprehensive capabilities of OptiTrack in tracking and visualizing humanoid robots, making it an indispensable tool for researchers and developers in the field of robotics.
OptiTrack Setup
Required Equipment for OptiTrack Setup
Welcome to the OptiTrack Setup guide, your gateway to unlocking the full potential of motion capture technology. In this comprehensive walkthrough, we'll guide you through every crucial step to ensure your OptiTrack system is up and running smoothly, delivering unparalleled performance and accuracy.
Hardware Setup
Let's start with the hardware setup of your OptiTrack system, which is essential for optimal performance.
Preparing the Capture Area
For best tracking results, ensure that the capture environment is clean and free from obstructions. Remove unnecessary objects, cover reflective surfaces, and minimize ambient light sources, especially sunlight and other infrared light sources. Consider the layout of your capture area and position the cameras to provide adequate coverage. Pay attention to potential occlusion areas and adjust camera placement accordingly.
Cabling and Load Balancing
Connect your Ethernet camera system to the host PC using PoE switches and Ethernet cables. Ensure that the switches are powered and that the cameras are connected securely. Pay attention to cable quality and distance limitations to avoid data transmission issues. Proper load balancing ensures that data is distributed efficiently across the network to prevent bottlenecks and ensure smooth operation of the system. Consider the number of cameras in your setup and adjust the network configuration accordingly.
Placing and Aiming Cameras
Position your cameras around the capture volume to ensure optimal coverage. Securely mount the cameras onto stable structures such as tripods or truss systems. Ensure that the cameras are positioned at appropriate heights and angles to capture motion data accurately. Aim the cameras to overlap their views around the region where most of the capture will take place. Verify camera focus for accurate tracking results and adjust camera settings as needed. Consider the field of view of each camera and ensure that there are no blind spots or areas with limited coverage. Perform test captures to verify camera placement and adjust as necessary.
Software Setup
Finally, let's complete the software setup to ensure seamless operation of your OptiTrack system.
Host PC Requirements
Check that your host PC meets the minimum system requirements for running Motive. Ensure that the operating system, CPU, RAM, and GPU specifications are compatible with the size of your camera system. Consider the processing power required for real-time tracking and data processing. Optimize system performance by closing unnecessary applications and processes running in the background.
Motive Installation
If you haven't already done so, download and install Motive on your host PC. Follow the installation instructions provided by OptiTrack and ensure that Motive is activated using the USB Security Key. During installation, configure Motive settings according to your specific requirements. Customize user preferences, camera settings, and system configurations to optimize performance and usability.
System Calibration
Proper system calibration is crucial for accurate motion tracking. Follow these steps to ensure your system is calibrated correctly:
- Masking: Remove or cover any extraneous reflections or unnecessary markers in the capture area. This step helps ensure that only the intended markers are tracked.
- Wanding: Wave the calibration wand across the capture volume to provide reference points for the system. This step helps the software understand the spatial relationships within the capture area.
- Solving: The software will use the reference points collected during wanding to calculate the position and orientation of each camera. This step finalizes the calibration process.
Capture Setup
With the system calibrated, you're ready to set up your capture session. Follow these steps to ensure a smooth capture process:
- Prepare Session Folders: Organize your capture recordings by creating session folders. This practice helps keep your data organized and easily accessible.
- Define Trackable Assets: In Motive, define the Rigid Bodies and Skeletons that will be tracked. Rigid Bodies represent objects or entities, while Skeletons represent human or animal subjects.
- Attach Markers: Securely attach markers to the subjects. Proper marker placement is essential for accurate tracking.
Integrating OptiTrack with ROS
Integrating OptiTrack motion capture technology with the Robot Operating System (ROS) opens up a realm of possibilities for robotics enthusiasts and researchers alike. By leveraging ROS packages such as mocap_optitrack and vrpn-client-ros, users can seamlessly incorporate high-precision motion capture data into their ROS projects. OptiTrack's NatNet and VRPN streaming engines provide robust solutions for streaming motion data, while ROS facilitates the integration of this data into various robotic applications. With OptiTrack and ROS working together, users can harness the power of precise motion tracking to enhance robot control, navigation, and perception, ultimately advancing the capabilities and performance of robotic systems. Whether visualizing streamed data in RViz or integrating it into complex robotic algorithms, the combination of OptiTrack and ROS empowers users to push the boundaries of robotics research and development.
OptiTrack (NatNet) Streaming Engine with mocap_optitrack ROS Package
Installation:
This section guides users through the installation process of the mocap_optitrack
ROS package. It's essential to ensure that ROS is properly set up on the system before proceeding with package installation. Users are instructed to clone the mocap_optitrack
repository from GitHub and then compile it using catkin_make
.
cd $ROS_WORKSPACE/src
git clone https://github.com/ros-drivers/mocap_optitrack.git
cd $ROS_WORKSPACE
catkin_make
source devel/setup.bash
Configuring Motive:
Here, users are walked through the configuration steps within OptiTrack's Motive software. They learn how to activate the NatNet streaming engine and configure the streaming settings to ensure data is properly streamed to the ROS PC. Specific attention is given to selecting the correct Network Interface, activating streaming for rigid bodies, and configuring advanced network settings such as multicast addressing.
- Open the Data Streaming Pane in Motive by clicking on
View -> Data Streaming
. - Activate the OptiTrack streaming engine by checking the
Broadcast Frame Data
checkbox in the OptiTrack Streaming Engine group. - Select the proper Network Interface by setting the
Local Interface
to the PC's IP address of the network to which the ROS PC is connected. - Set
Stream Rigid Bodies
toTrue
to activate streaming of rigid bodies. - Set
Type
in Advanced Network Settings toMulticast
, specify the command and data ports if necessary, and set the Multicast Interface (default: 239.255.42.99).
Configuring mocap_optitrack:
This section explains how to configure the mocap_optitrack
package to work seamlessly with Motive. Users are instructed to edit the configuration file (config/mocap.yaml
) to define the rigid bodies to be tracked, their corresponding topics, and TFs. It's emphasized that these settings must match those in Motive, including the multicast address.
rigid_bodies:
'1':
pose: Robot_1/pose
pose2d: Robot_1/ground_pose
child_frame_id: Robot_1/base_link
parent_frame_id: world
optitrack_config:
multicast_address: 224.0.0.1
The section under rigid_bodies
defines all the rigid bodies that will be tracked. Their ID needs to match the User ID defined in the project pane in Motive. pose
and pose2d
define the topics to which the streamed data will be published. child_frame_id
and parent_frame_id
define the TF that will be published.
In the optitrack_config
section, all necessary information to communicate with Motive will be set. The multicast_address
defined here needs to match the Multicast Interface defined in Motive.
Note that the default value for the multicast_address
in mocap_optitrack
is 224.0.0.1 whereas the default value in Motive for Multicast Interface is 239.255.42.99!
Results:
After completing the configuration, users can launch the mocap_optitrack
package and visualize the streamed data in RViz. Use the following command to launch the package:
roslaunch mocap_optitrack mocap.launch
rosrun rviz rviz
They're informed that ROS nodes will publish topics and TFs containing the motion data received from the OptiTrack system, facilitating further integration into their ROS projects.
Bugs/Problems:
This section highlights a known issue where mocap_optitrack
may crash when multiple objects are streamed from Motive. Users are advised to use the latest version of the package or apply any available fixes to resolve this issue.
VRPN Streaming Engine with vrpn-client-ros ROS Package
Installation:
Users are instructed to install the vrpn-client-ros
ROS package using the apt-get
command. This ensures that the necessary package dependencies are installed on the system. Use the following commands to install the required packages:
sudo apt-get install ros-kinetic-vrpn
sudo apt-get install ros-kinetic-vrpn-client-ros
Next, clone the repository into your catkin workspace, compile it, and source your setup file:
cd $ROS_WORKSPACE
git clone https://github.com/socrob/mocap.git
catkin build
source ~/.bashrc
Configuring Motive:
The configuration steps for the VRPN streaming engine in Motive are detailed below. Users learn how to activate the engine, set the VRPN broadcast port if necessary, and ensure that object names do not contain whitespaces, which could cause issues during streaming.
- Turn on the switch and the mocap PC, open Motive, and click calibrate.
- Start wanding, set the ground plane, and place a marker somewhere in the testbed.
- Ensure the VRPN streaming engine is activated.
- Set the VRPN broadcast port if necessary.
- Ensure that object names do not contain whitespaces.
Configuring vrpn-client-ros:
This section provides guidance on creating a launch file to start the VRPN client for ROS. Users are shown how to specify the server's IP address and configure additional settings such as refresh frequency and TF broadcasting. Here are the commands to launch the VRPN client node:
roslaunch mbot_mocap mocap.launch
Troubleshooting tips are provided for resolving coordinate system mismatches.
Results:
After launching the vrpn-client-ros
package, users can visualize the streamed data in RViz. Open RViz, set the fixed frame to map
, and add the tf
topic. The section emphasizes the importance of noting any coordinate system mismatches and adjusting settings accordingly.
Bugs/Problems:
Potential issues with coordinate system mismatches in RViz when using vrpn-client-ros
are addressed here. Users are encouraged to troubleshoot these issues by verifying settings and configurations to ensure smooth data visualization.
Use Case Examples
Use Case 1: Go1 Quadruped (Go1 Body Tracking)
In this scenario, we showcase the tracking performance of the OptiTrack system with a Go1 quadruped robot. The robot's body is outfitted with reflective markers strategically placed to enable accurate tracking of its movements. As the Go1 robot moves within the capture area, the OptiTrack cameras capture the motion data, which is then processed and reconstructed in real-time by the Motive software.
The VRPN streaming engine is utilized to stream the motion data to a ROS-enabled PC, where a dedicated ROS node subscribes to the VRPN data topics. The received data is transformed into ROS TFs, enabling seamless integration with ROS-based applications. The motion of the Go1 quadruped robot is visualized in RViz, providing a comprehensive representation of its movements in a 3D environment.
The following GIFs demonstrate the robust tracking and visualization capabilities. The first GIF shows the Go1 quadruped in action, highlighting its dynamic movement. The second GIF captures the robot being tracked by the OptiTrack system in Motive, illustrating the precision of the tracking markers. The third GIF visualizes the Go1 robot's movements in RViz, offering a 3D representation of its tracked motion.
Go1 Quadruped Robot in Real
Go1 Quadruped Robot being tracked by OptiTrack in Motive
Go1 Quadruped Robot being tracked in RViz by subscribing to Motive data
Use Case 2: Diablo Two-Wheeled Robot (Body Tracking)
Here, we present an example of tracking a Diablo two-wheeled robot using the OptiTrack system. The robot's body is adorned with reflective markers, allowing for precise tracking of its movements. As the Diablo robot maneuvers within the capture area, the OptiTrack cameras capture its motion data, which is then processed and reconstructed in real-time by the Motive software.
Utilizing the VRPN streaming engine, the motion data is transmitted over the network to a ROS-enabled PC. A dedicated ROS node subscribes to the VRPN data topics and transforms them into ROS TFs, facilitating seamless integration with other ROS nodes and applications. The motion of the Diablo two-wheeled robot is visualized in RViz, providing an intuitive representation of its movements in a 3D space.
The GIFs below illustrate the comprehensive tracking process. The first GIF shows the Diablo robot in operation, demonstrating its mobility. The second GIF depicts the robot being tracked in Motive, showcasing the accuracy of the OptiTrack system. The third GIF visualizes the Diablo robot's movements in RViz, offering a detailed 3D representation of the tracked data.
Diablo Two-Wheeled Robot in Real
Diablo Two-Wheeled Robot being tracked by OptiTrack in Motive
Diablo Two-Wheeled Robot being tracked in RViz by subscribing to Motive data
Use Case 3: Go1 and Diablo (Body Tracking)
This scenario demonstrates simultaneous tracking of a Go1 quadruped and a Diablo two-wheeled robot using the OptiTrack system. Both robots are equipped with reflective markers on their bodies, enabling precise tracking of their movements. As the robots navigate within the capture area, the OptiTrack cameras capture their motion data, which is processed and reconstructed in real-time by the Motive software.
Using the VRPN streaming engine, the motion data from both robots is streamed over the network to a ROS-enabled PC. Dedicated ROS nodes subscribe to the VRPN data topics and transform them into ROS TFs, allowing for seamless integration with ROS-based applications. The motions of both the Go1 quadruped and Diablo two-wheeled robot are visualized simultaneously in RViz, providing a comprehensive view of their movements in a shared 3D environment.
The following GIFs show the coordinated tracking of both robots. The first GIF captures the Go1 quadruped and Diablo robot in their respective movements. The second GIF demonstrates the tracking process in Motive, highlighting the precision of the OptiTrack system. The third GIF visualizes both robots' movements in RViz, offering a detailed 3D representation of their tracked data.
Go1 Quadruped and Diablo Robot in Real
Go1 and Diablo Robot being tracked by OptiTrack in Motive
Go1 and Diablo Robot being tracked in RViz by subscribing to Motive data