Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pose_follower: Driving backwards even with allow_backwards=false #47

Open
nxdefiant opened this issue Mar 19, 2020 · 2 comments
Open

pose_follower: Driving backwards even with allow_backwards=false #47

nxdefiant opened this issue Mar 19, 2020 · 2 comments

Comments

@nxdefiant
Copy link

Hi,

the pose_follower is driving backwards with non holonomic robots even when the parameter allow_backwards is set to false.

I think that PoseFollower::limitTwist() is missing a check for this condition, e.g. the following should help:

if (!allow_backwards_ && res.linear.x < 0) {
	res.linear.x = 0.0;
}
@nxdefiant
Copy link
Author

Btw disabling allow_backwards is a bad idea when using Navfn as a global planner since Navfn can produce paths with all goals in backwards direction.

@mintar
Copy link
Collaborator

mintar commented Mar 23, 2020

Yes, Navfn only produces a sequence of points, not poses (it doesn't fill out the orientation component of the pose).

Simply limiting the twist like you proposed won't help: If pose_follower decided to go backwards, but then sets the velocity to zero, it will just stop in place and not move anywhere.

If you have a working fix, I'll be happy to merge a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants