Skip to content

Instantly share code, notes, and snippets.

@iche033
Created November 14, 2023 00:56
Show Gist options
  • Save iche033/dd30ba98d92fde02a643fa94c5e2f6a9 to your computer and use it in GitHub Desktop.
Save iche033/dd30ba98d92fde02a643fa94c5e2f6a9 to your computer and use it in GitHub Desktop.
nested.sdf
<?xml version="1.0" ?>
<sdf version="1.7">
<world name="nested_model_world">
<physics name="1ms" type="ignored">
<max_step_size>0.001</max_step_size>
<real_time_factor>1.0</real_time_factor>
</physics>
<plugin
filename="gz-sim-physics-system"
name="gz::sim::systems::Physics">
</plugin>
<plugin
filename="gz-sim-user-commands-system"
name="gz::sim::systems::UserCommands">
</plugin>
<plugin
filename="gz-sim-scene-broadcaster-system"
name="gz::sim::systems::SceneBroadcaster">
</plugin>
<scene>
<ambient>1.0 1.0 1.0</ambient>
<background>0.8 0.8 0.8</background>
</scene>
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
</collision>
<visual name="visual">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<ambient>0.8 0.8 0.8 1</ambient>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
</material>
</visual>
</link>
</model>
<model name="model_00">
<pose>0 0 0.5 0 0 0</pose>
<link name="link_00">
<pose>0 0 1 0 0 0</pose>
<collision name="collision_00">
<geometry>
<sphere>
<radius>0.5</radius>
</sphere>
</geometry>
</collision>
<visual name="visual_00">
<geometry>
<sphere>
<radius>0.5</radius>
</sphere>
</geometry>
</visual>
</link>
<model name="model_01">
<pose>0 0 2.0 0 0 0</pose>
<link name="link_11">
<pose>0.0 0.5 0.0 0 0 0.0</pose>
<collision name="collision_01">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual_01">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
<link name="link_21">
<pose>0.0 0.5 1.5 0 0 0.0</pose>
<collision name="collision_01">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual_01">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
<joint name="model_joint" type="prismatic">
<parent>link_11</parent>
<child>link_21</child>
<axis>
<limit>
<lower>-1.0</lower>
<upper>1</upper>
</limit>
<xyz>0 0 1</xyz>
</axis>
</joint>
</model>
<joint name="model_joint" type="prismatic">
<parent>link_00</parent>
<child>model_01::link_11</child>
<axis>
<limit>
<lower>-1.0</lower>
<upper>1</upper>
</limit>
<xyz>0 0 1</xyz>
</axis>
</joint>
</model>
</world>
</sdf>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment