Feeding MAVROS, using PX4, into QGC

I am using a Pixhawk, configured using QGC. My goal is to use MAVROS to publish data to the prescribed topics, then feed those topics into QGC for display, and hopefully two way communication. But for now simply display purposes will do.

For now I’d like to get it working on the same computer, then have it working over a wifi network.

I have the pixhawk plugged into USB port to my linux machine (Ubuntu 16.04.2) via the telem2 port using an adapter.
WITH QGC CLOSED I can successfully run:

roslaunch mavros px4.launch fcu_url:=/dev/ttyUSB0:921600 gcs_url:=udp://@127.0.0.1:14550

I can echo data to confirm its working. The problem comes when I open QGC. This happens:

Any idea how to solve this?

Much Appreciated,
Max

To solve this I had to set the parameter CBRK_AIRSPD_CHK = 162128 in QGroundControl. This ensures that the absence of the airspeed sensor is ignored.

I have successfully implemented this in a slightly different configuration: FCU (pixhawk with px4) <—> Companion Computer (Intel NUC) <—> QGroundControl on Linux Computer. I have outlined it below, and included useful links at the end of the post.

Some useful pertinent links:



https://pixhawk.org/peripherals/onboard_computers/intel_edison

I found a simple solution to connect QGC, Mavros and Pixahwk at the same time in one PC only using one telemetry.

In QGC(QGroundControl), in Application Settings / General / ‘AutoConnect to the following devices’, turn off ‘SiK Radio’ option. (because It hinder the connection between QGC and Mavros)

And then execute following command in PC (if you are using ttyUSB0 port and 57600 bps for telemetry):
rosrun mavros mavros_node _fcu_url:=/dev/ttyUSB0:57600 _gcs_url:=udp://@localhost

Instead of above command, you may use ‘roslaunch’.
roslaunch mavros px4.launch _fcu_url:=/dev/ttyUSB0:57600 _gcs_url:=udp://@localhost

Finally, execute QGC and it will be connected automatically.

If you want to connect both of QGroundControl and Mavros simultaneously to Pixhawk using USB connection, do the following.

  1. In QGC(QGroundControl), in Application Settings / General / ‘AutoConnect to the following devices’, turn off ‘Pixhawk’ option. (because It hinder the connection between QGC and Mavros)

  2. Execute mavros using default command:
    roslaunch mavros px4.launch

In later time, if you want to connect directly QGroundControl to Pixhawk without Mavros, enable again the ‘Pixhawk’ option above.

I use mavlink-router to forward mavlink messages to multiple processes https://github.com/intel/mavlink-router