=============
Scene Examples
=============
This section provides complete examples of scene composition using the DexRobot MuJoCo components.
Box Manipulation Scene
-------------------
A scene with a floating hand manipulating a box on a table (box.xml):
.. code-block:: xml
Ball Catching Scene
----------------
A scene for ball catching experiments (ball_catching.xml):
.. code-block:: xml
Usage Notes
---------
Scene Configuration
^^^^^^^^^^^^^^^
Each scene has a corresponding YAML configuration file:
.. code-block:: yaml
# ball_catching.yaml
camera:
azimuth: -180
distance: 2.5
elevation: -25
lookat: [0.0, 0.0, 0.55]
tracked_joints:
- [ARTx, ARTy, ARTz]
- [ARRx, ARRy, ARRz]
- [r_f_joint1_1, r_f_joint1_2, r_f_joint1_3, r_f_joint1_4]
# ... additional joints ...
initial_qpos_freejoint:
ball_joint: [2.0, -0.2, 0.0, 1.0, 0.0, 0.0, 0.0]
initial_qvel_freejoint:
ball_joint: [-4.1, 0.0, 4.1, 0.0, 0.0, 0.0]
Running Scenes
^^^^^^^^^^^
Launch with configuration:
.. code-block:: bash
# Box manipulation
python nodes/dexrobot_mujoco_ros.py \
dexrobot_mujoco/scenes/box.xml \
--config config/scene_default.yaml
# Ball catching
python nodes/dexrobot_mujoco_ros.py \
dexrobot_mujoco/scenes/ball_catching.xml \
--config config/ball_catching.yaml
Common Patterns
------------
1. Asset Organization
- Include defaults first
- Group related assets
- Order from environment to specific components
2. Body Hierarchy
- Position static elements first
- Group related components
- Consider interaction spaces
3. Component Inclusion
- Keep actuators together
- Include all required sensors
- Configure contact properties
4. Scene Configuration
- Use YAML for runtime settings
- Configure tracked elements
- Set initial states
Next Steps
---------
- Review :doc:`composition` for composition techniques
- Study :doc:`furniture` for available components
- Explore :doc:`scenery` for environment options