Skip to content

Working with Pixhawk

Rocco edited this page Mar 31, 2018 · 2 revisions

installing mavros:

sudo apt-get install ros-kinetic-mavros*

Pixhawk Settings:

  • APM version 3.3 or higher (3.3 is when velocity commands were added)
  • setup communication over the telem2 port (this allows the pixhawk to communicate with the onboard computer over telem2 while still having the telemetry radio on telem1 communicating with a ground computer):
    • SERIAL2_PROTOCOL = 1 (the default) to enable MAVLink on the serial port.
    • SERIAL2_BAUD = 921 so the Pixhawk can communicate with the onboard computer at 921600 baud.
    • LOG_BACKEND_TYPE = 3 if you are using APSync to stream the dataflash log files to the computer NOTE: don't just plug into the pixhawk's USB because that disables battery warnings

call service /mavros/set_mode custom_mode: "Guided_nogps" to change mode call service /mavros/cmd/arming value: "true" to arm publish to topic /mavros/setpoint_raw/attitude to set values

rosservice call /mavros/set_stream_rate 0 10 1 to set data rate to 10 hz

Mavros ROS documentation

Clone this wiki locally