This project is a drone waypoint navigation system built using the HoverAviary environment from gym-pybullet-drones
. The system enables a drone to navigate through a sequence of predefined waypoints, visually marking each waypoint and updating its status upon reaching it. The drone's control mechanism is implemented using DSLPIDControl.
- Waypoint visualization: Displays waypoints as red spheres in the PyBullet environment.
- Navigation control: Uses DSLPIDControl to guide the drone to each waypoint.
- Real-time status updates: Changes waypoint color to green when reached.
- Hovering mechanism: Ensures the drone hovers at each waypoint for a minimum time.
- Simulation parameters: Configurable physics engine, control frequency, and GUI.
Clone this repository and navigate to the project directory:
git clone https://github.com/ajaykrishna00-7/Autonomous_drone_navigation
git clone https://github.com/utiasDSL/gym-pybullet-drones.git
cd gym-pybullet-drones
pip install -e
cd
cd Autonomous_drone_navigation
pip install -r Requirements.txt
Run the script with default waypoints:
python Final_code.py
To specify custom waypoints, modify the waypoints
list in the script:
waypoints = [(0, 0, 1), (2, 2, 2), (3, 3, 2), (2, 2, 1)]
Adds visual sphere markers and numerical labels to waypoints in the PyBullet simulation.
Updates the waypoint color to green when reached by the drone.
Main function that initializes the environment, sets up the drone controllers, and simulates the navigation process.
Modify parameters such as:
- GUI Mode: Set
gui=False
to run without visualization. - Simulation Duration: Adjust
duration_sec
for longer or shorter runs. - Control Frequency: Tune
control_freq_hz
for smoother navigation.
- Ajay Krishna P (Myself)
- Bargavan R (https://github.com/BargavanR/)
This project is open-source and available under the MIT License.