Gazebo | Ignition | Community
Ask Your Question

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 (

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">
        <pose>0 0 0.1 </pose>
        <visual name="sensor_visual">
              <size>0.05 0.05 0.05</size>
        <sensor type="gpu_ray" name="my_sensor">
    <model name="obstacle_box">
      <link name="obstacle_link">
      <pose> 2 2 0.1 </pose>
        <visual name="obstacle_visual">
              <size>0.5 0.5 0.5</size>
        <collision name="obstacle_collision">
              <size>0.2 0.2 0.2</size>

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

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


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



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

Seen: 3,446 times

Last updated: Apr 23 '20