-
Notifications
You must be signed in to change notification settings - Fork 41
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
Allow customization of contact surface properties #267
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: type alias not used anywhere.
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.
removed
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.
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 <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
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 <[email protected]>
…zation. Signed-off-by: Martin Pecka <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Feature
s to signal which parameters a physics engine claims to support. I will create an issue for this.
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.
Signed-off-by: Martin Pecka <[email protected]>
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 is great! Thanks for the contribution!
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think JointPtrType
hasn't been removed but is unused
Signed-off-by: Martin Pecka <[email protected]>
Signed-off-by: Martin Pecka <[email protected]>
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
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge