Informative error if mis-naming the top-level default class.

Also:
- Move the the top-level default class name into the mjCModel constructor.
- Fix bug in default class propagation in frame elements.
PiperOrigin-RevId: 646384669
Change-Id: Icc6154124361a234b84a07e2b5ecaa7c8b18ebf7
This commit is contained in:
Yuval Tassa
2024-06-25 01:45:10 -07:00
committed by Copybara-Service
parent 9e9a0c637e
commit d8b85245a7
4 changed files with 86 additions and 8 deletions
+4 -2
View File
@@ -727,8 +727,10 @@ TEST_F(XMLWriterTest, WritesActuatorDefaults) {
TEST_F(XMLWriterTest, WritesFrameDefaults) {
static constexpr char xml[] = R"(
<mujoco>
<default class="dframe">
<geom size=".1"/>
<default>
<default class="dframe">
<geom size=".1"/>
</default>
</default>
<worldbody>