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

Add allow_changing_direction flag to servo_until_pose #178

Open
amalnanavati opened this issue May 6, 2024 · 0 comments
Open

Add allow_changing_direction flag to servo_until_pose #178

amalnanavati opened this issue May 6, 2024 · 0 comments

Comments

@amalnanavati
Copy link
Contributor

As it stands, servo_until_pose keeps moving until it reaches the goal pose. As a result of this, if it overshoots the goal, it changes direction to correct.

However, with MoveToMouth, if the robot moves closer to the user's mouth than it intended, it should just stop -- having it move away from the mouth to correct is unintuitive.

Similarly, it would be better to move acquisition to servo_until_pose, because sometimes it takes some time for the controller to start up so the robot doesn't exactly get the entire duration for the twist. However, even in acquisition, it doesn't make much sense for the robot to move backwards if it overshoots.

Thus, servo_until_pose should take in a flag, allow_changing_direction, that defaults to False. If True, it stores the previous value of a computed twist, and if any of the twists value's sign changes relative to the previous message, it sets that twist element to 0 instead. Essentially what this does is tells the robot that "if you overshoot, don't correct it, instead just complete the motion with the overshot dimension."

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

1 participant