How theunknowninfinite/real-time-uav-obstacle-avoidance-using-nonlinear-programming works
This repository is a UAV obstacle-avoidance project spanning onboard RealSense-based perception and PX4 control, plus a Gazebo/PX4 simulation workflow. The documented onboard flow detects obstacles, uses them as constraints in nonlinear path planning, and sends trajectory setpoints to PX4; simulation also supports direct trajectory tracking and a simplified obstacle-avoidance mode. Sampled source confirms point-cloud publishing, offboard control, and frame transforms. Some subsystem connections are documented but their full implementation was not sampled, so those links are marked as documented rather than inferred from imports.
Main entry points: autonomous_obstacle_avoidance.py Obstacle Avoidance Planner · run_baylands_total-1.sh PX4 Gazebo Simulation · ros_pointcloud_publisher.py Point-cloud Processing · obstacle_avoidance.py Nonlinear Avoidance
Components 15
Onboard Perception
- Point-cloud Processing
Onboard Codes/ros_pointcloud_publisher.py - Depth Estimation
Onboard Codes/obstacle_avoidance_ws/depth_etimation.py
Path Planning
- Obstacle Avoidance Planner
Onboard Codes/obstacle_avoidance_ws/autonomous_obstacle_avoidance.py - Nonlinear Avoidance
Onboard Codes/obstacle_avoidance_ws/obstacle_avoidance.py - Trajectory Tracker
Onboard Codes/trajectory_controller.py
PX4 Control
- PX4 Offboard Control
Onboard Codes/trajectory_controller.py - PX4 ROS Examples
Onboard Codes/ros2_ws/src/px4_ros_com/src/examples/offboard/offboard_control.cpp - Frame Transforms
Onboard Codes/ros2_ws/src/px4_ros_com/src/lib/frame_transforms.cpp
Simulation
- Simulation Avoidance
Simulation Codes/final_project_ws/src/obstacle_avoidance/scripts/obstacle_avoidance.py - Simulation Tracker
Simulation Codes/final_project_ws/src/obstacle_avoidance/scripts/trajectory_tracker.py - PX4 Gazebo Simulation
Simulation Codes/run_baylands_total-1.sh - Waypoint Demo
Simulation Codes/assignment1/src/assignment1/src/assignment1.py
Other components
- RealSense D435i
- PX4 Flight Stack
- Pilot / QGroundControl
Connections 17
- RealSense D435i → Point-cloud Processing: supplies point cloud
- Point-cloud Processing → Obstacle Avoidance Planner: publishes obstacle data
- Depth Estimation → Obstacle Avoidance Planner: provides depth estimates
- Obstacle Avoidance Planner → Nonlinear Avoidance: plans around obstacles
- Obstacle Avoidance Planner → PX4 Flight Stack: publishes setpoints
- Nonlinear Avoidance → PX4 Flight Stack: publishes setpoints
- Trajectory Tracker → PX4 Flight Stack: publishes setpoints
- PX4 Offboard Control → PX4 Flight Stack: sends commands
- PX4 Flight Stack → PX4 Offboard Control: state feedback
- PX4 ROS Examples → PX4 Flight Stack: bridges PX4 messages
- Frame Transforms → PX4 ROS Examples: transforms frames
- Pilot / QGroundControl → PX4 Gazebo Simulation: starts simulation
- Pilot / QGroundControl → Simulation Avoidance: runs avoidance
- Pilot / QGroundControl → Simulation Tracker: runs tracker
- Simulation Avoidance → PX4 Gazebo Simulation: sends setpoints
- Simulation Tracker → PX4 Gazebo Simulation: sends setpoints
- Waypoint Demo → PX4 Flight Stack: publishes waypoints