June 2018
Beginner to intermediate
280 pages
6h 58m
English
Here is the code snippet for the contact sensor on our robot. If the base of the robot collides with any objects, this plugin will trigger. It is commonly attached to the base_link of the robot, so whenever the bumper hits any object, this sensor will be triggered:
<gazebo reference="base_link">
<mu1>0.3</mu1>
<mu2>0.3</mu2>
<sensor type="contact" name="bumpers">
<always_on>1</always_on>
<update_rate>50.0</update_rate>
<visualize>true</visualize>
<contact>
<collision>base_footprint_collision_base_link</collision>
</contact>
</sensor>
</gazebo>