test_objects
- test_objects.test_adaptive_free_joint_translation_tolerances_are_stage_independent()[source]
Tests MJScene zeroes relTol only for free-joint translation records.
The relative-tolerance conditioning fix applies to any free-joint body at orbital scale, independent of how its gravity is applied, so the presence of a free body (
cubehere) alone should trigger it.
- test_objects.test_body_borrowed_site_proxy_keeps_owner_chain_alive(proxy_case, expected_name)[source]
A borrowed site retains its body, which in turn retains the scene.
- test_objects.test_geometry_rgba_matches_mujoco_material_precedence(geom_attributes, material_rgba, expected_rgba)[source]
Export material color and alpha unless the geom has non-default RGBA.
MuJoCo treats explicit default gray like omitted RGBA, but a change to any channel (including alpha alone) overrides all four material channels. A second material ensures the export follows the geom’s material index.
- test_objects.test_scene_borrowed_proxy_keeps_scene_alive(proxy_case)[source]
Each borrowed scene result independently retains its native owner.
- test_objects.test_unnamed_body_introspection(root_name)[source]
Body, parent, and geometry names agree before initialization and after reset.
Cover unnamed roots and children, a named child of an unnamed parent, and explicit names that would otherwise collide with generated names. Creating another scene must not change the generated names for identical XML.