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

Fix sagging robots in position control #213

Merged

Conversation

gwalck
Copy link
Contributor

@gwalck gwalck commented Jun 23, 2023

Following up with my remarks on #177 (comment) and a request for a PR.

summary: in the discussion of the reset pos/vel commands it is said that setting position/velocity for joints is overriding physics, and should generally not be used,

I know from past experience with enforcing pose of an object at each time step was not sufficient to hold it in place (drift), velocity had to be set to zero as well. I immediately related the joint sagging issue to that pose drift.

Solution is to set zero velocity as well for that time step. Setting velocity to zero after fixing position is another override that stabilizes the physics and is unrelated to any robot physics.

here is a before and after on 2 robots

ur_broken.mp4
ur_fixed.mp4
kuka_broken.mp4
kuka_fixed.mp4

Other solutions have used max efforts or adding high damping (which probably essentially set velocity to zero)

I believe this PR should therefore fix the following issues without requiring dynamics parameters.

#90
#73
UniversalRobots/Universal_Robots_ROS2_Gazebo_Simulation#19

@ahcorde ahcorde self-assigned this Jun 23, 2023
@ahcorde ahcorde merged commit 3e95061 into ros-controls:master Jun 23, 2023
@ahcorde
Copy link
Collaborator

ahcorde commented Jun 23, 2023

https://github.com/Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Jun 23, 2023

backport humble

✅ Backports have been created

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.

2 participants