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 stuck passive joints #237

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Fix stuck passive joints #237

merged 2 commits into from
Oct 4, 2023

Conversation

huemerj
Copy link
Contributor

@huemerj huemerj commented Oct 4, 2023

As mentioned in #235 and #219, a problem with passive joints was introduced by the following code line:

} else {
// Fallback case is a velocity command of zero
this->dataPtr->sim_joints_[j]->SetVelocity(0, 0.0);
}

As suggested by @destogl, I added a vector with flags which indicates if a joint is active (has command interfaces) or passive and subsequently sets the velocity to zero or not.

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. I tested this with the pendulum from #172, it is working again!

Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

Do you have any plans to port this to gz_ros_control? If you don't have time, I can do it

@ahcorde ahcorde merged commit 5dba0f9 into ros-controls:master Oct 4, 2023
5 checks passed
@ahcorde
Copy link
Collaborator

ahcorde commented Oct 4, 2023

https://github.com/Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Oct 4, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 4, 2023
(cherry picked from commit 5dba0f9)
ahcorde pushed a commit that referenced this pull request Oct 4, 2023
(cherry picked from commit 5dba0f9)

Co-authored-by: Johannes Huemer <[email protected]>
@huemerj
Copy link
Contributor Author

huemerj commented Oct 4, 2023

Do you have any plans to port this to gz_ros_control? If you don't have time, I can do it

I will have to set up / convert an example with passive joint for gz_sim, but I can do that.

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.

3 participants