sim-time-management

Configure ROS 2 nodes to use simulation time via use_sim_time.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill sim-time-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sim-time-management
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/sim-time-management
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill sim-time-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing synchronized time across a ROS 2 system running in simulation, ensuring all nodes use the simulated clock and avoiding timing mismatches between components.

Core Features & Use Cases

  • Global sim-time enforcement: ensures all nodes switch to simulated time via use_sim_time and propagate consistently through TF and timers.
  • Bridge and launch integration: works with Gazebo/ros_gz_bridge to maintain clock coherence during simulation launches.
  • Debug & validation: provides guidance to verify /clock publication and node time settings to prevent desynchronization.

Quick Start

Configure your ROS 2 launch to enable use_sim_time and verify every node inherits sim-time within the simulation.

Frequently Asked Questions about sim-time-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep ROS 2 sim time in sync across all nodes during Gazebo simulation?

To keep ROS 2 sim time in sync, configure launch files and YAML parameters to enable use_sim_time globally. This ensures TF, headers, and timers rely on a common simulated clock published via ros_gz_bridge.

Why does use_sim_time cause timing mismatches between ROS 2 nodes?

Timing mismatches occur when use_sim_time is not propagated consistently across launch files and parameter overrides. Aligning clocks and verifying /clock publication prevents component desynchronization during real-time simulations.

What is the best way to configure use_sim_time in ROS 2 launch files?

The best way to configure use_sim_time is applying parameter overrides directly within ROS 2 launch files and YAML configurations. This enforces simulated time globally across all nodes, preventing configuration drift.

Does ros_gz_bridge maintain clock coherence for ROS 2 sim time?

Yes, ros_gz_bridge maintains clock coherence by bridging the Gazebo clock into ROS 2. Enabling use_sim_time ensures all connected nodes switch to the simulated time and align their timers correctly.

How to verify if all ROS 2 nodes inherit sim-time correctly?

Verify sim-time inheritance by checking /clock topic publication and inspecting node time settings. Debug and validation steps confirm every node switches to simulated time, avoiding desynchronization issues.