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

Servo: Allow a negative joint margin #501

Merged

Conversation

AndyZe
Copy link
Member

@AndyZe AndyZe commented Jun 16, 2021

Servo has a joint_limit_margin parameter that provides a little padding around joint limits from the URDF. This is useful to make sure the robot has time to stop before the actual joint limits.

We have an unusual use case where one joint has very narrow joint limits and the encoders are pretty noisy. Also, there are hard stops, so it's no big deal if the software joint limit gets exceeded. For that, we want to allow a negative joint limit margin. Although we still throw a warning because this is so unusual.

@AndyZe AndyZe changed the title Allow a negative joint margin Servo: Allow a negative joint margin Jun 16, 2021
@codecov
Copy link

codecov bot commented Jun 16, 2021

Codecov Report

Merging #501 (feb43c9) into main (2ec3e9d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #501   +/-   ##
=======================================
  Coverage   46.65%   46.65%           
=======================================
  Files         183      183           
  Lines       19654    19654           
=======================================
  Hits         9168     9168           
  Misses      10486    10486           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ec3e9d...feb43c9. Read the comment docs.

Copy link
Contributor

@AdamPettinger AdamPettinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea seems OK to me, and I do think spitting out a warning is good

Copy link
Contributor

@destogl destogl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm the use-case :)

Copy link
Contributor

@vatanaksoytezer vatanaksoytezer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also seems reasonable to me

Copy link
Contributor

@nbbrooks nbbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more context on why a servo specific solution is needed. Some smoothing algorithms appropriate for use with servo do not consider position limits and will "smooth" commands beyond them.

On the other hand, time parameterization algorithms used by move group, etc, handle pos as well as vel+acc+... limits directly.

Modifying joint_limits.yaml would impact both of these when we only want to adjust this for servoing. So this servo specific solution is needed.

Copy link
Contributor

@v4hn v4hn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This parameter in general is just a way to simulate soft limits, which should be avoided, but can be moved out of. I would love to have support for them in MoveIt generally, but that's a bigger effort...

moveit_ros/moveit_servo/src/servo_parameters.cpp Outdated Show resolved Hide resolved
@henningkayser henningkayser merged commit 105a3c1 into moveit:main Jun 30, 2021
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

Successfully merging this pull request may close these issues.

None yet

7 participants