We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8c6bda commit 9e39b05Copy full SHA for 9e39b05
diff_drive_controller/src/diff_drive_controller.cpp
@@ -457,7 +457,17 @@ controller_interface::CallbackReturn DiffDriveController::on_configure(
457
cmd_vel_timeout_ == rclcpp::Duration::from_seconds(0.0) ||
458
current_time_diff < cmd_vel_timeout_)
459
{
460
- (void)received_velocity_msg_ptr_.bounded_push(std::move(msg));
+ for (size_t i = 0; i < 5; ++i)
461
+ {
462
+ if (received_velocity_msg_ptr_.bounded_push(msg))
463
464
+ break;
465
+ }
466
+ RCLCPP_WARN(
467
+ get_node()->get_logger(),
468
+ "Velocity command could not be stored in the queue, trying again");
469
+ std::this_thread::sleep_for(100us);
470
471
}
472
else
473
0 commit comments