Skip to content

Commit

Permalink
fix sim time
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Dec 1, 2023
1 parent 22ee6c1 commit 0fca432
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rosbot_gazebo/test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class SimulationTestNode(Node):
def __init__(self, name="test_node"):
super().__init__(name)

# Use simulation time to correct run on slow machine
use_sim_time = rclpy.parameter.Parameter("use_sim_time", rclpy.Parameter.Type.BOOL, True)
self.set_parameters([use_sim_time])

self.VELOCITY_STABILIZATION_DELAY = 3
self.goal_received_time = 1e-9 * self.get_clock().now().nanoseconds
self.vel_stabilization_time_event = Event()
Expand Down

0 comments on commit 0fca432

Please sign in to comment.