Description
Question
Why in the world is this new syntax necessary?
(the classes RigidObject
and RigidObjectConf
)
It's counter-intuitive for beginners (like myself) who are reading the docs.
(scroll in the code snippets below to see the whole snippet)
The tutorial:
doesn't explain the functional advantage of it over the method introduced just in the previous tutorial: spawn_prims.py,
doesn't help understand the necessity / purpose of this design over the previous method.
In other words, why not have simply this,
instead of using the RigidObject
and RigidObjectCfg
classes:
# Rigid Object
cone_cfg = sim_utils.ConeCfg(
radius=0.1,
height=0.2,
rigid_props=sim_utils.RigidBodyPropertiesCfg(),
mass_props=sim_utils.MassPropertiesCfg(mass=1.0),
collision_props=sim_utils.CollisionPropertiesCfg(),
visual_material=sim_utils.PreviewSurfaceCfg(diffuse_color=(0.0, 1.0, 0.0), metallic=0.2),
)
cfg_cone_rigid.func(
"/World/Origin.*/Cone", cfg_cone_rigid
)
The only thing that's missing here is: init_state=RigidObjectCfg.InitialStateCfg()
.
But is it really the only reason to use a completely new syntax for rigid object definition?
Can't the init_state
be passed into sim_utils.ConeCfg
or cfg_cone_rigid.func
for example?
If really the RigidObject(RigidObjectCfg)
method should be used - then maybe put a warning into the spawn_prims.py tutorial, saying that rigid body created like that would be missing critical abilities?
Acceptance criteria
Either:
- The docs explain this
- API is simplified / the tutorial doesn't use the verbose method