-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add force offset support to ApplyLinkWrench system and to Link API #2026
Conversation
Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
Codecov Report
@@ Coverage Diff @@
## gz-sim7 #2026 +/- ##
========================================
Coverage 65.07% 65.08%
========================================
Files 354 354
Lines 28720 28741 +21
========================================
+ Hits 18690 18705 +15
- Misses 10030 10036 +6
|
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.
can you add a test to this new method?
Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
Added a test in 34101f7. Since there already was a |
@osrf-jenkins run tests please |
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.
Works for me
Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
@@ -80,16 +80,17 @@ class gz::sim::systems::ApplyLinkWrenchPrivate | |||
/// \param[in] _msg Entity message. If it's a link, that link is returned. If | |||
/// it's a model, its canonical link is returned. | |||
/// \param[out] Force to apply. | |||
/// \param[out] Offset of the force application point relative to the |
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.
This implies that the offset in msgs::EntityWrench
and by association, in the component::ExternalWorldWrench
. is relative to the COM, but the point of application is the link origin. Am I right? If so, I think we should avoid having two different reference points. If the point of application is the link origin, the offset should also be from the link origin.
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.
Changed in ee693bc so that the Link API and the ApplyLinkWrench system interpret the offset in the link frame. This way, the semantics of the offset are consistent between them, the msgs::EntityWrench
message and the component::ExternalWorldWrench
component.
Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
Signed-off-by: Henrique-BO <henrique.barrosoliveira@usp.br>
The windows node was killed after building for 3 hours (https://build.osrfoundation.org/job/ign_gazebo-pr-win/5927/). Going to merge without it. /cc @j-rivero. |
🎉 New feature
Summary
Adds support for specifying the application point of a force in the ApplyLinkWrench system. This is done through an offset expressed in the link frame (thus, relative to the link origin).
This uses the
force_offset
field that was already present in the Wrench message, but wasn't being used in the system. Also, an overloaded methodAddWorldWrench
was added to the Link interface.Test it
Open a test world that has the ApplyLinkWrench system:
Send a message to the
/world/<world_name>/wrench
topic: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.