time-duration-rate

Manage ROS 2 time, duration, and rate handling in Python and C++.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage ROS 2 time, duration, and rate handling across Python and C++.

Core Features & Use Cases

  • Handles ROS 2 time, duration, and clock management across Python and C++.
  • Demonstrates sim_time usage, timers, and rate control for deterministic behavior.
  • Real-world scenario: sim time in Gazebo/rosbag and stamping messages with proper clocks.

Quick Start

Enable sim_time in your ROS 2 launch and create a node that uses the clock to manage time-aware operations.

Frequently Asked Questions about time-duration-rate

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

FAQPage Schema
How do I use sim_time in ROS 2 for Gazebo and rosbag playback?

Handle sim_time in ROS 2 by enabling use_sim_time in your launch configuration and subscribing to the /clock topic. This ensures deterministic timekeeping and proper message stamping during Gazebo simulation and rosbag playback.

How does ROS 2 Time and Duration arithmetic work across Python and C++?

ROS 2 Time and Duration arithmetic allows adding, subtracting, and comparing time objects across Python and C++. It manages clock types and applies robust validation to ensure accurate time-aware operations in timer-driven components.

Can I use ROS 2 timers and rate control for deterministic behavior in Python and C++?

Yes, you can use ROS 2 timers and rate utilities in both Python and C++ to achieve deterministic behavior. They manage clock types and provide robust validation for timer-driven components requiring accurate timekeeping.

What is the best way to stamp ROS 2 messages with the proper clock?

The best way to stamp ROS 2 messages is to retrieve the current time from the node's clock while ensuring use_sim_time support is enabled. This applies correct clock type handling across Python and C++ for accurate time stamping.

Does ROS 2 duration handling support validation for timer-driven components?

Yes, ROS 2 duration handling supports robust validation for timer-driven components. It applies accurate Time and Duration arithmetic and clock type handling across Python and C++ to ensure reliable timekeeping operations.