-
Notifications
You must be signed in to change notification settings - Fork 277
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
Support nested joints in JointPositionController #1851
Support nested joints in JointPositionController #1851
Conversation
src/systems/joint_position_controller/JointPositionController.cc
Outdated
Show resolved
Hide resolved
src/systems/joint_position_controller/JointPositionController.cc
Outdated
Show resolved
Hide resolved
src/systems/joint_position_controller/JointPositionController.cc
Outdated
Show resolved
Hide resolved
Any chance we could add a test (since we already have a SDF that can replicate this issue)? |
@arjo129 do you mean use the example provided in gazebosim/gz-physics#464 in a c++ unit test? Should be able to do that. The physics PR has been rewritten following review suggestions, so would be good to have the updated approach reviewed and agreed before finalising tests for this PR. |
@srmainwaring, that is correct. Itd be great if the example could be added to our integration tests. |
@arjo129 - I'll put something together. The world file might also be worth adding to gz-sim/examples/worlds with a tutorial to accompany it. Any thoughts on the dependency gazebosim/gz-physics#464? |
1b66900
to
908e394
Compare
Codecov Report
@@ Coverage Diff @@
## gz-sim7 #1851 +/- ##
===========================================
- Coverage 64.57% 64.57% -0.01%
===========================================
Files 344 344
Lines 27578 27590 +12
===========================================
+ Hits 17808 17815 +7
- Misses 9770 9775 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
908e394
to
8029cfd
Compare
Rebased on gz-sim7 to include #1861. |
294d43d
to
85c9bae
Compare
@ahcorde added test case for the joints in nested models. The upstream dependency in gz-physics has been approved - just waiting for it to be merged. |
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.
LGTM! I'll work on making a release of gz-physics for this.
src/systems/joint_position_controller/JointPositionController.cc
Outdated
Show resolved
Hide resolved
- Attempt to resolve by scoped name first. - Replace static variable by member in private data. Signed-off-by: Rhys Mainwaring <[email protected]> 2. Adopt review suggestions. Co-authored-by: Alejandro Hernández Cordero <[email protected]> 3. JointPosController: support nested joints - Add example world containing nested models with position controlled joints. Signed-off-by: Rhys Mainwaring <[email protected]> - Fix build warning - remove trailing whitespace. Signed-off-by: Rhys Mainwaring <[email protected]> 4. JointPosController: support nested joints - Add test for joint position controller with nested models. - Update PID gains in example worlds model. Signed-off-by: Rhys Mainwaring <[email protected]> 5. JointPosController: support nested joints - Review feedback - remove redundant check. Signed-off-by: Rhys Mainwaring <[email protected]>
36d8eb2
to
0a4fb74
Compare
Physics 6.3.0 is out. |
@osrf-jenkins retest this please |
Homebrew bottles are still being built: osrf/homebrew-simulation#2194 |
Okay, the tests are passing on macOS: . @ahcorde any remaining issues? |
None of the CI failures appear to be caused by this PR. Merging. |
🦟 Bug fix
Partially Fixes #1844
Summary
The details of the bug and how to reproduce it are documented in gz-sim: #1844.
This PR enables the
JointPositionController
plugin to search for scoped joint names as well as unscoped ones. The approach is similar to that used in the Buoyancy plugin.For the change to take effect the upstream change in gazebosim/gz-physics#464 is also required.
Context
The use case for this change is to be able to include standalone models for peripherals such as https://app.gazebosim.org/OpenRobotics/fuel/models/Gimbal%20Small%202D in a standard vehicle frame such as https://app.gazebosim.org/OpenRobotics/fuel/models/Iris%20with%20Standoffs and then configure the
JointPositionController
at the top level for joint control.The only way the position controller will work at present is to copy the elements from gimbal model into the quadcopter model (renaming any duplicated joints and links). This is inconvenient but possible for PoC but does not scale well.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.