Skip to content

Commit 34c4d71

Browse files
Merge branch 'cyberbotics:master' into connector-plugin
2 parents 087a94a + 73551ef commit 34c4d71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webots_ros2_control/src/Ros2Control.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ namespace webots_ros2_control {
9090
void Ros2Control::step() {
9191
const int nowMs = wb_robot_get_time() * 1000.0;
9292
const int periodMs = nowMs - mLastControlUpdateMs;
93-
if (periodMs >= mControlPeriodMs) {
93+
if (periodMs >= mControlPeriodMs && mNode->get_clock()->now() != rclcpp::Time(0, 0, mNode->get_clock()->get_clock_type())) {
9494
const rclcpp::Duration dt = rclcpp::Duration::from_seconds(mControlPeriodMs / 1000.0);
9595
mControllerManager->read(mNode->get_clock()->now(), dt);
9696

0 commit comments

Comments
 (0)