From 0fca432fe4651433c60f82ff0094e72fc2820738 Mon Sep 17 00:00:00 2001 From: rafal-gorecki Date: Fri, 1 Dec 2023 19:03:52 +0100 Subject: [PATCH] fix sim time --- rosbot_gazebo/test/test_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rosbot_gazebo/test/test_utils.py b/rosbot_gazebo/test/test_utils.py index 6e331275..60402b01 100644 --- a/rosbot_gazebo/test/test_utils.py +++ b/rosbot_gazebo/test/test_utils.py @@ -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()