Gazebo | Ignition | Community
Ask Your Question
0

Gazebo sim code concepts

asked 2023-03-28 03:31:49 -0600

jrtg gravatar image

Dear all,

I was looking into the conveyor demo and specifically why it didn't work. As it turns out it is due to a patch not having been merged until dart6.13.

Anyway, before I realized that I had been looking extensively at the source code, and there's a certain mechanism I'd like to understand better:

Given a dart version < 6.13, DART_HAS_CONTACT_SURFACE is not set, so this featurelist does not contain SetContactPropertiesCallbackFeature, and consequentially neither the DartsimFeatures.

This results in this EntityCast returning nullptr.

Can anyone clarify this a bit?

It seems that:

I didn't dig into that further, as it is rather hard to read (for me at least :-) and it answers the how is the cast done question, but not where is the relation between the world entity and the DartsimFeatures defined?

I think this might be it, but I don't see how the worldPtrPhys is linked to the DartsimFeatures.

Can anyone clarify this?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-03-28 14:09:02 -0600

azeey gravatar image

EntityFeatureMapis a helper class to check if a physics entity has required and optional features. The list of optional features can be found at https://github.com/gazebosim/gz-sim/b....

For the World gz-physics entity, for example, the gz-sim Physics system has

  public: using WorldEntityMap = EntityFeatureMap3d<
          physics::World,
          MinimumFeatureList,
          CollisionFeatureList,
          ContactFeatureList,
          SetContactPropertiesCallbackFeatureList,
          NestedModelFeatureList,
          CollisionDetectorFeatureList,
          SolverFeatureList>;

Which says, the World entity, has the required features listed in MinimumFeatureList, and the rest are optional features.

edit flag offensive delete link more

Comments

Thanks, I'll have a deeper look based on that info.

jrtg gravatar imagejrtg ( 2023-03-30 05:40:12 -0600 )edit
0

answered 2023-08-02 05:13:28 -0600

jrtg gravatar image

More or less by coincidence, I found this community meeting recording in which an overview is given of the concepts of gz-physics.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-03-28 03:31:49 -0600

Seen: 182 times

Last updated: Aug 02 '23