Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Multiple Ray Sensors - Interference?

Hi there,

I added multiple single ray sensors to my robot using the appended xacro. I then instantiated three of them, one in the middle, one to the right and one to the left, I appended the code for that too.

The problem is: somehow the left and the right sensor are affected by the one in the middle. If the one in the middle is detecting something, than also the others show the same values. Furthermore: the sensor to the left and the one to the right do have a really strange behaviour, let me show that to you:

image description C:\fakepath\Screen Capture_select-area_20200522223754.gif

It looks like those three sensors somehoe interfere internally - but why?

<xacro:macro name="distance_sensor" params="link_name parent_name mass radius height xyz rpy min_angle max_angle">

<link name="${link_name}">

      <origin xyz="0 0 0" rpy="0 0 0"/>
      <mass value="${mass}" />
      <xacro:cylinder_inertia m="0.01" r="${radius}" h="${height}" />

      <origin xyz="0 0 0" rpy="${rpy}"/>
        <cylinder radius="${radius}" length="${height}"/>
      <material name="sensor_red" />

      <origin xyz="0 0 0" rpy="${rpy}" />
        <cylinder radius="${radius}" length="${height}"/>


<joint name="joint_${link_name}" type="fixed">
  <origin xyz="${xyz}" rpy="0 0 0"/>
  <parent link="${parent_name}"/>
  <child link="${link_name}"/>

<gazebo reference="${link_name}">


  <sensor type="ray" name="${link_name}_sensor">


    <plugin name="${link_name}_controller" filename="">



      <!-- Laser Range Finder Bricklet (Tinkerforge) -->
        <min>0.1</min> <!-- 0.05 -->






  <!-- Laser Sensors -->
      mass="0.01" radius="0.015" height="0.1"
      xyz="0.25 0 0" rpy="0.00 1.5708 0.00"
      min_angle="0" max_angle="0"

  <!-- US Sensor Left -->
      mass="0.01" radius="0.015" height="0.1"
      xyz="0.25 0.05 0" rpy="-1.0472 1.5708 0.00"
      min_angle="60" max_angle="60"

  <!-- US Sensor Right -->
      mass="0.01" radius="0.015" height="0.1"
      xyz="0.25 -0.05 0" rpy="1.0472 1.5708 0.00"
      min_angle="-60" max_angle="-60"