UbiquityRobotics / move_basic

A minimal navigation node
BSD 3-Clause "New" or "Revised" License
69 stars 21 forks source link

Robot driving past goals into infinity #81

Closed MoffKalast closed 3 years ago

MoffKalast commented 3 years ago

In a nutshell if the robot comes into such a case where it misses a goal it doesn't stop but attempts to drive ahead and loop around to find the goal. That's obviously problematic in almost all cases.

A suggested fix would be to constantly calculate a safety dot product between the robot's forward vector and the vector from the robot center to the goal, then stop driving if the result is <= 0 and distance to goal is more than 0.3 m or something. That would prevent the robot from ever driving away from the goal. As to what to do when that condition is detected, we could just return to the initial rotation stage or cancel the goal completely and resend it.

Removing the low speed requirement for having achieved a goal is probably also a good idea, after all we're there and we need to stop right now regardless of the speed we're going at.

This is probably the highest priority issue along with #80 which is the main but not only cause of it.

JanezCim commented 3 years ago

This is a big issue when there are non-ideal conditions present: 1.) when the robot is externally pushed out of its current position, 2.) when navigation algorithm is unreliable and the robot is constantly jumping around