Obstacle Avoidance
Repository: https://github.com/UWARG/obstacle-avoidance
Usage
Using simulator:
Setup the repository:
git clone https://github.com/UWARG/obstacle-avoidance.git git checkout main git pull git submodule update --remote
Activate the virtual environment
Install requirements.
pip install -r requirements.txt pip install -r modules/common/requirements.txt
Start Mission Planner.
Setup waypoints.
Setup Mavlink Forwarding
Connect the LiDAR to your machine.
Run the main script.
python -m main
Start the mission.
Â
Using Raspberry Pi 5:
Make the following hardware connections from the Raspberry Pi:
Connect to LiDAR via USB-A to Micro-USB.
Connect to Pixhawk Telem 2 port using FTDI cable.
Connect to power source.
SSH into Raspberry Pi.
Refer to Raspberry Pi 5
Enter the obstacle avoidance repository
cd WARG/obstacle-avoidance/
.Activate the virtual environment
source venv/bin/activate
.Ensure requirements are installed and submodules are initialized.
Run the flight controller test and check for odometry output.
cd modules/common/
python -m mavlink.test_flight_controller
If odometry is outputted, exit the program, otherwise check Pixhawk connection.
Run the main script.
Go back to the obstacle-avoidance directory.
Run
python -m main
.
Start an AUTO mission.
How obstacle avoidance system works:
Module Descriptions:
Detection: configuring LiDAR settings and fetching LiDAR readings.
Clustering: grouping LiDAR scans in close proximity into clusters.
Classification: assessing each cluster and assigning them a type of obstacle.
Flight Interface: sending and receiving messages from the drone.
Data Merge: combining obstacles and odometry into a data structure.
Decision: applying obstacle avoidance algorithm and sending a command.
Â