Hi, guys! I have lost all hope of fixing this myself.
Context:
I simulate a drone in Isaac Sim 5.0 with RTXLidars. I pack the LiDARs data to OBSTACLE_DISTANCE message and send through the MAVLink backend. The mode is AUTO, I just upload different plans from QGroundControl that are just waypoints. This part works flawless. I need to setup Bendy Ruler obstacle avoidance. It also works good enough at 4 m/s with these parameters:
OA_TYPE,1
OA_MARGIN_MAX,7
AVOID_MARGIN,1.1
PRX1_TYPE,2
WPNAV_SPEED,400
OA_BR_LOOKAHEAD,7
AVOID_ENABLE,2
WP_YAW_BEHAVIOR,3
WPNAV_RADIUS,1000
AVOID_BACKUP_DZ,0.1
AVOID_BACKUP_SPD,2
AVOID_BACKZ_SPD,2
AVOID_ACCEL_MAX,9
Problem:
As soon as I increase speed to 5 or 6 m/s the drone does not manage to avoid obstacles. It tries, but yaw changes too slow.
What I have tried:
- I have increased Bendy Ruler rate to 10 Hz in the ArduPilot source code.
- I have tried various combinations of parameters and their values.
- I have looked into the logs and saw a suspicious thing:
OABR.DYaw tells to turn 90 degrees right (180 degrees), but ATT.DesYaw stays around 90 degrees (just forward) and with a delay starts sloooowly increasing (ATT.Yaw closely follows ATT.DesYaw)
So, I believe, the problem is with the path planner and how it joins missions and OA data. Or maybe it something with attitude controller, I have no idea.
Has anyone seen it before?
Logs are here:
https://drive.google.com/file/d/1jrTHng7b2_R4gcvfd_cjOkdLiM6hJurf/view?usp=sharing
UPD: I forgot to mention that increasing lookahead helps to avoid at a higher pace, but it does not feel like a real solution and I am simulating a real-life setup and my LiDARs hardly see 8 meters ahead.