Skip to content

Instantly share code, notes, and snippets.

@tik0
Created June 20, 2019 00:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tik0/f1b64380c40f6e0de705615c14c7f22d to your computer and use it in GitHub Desktop.
Save tik0/f1b64380c40f6e0de705615c14c7f22d to your computer and use it in GitHub Desktop.
Gazebo collide without contact
<sdf version='1.4'>
<world name='default'>
<!-- include sun and ground plane -->
<include><uri>model://sun</uri></include>
<include><uri>model://ground_plane</uri></include>
<model name="sensor_box">
<static>true</static>
<link name="link">
<pose>0 0 0.251 0 0 0</pose>
<collision name="collision">
<max_contacts>1</max_contacts>
<geometry>
<box>
<size>4 4 0.5</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>4 4 0.5</size>
</box>
</geometry>
<material><script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script></material>
</visual>
<sensor name="box_contact" type="contact">
<always_on>true</always_on>
<update_rate>1000</update_rate>
<contact>
<collision>collision</collision>
</contact>
</sensor>
</link>
</model>
<model name='contact_box'>
<pose>0.0 -1.0 1.5 0 0 0</pose>
<allow_auto_disable>false</allow_auto_disable>
<link name='link'>
<collision name='collision'>
<geometry>
<box>
<size>1.0 1.0 1.0</size>
</box>
</geometry>
<surface>
<contact>
<collide_without_contact>false</collide_without_contact>
</contact>
</surface>
</collision>
<visual name='visual'>
<geometry>
<box>
<size>1.0 1.0 1.0</size>
</box>
</geometry>
<material><script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script></material>
</visual>
</link>
</model>
<model name='collide_box'>
<pose>0.0 1.0 1.5 0 0 0</pose>
<allow_auto_disable>false</allow_auto_disable>
<link name='link'>
<collision name='collision'>
<geometry>
<box>
<size>1.0 1.0 1.0</size>
</box>
</geometry>
<surface>
<contact>
<collide_without_contact>true</collide_without_contact>
</contact>
</surface>
</collision>
<visual name='visual'>
<geometry>
<box>
<size>1.0 1.0 1.0</size>
</box>
</geometry>
<material><script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script></material>
</visual>
</link>
</model>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose>6.5 0.0 1.5 0.0 0.0 -3.14159</pose>
<view_controller>orbit</view_controller>
</camera>
</gui>
</world>
</sdf>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment