Controller for drone automation using MAVROS
controller.py
: Contains core controller classwaypoint.py
: Waypoint controller class for drone to traverse a list of pointsutils.py
: A collection of utility functions for converversion, unwrapping etc,
- ROS
- MAVROS
- PX4 Firmware
- PX4 Gazebo for MAVLink
To test in the default px4 empty world first run:
$ roslaunch px4 mavros_posix_sitl.launch
Then in a seperate terminal:
$ python waypoint.py
To use the either the iris_fpv_cam
model or iris_rplidar
model, follow this procedure -
Note: You will need to replace <path_to_Firmware>
with the approproate path in the commands below.
- Copy the required launch files into the px4 package:
$ cp launch/* <path_to_Firmware>/launch/
- Copy the required world files into px4 package:
$ cp world/* <path_to_Firmware>/Tools/sitl_gazebo/worlds/
- Copy the required rviz files into px4 package:
$ mkdir -p <path_to_Firmware>/Tools/sitl_gazebo/rviz/
$ cp rviz/* <path_to_Firmware>/Tools/sitl_gazebo/rviz/
- Launch the desired configuration:
$ roslaunch px4 test_iris_fpv_cam.launch
or
$ roslaunch px4 test_iris_rplidar.launch
- Run the waypoint controller:
$ python waypoint.py
The camera / lidar topics should be displayed in RViz
- Add waypoint controller
- Use
setpoint_velocity
with proportional control - Incorporate obstacle detection using LIDAR / Camera
- GAAS (Generalized Autonomy Aviation System) Guide
- PX4 Development Guide MAVROS Example