Gazebo | Ignition | Community
Ask Your Question
0

No impact of laser_retro when using ray sensor.

asked 2020-04-23 17:10:47 -0500

relffok gravatar image

updated 2020-04-23 19:29:17 -0500

I feel like I don't understand the laser_retroparameter of a collision object (http://sdformat.org/spec?ver=1.6&elem...).

I don't see any impact of changing the laser_retro parameter. The scan output is the same and also the visualization looks the same to me (when checking the parameter in gazebo GUI, it is set correctly). What exactly is the use of this parameter? I was hoping, that I could decide wheter a collision reflects a ray of a laser scan or not (to make some collisions invisible for the sensor).

I created the following sdf to play around with the laser_retro using ray and gpu_ray sensor.

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="my_world">
    <model name="sensor">
      <link name="sensor_link">
      <gravity>0</gravity>
        <pose>0 0 0.1 </pose>
        <visual name="sensor_visual">
          <geometry>
            <box>
              <size>0.05 0.05 0.05</size>
            </box>
          </geometry>
        </visual> 
        <sensor type="gpu_ray" name="my_sensor">
          <visualize>1</visualize>
          <ray>
            <scan>
              <horizontal>
                <resolution>1</resolution>
                <min_angle>0</min_angle>
                <max_angle>3</max_angle>
              </horizontal>
            </scan>
            <range>
              <min>0.10</min>
              <max>5.0</max>
            </range>
          </ray>
        </sensor>
      </link>
    </model>
    <model name="obstacle_box">
      <link name="obstacle_link">
      <gravity>0</gravity>
      <pose> 2 2 0.1 </pose>
        <visual name="obstacle_visual">
          <geometry>
            <box>
              <size>0.5 0.5 0.5</size>
            </box>
          </geometry>
        </visual>
        <collision name="obstacle_collision">
          <geometry>
            <box>
              <size>0.2 0.2 0.2</size>
            </box>
          </geometry>
          <laser_retro>0</laser_retro>
        </collision>
      </link>
    </model>
  </world>
</sdf>

Using gazebo 9.13 Thanks!

EDIT: After checking the gz topic output of my sensor I can see that the intensity value is returned correctly. But the range of the rays colliding with the model is still being published. So I guess, the laser_retro value is only for intensity. NOW: Is there a way to make the collision completely invisible for a ray sensor, so there is not range published ? (I can't use gpu_ray).

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-23 19:41:35 -0500

Range and retro represent two different properties that do not affect each other. Furthermore, the laser visualization inside gazebo visualizes only ranges, and not retros. So naturally, you don't see anything changing.

Retro, in this case, is synonymous with intensity. You could use this, for example, to develop a reflectance sensor. It would work much the same way as a range sensor, only this one, would publish intensities.

You could develop a sensor plugin to do what you want. The plugin would do a post-processing of the ranges, based on the retro values. But then you need to answer the question of what is the range when a ray collides with an "invisible" geometry.

edit flag offensive delete link more

Comments

Thanks for your quick answer! I also thought about the plugin, but if I do post-processing of the ranges I can't really make the collision ''see-through'' because I don't have the ray range value for the object behind it for example. The only thing I could do is set it to infinite, which unfortunately isn't what I want.

relffok gravatar imagerelffok ( 2020-04-24 10:23:41 -0500 )edit

I might be wrong, but I don't believe that you can get this functionality out of the box. You'd have to write your won ray implementation.

nlamprian gravatar imagenlamprian ( 2020-04-24 16:19:08 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-04-23 17:10:47 -0500

Seen: 3,572 times

Last updated: Apr 23 '20