Hi @rmackay9 and @rishabsingh3003, I’ve been working on getting Ignition Gazebo running with ArduPilot using the SITL-JSON backend, and have been testing range sensor support with ArduRover V4.1.0-rc1 (723b1f86).
I’m having some trouble getting the parameters for Bendy-Ruler avoidance configured correctly and would appreciate some guidance on where I might be going wrong.
I’ve configured a single forward facing simulated range sensor to not have any ground return to remove any artefacts that might arise from that. With no obstacle it is returning a range of ~ 5m, so I have set the RNGFND1_MAX_CM = 450 so that it clears in that case. Other parameters are configured according to the wiki.
In the first AUTO section the rover approaches the barrier slows, backs up slightly then stops - which looks like the behaviour for Simple Avoidance rather than Bendy-Ruler.
In the second AUTO section, after backing away under MANUAL, the rover navigates towards the WP, avoids some obstacles but eventually becomes stuck on a second barrier stopping once again.
I’d like to include a fully working rover avoidance use case in a write up on how to get SITL working with Ignition (with rear and side sensors as well). All help much appreciated.
Hi @rhys I suspect its because you have both simple avoidance and BendyRuler switched on together in Auto. For rover Auto can run both BendyRuler and Simple Avoidance but I have never tried how they interact with each other… why don’t you disable Simple Avoidance (AVOID_ENABLE = 0 ) and try again? Also might be better to disable proximity filtering for simulations… set PRX_FILT = 0. Let me know the behaviour after this
By the way the simulation looks really nice! I look forward to testing it out Let me know how I can help with avoidance… does this work with Copters too?
I didn’t appreciate that both avoidance algorithms would be running concurrently. I’ve realised my example has a mistake in that I’ve set one WP beyond the barrier - but the rover should probably slide along the barrier looking for a gap in that case. Even so, the rover does still get eventually get stuck if it approaches a barrier too closely (as it does on the first approach). I’ll make the changes you suggest and update the video and log.
Thanks re. simulation. The updated Ogre2 render engine for Ignition is good and supports a similar PBR workflow to UE5 and Unity, so it’s possible to have much better visuals. The sim should work with copters - the basic tests use an Iris quadcopter model which is running ok but the aerodynamics model won’t be as good as some other choices of simulator, but that’s something that could be improved if there is demand. On the other hand the camera and sensor support is already quite good. RGB, depth, thermal cameras, and Lidar.
Update:
@rishabsingh3003 following your suggestion I’ve updated the parameters to:
RNGFND1_GNDCLEAR is set it to a large value because the sensor beam is adjusted to not intersect the ground plane, although in a practical case it will. What is the correct way to set it in relation to OA_MARGIN_MAX and RNGFND1_MIN_CM?
OA_DB_BEAM_WIDTH is set to the diameter of the simulated sonar cone (30 deg). Is this a valid interpretation?
The rover is still driving into obstacles and does not back away. In this example full forward throttle is applied when the range drops to a minimum (first AUTO section before 23.06.58 and the last AUTO section just before 23.07.38).