Change mj_ray behaviour to match geom visualisation conventions:

- Planes and height-fields respect `mj_ray`'s `geom_group` argument.
- The `flg_static` argument now applies to all static geoms, not only those directly in the world body.

Before this change:
- Rays always intersected with height fields and planes, unless `flg_static` was set to 0.
- `flg_static` only applied to static geoms that were direct children of the world, but not geoms that were children of static bodies.

PiperOrigin-RevId: 534969091
Change-Id: I8dc7c320c63d6af95709b9f5e83a3c50e1c199fa
This commit is contained in:
Yuval Tassa
2023-05-24 13:50:32 -07:00
committed by Copybara-Service
parent 55c7f45dc5
commit c66d79409c
3 changed files with 23 additions and 25 deletions
+2 -2
View File
@@ -39,10 +39,10 @@ static constexpr char kSingleGeomModel[] = R"(
static constexpr char kRayCastingModel[] = R"(
<mujoco>
<worldbody>
<geom name="static_group1" type="sphere" size=".1" pos="1 0 0"
group="1"/>
<geom name="static_group1" type="sphere" size=".1" pos="1 0 0" group="1"/>
<body pos="0 0 0">
<body pos="0 0 0">
<joint/>
<geom name="group0" type="sphere" size=".1" pos="3 0 0"/>
</body>
<geom name="group2" type="sphere" size=".1" pos="5 0 0" group="2"/>