Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gazebo sonar plugin #248

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

darrenchurchill
Copy link
Contributor

Hi,

As I’m sure you know, the hector_gazebo_sonar plugin is implemented using Gazebo’s ray sensor, which is essentially a laser scan. As a result, if the sensor’s beam hits the ground, it’s reflected back. I think sensors on the rover models were configured to scan horizontally for that reason, so the beams don’t hit the ground (there is no vertical tag in the scan configuration). I tried adding a vertical component to the scan myself and the results were sad.

It isn’t ideal to limit the sonar scans to a single horizontal plane, since the real world sensors have much larger fields of view. A block reflects the sonar if it’s held high enough in the claw, and a pile of blocks also reflects the sonar as the rover drives toward them. Neither of those things happen in the simulation.

It turns out that Gazebo actually has a sonar sensor, but until recently no one had written a ROS plugin to use it. However, there’s an open PR ros-simulation/gazebo_ros_pkgs#697 that adds this functionality. Since it’s still open, has been for a few months, and seems to have lost traction in getting merged to the main branch, I suggest pulling the source to be built alongside our other Gazebo plugins.

This pull request brings in the sonar plugin and updates the rover models to use it.

  • The radius and fov are currently set to 0.5, which represents the sonar cone’s radius at it’s maximum range. 50cm leaves some space between each of the three cones, which I think is reasonable, but hasn’t been measured experimentally. You can set visualize to true and regenerate the model files to see the cones in Gazebo client. The field of view could be measured on the physical rover by blocking two of the three sensors with tape and moving an object in front of the sensor at 3m away.
  • The gaussianNoise is 0.15 which looked good visually, but could also be measured on the physical rover for comparison.

Let me know what you think!

darrenchurchill and others added 2 commits February 19, 2019 19:16
…s_pkgs

Thanks to @mbennehar

ros-simulation/gazebo_ros_pkgs#697

This is modeled after the range sensor plugin, but by using the sonar sensor, beams hitting the ground don't get reflected back to the sensor. This makes the sensor much more realistic, allowing its field of view to be larger without causing false ground readings. With the increased field of view, objects on the ground will sometimes reflect the beam.

Co-authored-by: Moussab Bennehar <[email protected]>
@gmfricke
Copy link
Contributor

This is great. Unfortunately, I don't think we should merge it now since teams have probably written a lot of code, for better or worse, that rely on the current sensors behavior. It should definitely be used in future research.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants