参考:GAZEBO探索——给机器人加上bumper_gazebo bumper-CSDN博客
gazebo的bumper使用_gazebo bumper-CSDN博客
使用URDF在Gazebo中搭建碰撞仿真(bumper)_gazebo bumper-CSDN博客
gazebo官网中bumper插件介绍
Gazebo : Tutorial : Gazebo plugins in ROS
添加的到.urdf文件中的代码,参考了"pr2.urdf"文件pycram/resources/robots/pr2.urdf at c2ec6fa803382a25dd04113bc536f11a9e6c7ba4 · cram2/pycram · GitHub
<!-- Gazebo 碰撞检测插件 -->
<gazebo reference="base_link">
<sensor name="bumper" type="contact">
<update_rate>30.0</update_rate>
<always_on>true</always_on>
<contact>
<collision>base_link_fixed_joint_lump__quadcotper__collision_collision</collision>
</contact>
<plugin name="gazebo_ros_bumper_controller" filename="libgazebo_ros_bumper.so">
<alwaysOn>true</alwaysOn>
<updateRate>30.0</updateRate>
<bumperTopicName>bumper_states</bumperTopicName>
<frameName>bumper_link</frameName>
<visualize>true</visualize>
</plugin>
</sensor>
</gazebo>