-
Notifications
You must be signed in to change notification settings - Fork 525
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
Enforce singularity threshold when moving away from a singularity #620
Enforce singularity threshold when moving away from a singularity #620
Conversation
I like these things. Both very useful for debugging:
I don't like this. Several people have complained in the past when the robot could only move away from singularity slowly:
Instead of that, I like the idea you brought up privately:
|
If you want to reduce the scope of this PR so it only does this two things, I'd approve:
|
7c0382e
to
c539886
Compare
9af403e
to
004d538
Compare
…ingularity - Prevent uncontrolled behavior when servo starts close to a singularity and then servos away from it - Scale velocity at a different rate when approaching/leaving singularity - Add status code to distinguish between velocity scaling when moving towards/away from the singularity
004d538
to
fabc2e2
Compare
Codecov Report
@@ Coverage Diff @@
## main #620 +/- ##
==========================================
+ Coverage 51.10% 51.13% +0.04%
==========================================
Files 380 380
Lines 31737 31755 +18
==========================================
+ Hits 16217 16236 +19
+ Misses 15520 15519 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@nbbrooks @AndyZe Just updated to the latest design, take a look when you have a chance and let me know if I should change anything (especially with the style of the deprecation warning and how I checked for the parameter's existence before getting it). |
Almost there.
IMO that's fine |
Co-authored-by: AndyZe <andyz@utexas.edu>
Co-authored-by: AndyZe <andyz@utexas.edu>
…ved code block next to relevant singularity code
Thanks for the review, Andy! I think it should be good to go now. Made your changes and cleaned some stuff up as well as adding defaults for the panda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach of keeping old configs working and using a warning to inform them of new/better behavior they can take advantage of through a config change.
I would like to see logic moved out of sevo_calcs and into free functions that can be tested independently of all of the state in servo_calcs but will not block this PR for that.
See #1499 Feel free to debug that if you have time. That would be awesome. |
* Enforce singularity threshold behavior even when moving away from a singularity - Prevent uncontrolled behavior when servo starts close to a singularity and then servos away from it - Scale velocity at a different rate when approaching/leaving singularity - Add status code to distinguish between velocity scaling when moving towards/away from the singularity * Work on expanding servo singularity tests * Pre-commit * removed duplicate input checking * added 2 other tests * undid changes to singularity test * Update moveit_ros/moveit_servo/src/servo_calcs.cpp with Nathan's suggestion Co-authored-by: Nathan Brooks <nbbrooks@gmail.com> * readability changes and additional servo parameter check * updating to newest design * added warning message * added missing semicolon * made optional parameter nicer * Remove outdated warning Co-authored-by: AndyZe <andyz@utexas.edu> * Removing inaccurate comment Co-authored-by: AndyZe <andyz@utexas.edu> * making Andy's suggested changes, added some comments and defaults, moved code block next to relevant singularity code * removed part of comment that does not apply any more * Mention "deprecation" in the warning Co-authored-by: Henry Moore <henrygerardmoore@gmail.com> Co-authored-by: Henry Moore <44307180+henrygerardmoore@users.noreply.github.com> Co-authored-by: AndyZe <zelenak@picknik.ai> Co-authored-by: AndyZe <andyz@utexas.edu> (cherry picked from commit d4b3294)
Description
I have updated this description to reflect the final behavior.
Currently the singularity threshold behavior is only enforced if the manipulator is moving further into singularity. If a different mode of operation is used (e.x. joint servoing) which puts the manipulator into/beyond the singularity region and then the user switches to Cartesian servoing, the velocity scaling/singularity halting behavior will not take effect if they are servoing away from the singularity (e.g.
dot < 0
). This can result in wild motion.This PR makes 2 opt-in changes
The behavior of 2 uses a new parameter
leaving_singularity_threshold_multiplier
and is described in the below graphic. By defaultleaving_singularity_threshold_multiplier
is2.0
TODO:
approaching_stop_singularity_threshold
param tohard_stop_singularity_threshold
so this doesn't break existing implementations (e.g. make this opt in)Checklist