| sim_models: introduce scene compiler and pick_banana Gazebo scene
Add sim_models as an ament Python package providing scene assets and a
scene compiler API for simulation backends.
scene_compiler.py exposes 4 public functions:
- get_scene_file(name, platform): return template file path
- get_gazebo_world_path(name): generate /tmp/ world with absolute mesh URIs
- get_mujoco_scene_path(name, robot_xml_path): generate /tmp/ MJCF for MuJoCo
- get_scene_layout(name): return parsed layout.yaml dict
pick_banana scene includes bluetable, plate, banana and green curtain with 6
OBJ mesh assets reused from mujoco_ros2_control_so101. Coordinate system is
aligned with MuJoCo: ground_plane at z=-0.274 (visible floor), invisible
table_surface_collision plane at z=0 so dynamic objects settle on the table.
layout.yaml carries a robot_spawn field so the scene (not the robot config)
owns the per-scene spawn Z offset. GazeboAdapter.start_backend() reads
simulation.scene from the robot YAML, calls get_gazebo_world_path() to
obtain the resolved world file, and applies robot_spawn.{x,y,z} to
override initial_pose values before spawning the robot entity.
Enable pick_banana in so101_single_arm.yaml (previously null).
Signed-off-by: grangerxsp <xingshiping@huawei.com>
| 2 个月前 |