This file provides the steps needed to run the demo. The steps shown in instructions/setup.md
must be completed first.
WARNING: This demo is not safe for use on real hardware, the circle trajector generator may cause agressive and unpredictable behavior upon takeoff.
Navigate to your PX4-Autopilot folder ande execute:
make px4_sitl gazebo-classic_iris
MicroXRCEAgent udp4 -p 8888
# Source the workspace
source ~/llc_ws/install/setup.sh
# Start the simulation
ros2 launch px4_offboard_lowlevel iris_sitl.launch.py
- Run the circle trajector generator in a new terminal
# Source the workspace
source ~/llc_ws/install/setup.sh
# Start the trajectory generator
ros2 run px4_offboard_lowlevel circle_trajectory_node
- Open QGroundControl, change to offboard mode, and arm the drone.
By default the controller will be sending Attitude Setpoints:
- You can switch to Thrust + Torque setpoints mode by changing
control_mode
parameter:
ros2 param set /offboard_controller control_mode 2
- you can switch to Direct Actuator commands (throttles of the motors) by changing
control_mode
parameter:
ros2 param set /offboard_controller control_mode 3