Difference between time.time() and Ros2 self.get_clock()

The examples Wavearm and CheatCode are using “self.sleep_for(0.25)“ which is ros simulation time.

But the RunAct use the time.time() which is system time.

Why?

Ideally, RunAct should utilize self.sleep_for(), as it interfaces directly with the ROS clock.

The rationale is to maintain temporal consistency within the simulation environment. When running in sim, it is critical that all processes—including ROS nodes—synchronize with the simulation clock rather than the system wall clock. Depending on simulation parameters and available compute, the simulation may run significantly slower (or faster) than real-time; using the ROS clock ensures that the policy logic remains deterministic and aligned with the physics engine.

Feel free to open a PR to update RunACT.