ROS2MR: Connecting ROS 2 Motion Planning to Mixed-Reality Trajectory Visualization

Santiago Berrezueta-Guzman, Habiba-Loai Khalil, Andrei Koshelev, Stefan WagnerarXiv 2026

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:

  1. 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.
  2. Conversion: A web-based converter (see Figure 2) validates the input and resamples the motion to a consistent 30 Hz grid.
  3. 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.
  4. 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.
  5. Visualization: The resulting JSON file is uploaded to the cloud (Firebase) and pulled down by a Unity-based MR application.
Figure 2: Web interface for trajectory conversion in MR-Robotics LAB [10].

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.
The system in action on the Apple Vision Pro, showing the virtual robot and real-time joint statistics overlaid on the user's view.

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.
Comparison of reconstructed joint velocity. The blue dashed line (with velocities) matches the reference perfectly, while the orange line (position-only) shows the "stair-step" artifacts of linear interpolation.

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

Abstract

Mixed reality (MR) allows users to inspect planned robot motion within their physical surroundings, but displaying trajectories from robotics software requires converting their joint configurations and timing into a format the MR application can play back. This paper presents ROS2MR, an extension of the MR-Robotics LAB platform that converts YAML-serialized ROS 2 joint trajectories, including MoveIt motion plans, into the platform's existing JSON playback format. The converter validates the input, maps arm joints by name, and resamples the trajectory at a nominal rate of 30 Hz, using cubic Hermite interpolation when joint velocities are supplied and linear interpolation otherwise, while binary gripper commands are sampled separately using a zero-order hold. A Python export helper combines sequences of motion plans and gripper states into a single trajectory and checks positional agreement at segment boundaries. The MR application was also adapted for Apple Vision Pro in addition to Meta Quest 3. A technical evaluation showed that the converter preserved the normalized duration and endpoint configurations for dense, sparse, and irregularly timed inputs. With supplied velocities, the position RMSE was approximately 2.91x10^-5 degrees for all sampling patterns; without them, sparse input increased it to 0.85 degrees, and close positional agreement did not guarantee accurate velocity profiles. A pick-and-place sequence retained its open--closed--open gripper order, although off-grid transitions were shifted to the output sampling grid. The resulting file-based pathway enables inspection of ROS-generated trajectories in MR without a live ROS connection.
BibTeX
@misc{berrezuetaguzman2026ros,
  author = {Santiago Berrezueta-Guzman and Habiba-Loai Khalil and Andrei Koshelev and Stefan Wagner},
  title = {{ROS2MR: Connecting ROS 2 Motion Planning to Mixed-Reality Trajectory Visualization}},
  year = {2026},
  eprint = {2611.11830},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.11830},
}
Figure