Follow the steps of the MAVLink documentation.
Connect to PX4 SITL:
python py_gcs.py udpin:127.0.0.1:14540
Connect to PX4 over serial:
python py_gcs.py /path/to/serial
Enter the command commands
to show all available commands:
- MAVLink version: 2.0
- system: 1
- component: 0
- waiting for initial position and attitude
- got initial position and attitude
> commands
- exit # exit this application
- info (<frame>) # show MAV state
- kill # force disarming of the UAV
- get <param> # get value of Parameter
- arm # arm the UAV
- takeoff # switch into 'Takeoff' mode
- land # switch into 'Land' mode
- hold # switch into 'Hold' mode
- hold # switch into 'Manual' mode
- offboard # switch into 'Offboard' mode
- sp <x> <y> (<z> (<yaw>)) # set a setpoint
- waypoints # move to waypoints
- plan # trajectory with ITG
- traj # print waypoints of trajectory
- map # show map with trajectory
>
- Power on the UAV.
- Start py_gcs. Setpoint gets initialized:
Line 49 in 5a2bddf
- Use Remote Control to Takeoff
- Set a setpoint with
sp <x> <y> (<z> (<yaw>))
- Switch to offboard mode with
offboard
- Plan a trajectory with
plan
- Check the waypoints of the planned trajectory with
traj
- Execute planned trajectory with
waypoints