Allow customization of contact surface properties#267
Allow customization of contact surface properties#267azeey merged 16 commits intogazebosim:ign-physics2from
Conversation
|
Videos of ign-gazebo implementation (they only work in Chrome, I don't know why). ign-tracked1.mp4.mp4ign-tracked2.mp4.mp4ign-tracked3.mp4.mp4ign-tracked4.mp4.mp4 |
| public: template <typename PolicyT, typename FeaturesT> | ||
| class World : public virtual Feature::World<PolicyT, FeaturesT> | ||
| { | ||
| public: using JointPtrType = JointPtr<PolicyT, FeaturesT>; |
There was a problem hiding this comment.
nit: type alias not used anywhere.
There was a problem hiding this comment.
I think JointPtrType hasn't been removed but is unused
|
I updated this PR to work with the latest changes in DART, and I addressed the two issues found in review. |
|
I think we can actually target |
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
c36c165 to
2789011
Compare
Codecov Report
@@ Coverage Diff @@
## ign-physics2 #267 +/- ##
================================================
+ Coverage 83.16% 83.23% +0.07%
================================================
Files 106 108 +2
Lines 4051 4158 +107
================================================
+ Hits 3369 3461 +92
- Misses 682 697 +15
Continue to review full report at Codecov.
|
This allows CI to pass on Focal. Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
…zation. Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
|
I started working on adding the tests, but got stuck for some time because CMake told me DART does not support contact surface customization (even after resetting cache). Please check be31da3 which fixed it for me. |
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
|
I extended the I ran the changed test with both A few things surprised me, but are not necessarily wrong:
|
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Yes, I was working on that last week and came to the same fix, I just hadn't pushed. I thought it was working properly before this fix, but I realized I was seeing the cached results. |
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
|
The logs from the macOS build showed |
| if (!warnedSecondaryRollingFrictionCoeff && | ||
| pIgn.secondaryRollingFrictionCoeff) | ||
| { | ||
| ignwarn << "DART doesn't support secondary rolling friction setting" |
There was a problem hiding this comment.
one of my goals for the Feature system is that physics engine plugins can express what they do and do not implement, so you don't have to rely on console messages like this one. I discussed this with @azeey, and I think the API based on contact callback functions and single struct data structure make sense for performance reasons, so I wouldn't try to change that. I do, however, think that we could add Features to signal which parameters a physics engine claims to support. I will create an issue for this.
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
azeey
left a comment
There was a problem hiding this comment.
This is great! Thanks for the contribution!
scpeters
left a comment
There was a problem hiding this comment.
my apologies for all these renaming requests, but I'd like to see Joint removed from the Feature and header file name, since while some physics engines treat contacts as joints, not all do
so please rename to include/ignition/physics/ContactProperties.hh and SetContactPropertiesCallbackFeature
| public: template <typename PolicyT, typename FeaturesT> | ||
| class World : public virtual Feature::World<PolicyT, FeaturesT> | ||
| { | ||
| public: using JointPtrType = JointPtr<PolicyT, FeaturesT>; |
There was a problem hiding this comment.
I think JointPtrType hasn't been removed but is unused
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
|
That's okay, it makes sense to not mention the joint if it's not called like that everywhere. |
|
Thanks for getting this merged! Should the followup Gazebo part also target Citadel, or will we keep it targeted at Dome? |
|
Yes, targetting Citadel would be great if possible. |
🎉 New feature
Closes #15, #82
Depends on gazebo-forks/dart#22 .
Is needed for gazebosim/gz-sim#869 and osrf/subt#958.
Summary
This PR adds support for registering callbacks that modify properties of all contact joints generated by the dynamics engine. Example implementation for DART is provided.
This feature might be highly useful for DARPA SubT virtual challenge to allow implementation of a proper track drivetrain.
Test it
Testing is best done by running some of the ign-gazebo examples added in PR #TODO .
Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge