-
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
Query ExtraContactData in gz-sim 2 gz-physics interface #2050
Query ExtraContactData in gz-sim 2 gz-physics interface #2050
Conversation
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.
Thanks for the contribution! I mostly have minor things to address. I'd also ask if you could add a test in test/integration/physics_system.cc
.
Could also signoff your commits (See the DCO section in https://gazebosim.org/docs/garden/contributing#process) |
Regarding the test: Since I'm effectively testing message transport e.g. whether messages are filled and published correctly, should it still be added to |
Good point. |
cb59b81
to
7607b33
Compare
Now the EntityContactMap contains a deque of pairs of ContactPoint and ExtraContactData. That way the messages can be populated with Normals, Forces, and Depth. The force on body 2 is equal and opposite to the force on body 1. Fixes Issue gazebosim#2037 Signed-off-by: Anton Bredenbeck <[email protected]>
- snake_case -> camelCase - check whether contactExtraData is not nullptr before accessing Signed-off-by: Anton Bredenbeck <[email protected]>
Signed-off-by: Anton Bredenbeck <[email protected]>
Signed-off-by: Anton Bredenbeck <[email protected]>
Signed-off-by: Anton Bredenbeck <[email protected]>
7607b33
to
9c157be
Compare
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! Just one more style issue.
Also, I think the test ActorFixture.ActorTrajectoryNoMesh is flaky. /cc @iche033.
Signed-off-by: Anton Bredenbeck <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-sim7 #2050 +/- ##
========================================
Coverage 65.00% 65.01%
========================================
Files 354 354
Lines 28667 28688 +21
========================================
+ Hits 18636 18651 +15
- Misses 10031 10037 +6
|
All the CI failures seem unrelated. Merging! |
🦟 Bug fix
Fixes #2037
Summary
Previously the data contained by the ContactSensorPlugin did not include ExtraContactData. Now the message is also populated with this data.
Now the EntityContactMap contains a deque of pairs of ContactPoint and ExtraContactData. That way the messages can be populated with Normals, Forces, and Depth. The force on body 2 is equal and opposite to the force on body 1.
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.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸