10.4 SITL Lidar obj avoid - terrytaylorbonn/auxdrone GitHub Wiki
24.0624
(24.0508 was "Total sim P3b Lidar")
The Gdrive document 10.3,4_(1.3ab)_sim-all_ai-yolo_lidar_auton_v48_24.0218.docx (second part "b" ) shows how to implement object avoidance with Lidar.
For the lidar in the diagram below:
-
Video 14: Add lidar to Gazebo. Add to runway.world. roslaunch runway.launch. Insert target box in Gazebo. rostopic echo /spur/laser/scan.
-
Video 15/16: Write avoidance.cpp. Catkin build. roslaunch lidar.launch. startsitl.sh. roslaunch apm.launch. rosrun iq_gnc avoidance. Move box toward copter, copter moves away (CC sends ROS messages to MavROS which sends Mavlink).
Startup sequence: (1) roslanch iq_sim lidar.launch (starts ROS), (2) SITL, (3) roslaunch APM, (4) rosun avoidance.cpp