Combining ROS 2 Bag Files with USD Scenes

Learn how to combine ROS 2 bag files and USD scenes in Isaac Sim to build fully reproducible simulations for debugging, testing, and synthetic data generation.
Blog>
combining-ros-2-bag-files-with-usd-scenes
Last updated: 
June 29, 2025

🧭 Why Reproducibility Matters in Simulation

In robotics and autonomy, repeatability is everything. You need to:

  • Debug a bug that only happens once.
  • Re-run a scenario across multiple AI versions.
  • Benchmark performance in consistent conditions.
  • Generate synthetic data at scale.

To do that, you need a way to freeze your entire simulation state. That’s where the combination of ROS 2 bag files and USD scenes becomes so powerful.

🧳 What Each Component Captures

| Asset Type    | What It Captures                                         | Format                   |
| ------------- | -------------------------------------------------------- | ------------------------ |
| **ROS 2 Bag** | Sensor data, control commands, robot state, topic timing | `.db3`, `.yaml`          |
| **USD Scene** | 3D world layout, physics, lighting, sensor configuration | `.usd`, `.usda`, `.usdc` |

Together, they let you replay exactly what the robot did, saw, and felt, in exactly the world it happened in.

🛠️ How to Set It Up

1. Record the Bag File

While running a robot in Isaac Sim:

ros2 bag record -a

This captures all topics: LiDAR, camera, IMU, /cmd_vel, /joint_states, etc.

2. Save the USD Stage

In Omniverse Isaac Sim:

  • Go to the top menu → File > Save As
  • Save the .usd file representing the full environment and robot pose at the moment of recording.

You now have a static snapshot of the physical world.

3. Replay the Data

Reload the saved .usd stage and replay the bag:

ros2 bag play <bag_name>

This re-publishes the same sensor/control data while the robot lives in the same virtual world geometry. Isaac Sim receives these messages as if the robot is acting live.

🎯 Use Cases

| Use Case                      | Benefit                                                                           |
| ----------------------------- | --------------------------------------------------------------------------------- |
| **AI Regression Testing**     | Re-test the same scenario across model versions                                   |
| **Simulation Debugging**      | Reproduce bugs with full visual + sensor context                                  |
| **Synthetic Data Generation** | Generate new camera images or point clouds from different lighting or camera rigs |
| **Sim-to-Real Transfer**      | Validate that real-world runs can be simulated and matched in Isaac               |
| **Scenario Variation**        | Change the USD (e.g., object pose) but replay same bag for robustness testing     |

Available Now

Book a demo and get early access. Free trial!

Email Address:
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Email Address:
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.