Skip to content

Commit a25b67e

Browse files
gennartanagennart
andauthored
Fix robot not stopping after reaching dock position (#5568)
Publish a zero velocity command after reaching the dock position to ensure that the robot is stopped while waiting for the charge to start. Signed-off-by: agennart <[email protected]> Co-authored-by: agennart <[email protected]>
1 parent 2e7105f commit a25b67e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nav2_docking/opennav_docking/src/docking_server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ void DockingServer::dockRobot()
321321
// We are docked, wait for charging to begin
322322
RCLCPP_INFO(
323323
get_logger(), "Made contact with dock, waiting for charge to start (if applicable).");
324+
publishZeroVelocity();
324325
if (waitForCharge(dock)) {
325326
if (dock->plugin->isCharger()) {
326327
RCLCPP_INFO(get_logger(), "Robot is charging!");

0 commit comments

Comments
 (0)