mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

Defaults/Classes for Body elements

Open JeanElsner opened this issue 3 years ago • 2 comments

Adding classes/defaults for body elements could make some MJCF models more compact. This could be used to set the gravcomp attribute for a kinematic chain for instance using the childclass attribute. Otherwise gravcomp has to be defined on every body of the chain.

JeanElsner avatar Dec 22 '22 12:12 JeanElsner

+1

kevinzakka avatar May 10 '23 17:05 kevinzakka

Yes, both bodies and sensors currently don't support defaults. This is a legitimate feature request.

yuvaltassa avatar May 12 '23 10:05 yuvaltassa

This is unfortunately infeasible or rather, very hard. The "class" attribute of bodies is being reused for "childclass", so there is no way (without a significant refactor) to implement this.

yuvaltassa avatar Sep 04 '24 18:09 yuvaltassa