How to stop a robot when crossing a laserscanner?

asked 2019-06-24 08:21:33 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hey i´m not very experienced in ROS an Gazebo, but i wanted to ask if somebody could maybe help me. I´m using the workspace from a gazebo tutorial in which a laserscanner can be used. You can find the workspace under this link: link text . I placed the Laserscanner in front of the RRBot and in the air. I changed the origin and set the parent link to "world" so that the laser is no longer attached to the robot. I would like to have a message or a topic, that can make the robot stop when it crosses the "light barrier" from the laserscanner.

<joint name="hokuyo_joint" type="fixed">
<axis xyz="0 0 0" />
<origin xyz="1.0 0 2.5" rpy="0 -300 0"/>
<parent link="world"/>
<child link="hokuyo_link"/>

<!-- Hokuyo Laser -->
<link name="hokuyo_link">
  <origin xyz="0 0 0" rpy="0 0 0"/>
<box size="0.1 0.1 0.1"/>

  <origin xyz="0 0 0" rpy="0 0 0"/>
    <mesh filename="package://rrbot_description/meshes/hokuyo.dae"/>

  <mass value="1e-5" />
  <origin xyz="0 0 0" rpy="0 0 0"/>
  <inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
edit retag flag offensive close merge delete