gazebosim / gazebo-classic

Gazebo classic. For the latest version, see https://github.com/gazebosim/gz-sim
http://classic.gazebosim.org/
Other
1.19k stars 481 forks source link

RaySensor ray visualisations always start at origin of sensor #2018

Open osrf-migration opened 8 years ago

osrf-migration commented 8 years ago

Original report (archived issue) by Deanna Hood (Bitbucket: d_hood).

The original report had attachments: Screenshot from 2016-07-27 11-18-52 - 1.png


RaySensors have an option for the minimum range of the sensor. This is respected in the collisions (https://github.com/osrf/gazebo/blob/1655342441d4ffdcc472faf96cf818c7518e4a96/gazebo/physics/MultiRayShape.cc#L109) but not in the visuals.

No matter what the value of the minimum range, the visualisation of the sensor's rays always start at the origin of the sensor, not at the min range.

using 7.3.1

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 8 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


See pull request #2409

osrf-migration commented 8 years ago

Original comment by Deanna Hood (Bitbucket: d_hood).


pr 2409 would help in suggesting to the user that the min range is being respected.

It wouldn't exactly be what I would want for my use case, however. The context is that I am looking to simulate parallel rays by moving the sensor origin far from the link to which the sensor is attached (screenshot attached). Visualisations of the rays between the sensor origin and min range will be a pain in this case, regardless of their colour.

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Can you describe what you want to see in the render window?

osrf-migration commented 8 years ago

Original comment by Deanna Hood (Bitbucket: d_hood).


Ideally, I would like to see transparent rays from the link origin to min range. But I appreciate that that is quite specific to this use case. So, as an alternative, I would be happy if the visualisations from the sensor origin to min range were invisible/able to be made invisible, and I could only see the parts of the rays that are actually 'sensing'.

It may just be that putting the sensor far from the link origin is not recommended practice, and I will just have to decide between all-or-nothing ray visualisation - I could understand that.

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


A configurable laser visualization would be useful. A visual plugin could handle unique use cases.

I'll submit an improved version of pull request #2409, which will get you most of the desired behavior.

osrf-migration commented 8 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).