-
Notifications
You must be signed in to change notification settings - Fork 307
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
Enforcing position limits in the VelocityJointSaturationHandle. #264
base: kinetic-devel
Are you sure you want to change the base?
Enforcing position limits in the VelocityJointSaturationHandle. #264
Conversation
I'm not too deep into the limit interfaces but this looks reasonable at first glance. Anyone up for a second glance? @efernandez @davetcoleman @ipa-mdl @ipa-fxm ? |
Why don't you use At first glance your implementation might reverse the velocity at the boundaries. |
@bmagyar @ipa-mdl thanks for the quick and constructive comments! I did not choose to use Why is the Regarding "your implementation might reverse the velocity at the boundaries", I am not sure what exactly you mean. Could you please provide an example? Then, I can try to improve the pull request. Again, thank you for your feedback! :) |
Your code replicates the behaviour with
Your code does not cover the overshoot case properly.
|
I think I side with @airballking that, even if the resulting behavior is not ideal, having position limits for the velocity joint saturation handle is important. I'd rather have a hard stop than no stop at all. I also think its inconsistent that the effort saturation handle has a hard stop position limit but velocity does not. @ipa-mdl it sounds like your bigger issue is that the non-soft saturation handles exist all for all of the control types. I agree that non-soft is far less ideal and should be avoided, but if they exist they should do as promised and prevent your joint from going beyond its limits. This functionality is especially helpful for simulation, the origin of this issue. |
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 your concept but I think the implementation is wrong for the general case
// Velocity bounds depend on the velocity limit and the proximity to the position limit. | ||
const double pos = jh_.getPosition(); | ||
vel_low = saturate(limits_.min_position - pos, -limits_.max_velocity, limits_.max_velocity); | ||
vel_high = saturate(limits_.max_position - pos, -limits_.max_velocity, limits_.max_velocity); |
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.
these two lines seem like they have incorrect behavior... I think you copied these from the PositionJointSoftLimitsHandle but flipped the subtraction of the position and position limit, resulting in incorrect units being used / arbitrary values.
I would assume you want a hard-stop position limit like how the effort is implemented, here
Hi, |
The
VelocityJointSaturationHandle
does not enforce position limits. I think it should. I implemented a fix that is similar to the way that theVelocityJointSoftLimitsHandle
enforces position limits.Note: I implemented this to have proper joint limit enforcing in
ros_control_boilerplate
when using velocity-resolved simulation mode. My fix for PickNikRobotics/ros_control_boilerplate#8 needs this pull request.