I am hoping to set up basic obstacle detection and avoidance with my drone, and I would like to test my code on the simulator. I would be using sonar rangefinders and see from the rangefinders tutorial that we can easily add this to a drone model or just use something like the typhoon that already has this.
I am able to successfully run the simulation and see the blue projection of the simulated sonar. However, I am not able to see any data published on ROS via mavros. On line 37 of the sonar’s sdf file (src/Firmware/Tools/sitl_gazebo/models/sonar/model.sdf), I can see that the published topic name should be “range_down”. This does not show up under the listed topics being published when running the mavros connection to the simulation.
I also continuously receive this message on the terminal tab of the running simulation:
[Wrn] [msgs.cc:1655] Conversion of sensor type[sonar] not suppported.
I read on the bottom of this forum post that the distance data would only be available through mavlink, but not ROS. Is this true?
I would greatly appreciate if anyone could help me solve this issue. I feel that debugging my code on the simulator is definitely the right strategy for developing an autonomous robot, but all these roadblocks make me feel the costs outweigh the benefits.