We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73be41b commit 108b60aCopy full SHA for 108b60a
diff_drive_controller/src/diff_drive_controller.cpp
@@ -420,7 +420,17 @@ controller_interface::CallbackReturn DiffDriveController::on_configure(
420
"time, this message will only be shown once");
421
msg->header.stamp = get_node()->get_clock()->now();
422
}
423
- (void)received_velocity_msg_ptr_.bounded_push(std::move(msg));
+ for (size_t i = 0; i < 5; ++i)
424
+ {
425
+ if (received_velocity_msg_ptr_.bounded_push(msg))
426
427
+ break;
428
+ }
429
+ RCLCPP_WARN(
430
+ get_node()->get_logger(),
431
+ "Velocity command could not be stored in the queue, trying again");
432
+ std::this_thread::sleep_for(100us);
433
434
});
435
436
// initialize odometry publisher and message
0 commit comments