Homework Implementation Done!

two majors tasks for homework

  1. alter yaw such that the drone heads towards to target waypoint
  2. change flight mode to fw(fixed-wing) instead of staying in mc(multicopter) mode

https://drive.google.com/file/d/1i5aTIrvdZeb1XdTKacR0UgeFsLemsyIH/view?usp=sharing

I modified the code such that the VTOL stays in MC+offboard and goes around a square waypoint (4waypoints), then changes to FW+mission mode to go around a wide circular waypoints then go back home. (8mission waypoints + 1 land = 9 waypoints)

image.png

squarewaypoints in mc

image.png

huge circle in fw

We can notice that the circle is not smooth and looks angular, this is a characteristic of mission mode. Unlike offboard mode that updates position value very frequently(ex.2Hz), mission mode appends a set of waypoints to PX4 and those waypoints are followed. So when we move in a circle the waypoints are not smooth

image.png

zip file of working package

square_ws.zip

Working final nodes

waypoint_controller.py

flight_state_controller.py