TL;DR
ROS2MR is a new open-source pipeline that bridges the gap between ROS 2 motion planning and mixed-reality (MR) headsets. By converting complex robot trajectories into a lightweight, timing-aware JSON format, it allows engineers to visualize and inspect planned robot movements in their actual physical environment on devices like the Apple Vision Pro and Meta Quest 3—all without needing a live connection to a robot or a ROS master.
What Problem Does This Paper Address?
In robotics, seeing is believing. While tools like RViz are great for desktop visualization, they lack the spatial context of the real world. Mixed Reality (MR) offers a solution, allowing users to "place" a virtual robot in a factory or lab and watch it move.
However, a major technical hurdle exists: Trajectory Mismatch. ROS 2 (and its planning framework, MoveIt) generates trajectories as a series of waypoints with specific timestamps. MR applications, typically built in game engines like Unity, require a steady "heartbeat" (e.g., 30 frames per second) to display smooth motion. Simply playing back waypoints as frames ignores the timing data, leading to motion that is either too fast, too slow, or physically inaccurate. Furthermore, most existing MR-robotics links require a high-bandwidth, live network connection, which is often brittle in field environments.
Methods
The authors developed ROS2MR, an extension of the MR-Robotics LAB platform. The workflow consists of three main stages:
- Export: A Python helper script serializes ROS 2 joint trajectories or MoveIt plans into a YAML format. It can stitch together multiple segments (like a pick-and-place sequence) and perform "sanity checks" to ensure the robot doesn't teleport between segments.
- Conversion: A web-based converter (see Figure 2) validates the input and resamples the motion to a consistent 30 Hz grid.
- Interpolation: This is the core logic. If the ROS data includes joint velocities, the system uses cubic Hermite interpolation to create smooth, curved paths. If velocities are missing, it falls back to linear interpolation.
- Gripper Handling: Since grippers are usually binary (open/closed), the system uses a "zero-order hold" to prevent the fingers from slowly drifting between states.
- Visualization: The resulting JSON file is uploaded to the cloud (Firebase) and pulled down by a Unity-based MR application.
Datasets
The authors evaluated the system using several "fixtures" rather than traditional machine learning datasets:
- Synthetic Cubic Trajectories: Mathematically defined paths used to test the precision of the interpolation algorithms against an analytic ground truth.
- UR5e Spline Fixtures: Trajectories generated for a Universal Robots UR5e to simulate realistic pick-and-place tasks.
- Robot Library: The system supports a wide range of industrial models, including various KUKA arms (KR3, KR6, KR120, etc.) and the UR5e.
Key Insights and Ideas
- Velocities are Non-Negotiable for Accuracy: The "aha moment" in the evaluation was seeing how much accuracy drops without velocity data. When only positions are provided, sparse waypoints lead to "jagged" motion that deviates significantly from the intended path. Including velocities allows the cubic interpolator to reconstruct the original curve almost perfectly.
- Decoupling is a Feature, Not a Bug: By using a file-based exchange (YAML to JSON) rather than a live stream, the authors enable "offline" inspection. A researcher can plan a trajectory in the lab, save it, and then walk through the factory floor with a headset later to verify clearances.
- Cross-Platform MR is Hard: Porting the app to the Apple Vision Pro (visionOS) required significant workarounds, such as reimplementing authentication and storage via REST APIs because the standard Firebase SDK didn't yet support the platform.
Key Results
- High Precision: With supplied velocities, the position Root Mean Square Error (RMSE) was a negligible 2.91 × 10⁻⁵ degrees. Without velocities, the error for sparse trajectories jumped to 0.85 degrees.
- Timing Preservation: Regardless of how "dense" or "sparse" the original ROS waypoints were, the converter successfully normalized them to the 30 Hz grid while maintaining the exact total duration of the movement.
- Smooth Sequencing: The Python helper successfully managed complex sequences, ensuring that gripper commands (open/closed) were preserved even when they fell "off-grid" between the 30 Hz samples.
Limitations and Future Work
- Visualization Only: The system does not account for the physical dynamics of the robot (like torque limits or vibrations). It shows what was planned, not necessarily what the physical motors can achieve.
- 6-DOF Constraint: Currently, the mapping logic is optimized for standard 6-axis industrial arms.
- Temporal Aliasing: Very brief gripper actions (shorter than 1/30th of a second) might be missed due to the resampling grid.
- Future Directions: The authors suggest a user study to see if this tool helps students and engineers catch planning errors more quickly. They also plan to explore higher-order interpolation (quintic splines) using acceleration data.
Summary updated