MAVROS - APM communication

Hi,

I’m trying to figure out how to set up APM- MAVROS communication on the RPi2 with Navio+, does anyone have any experience with that?
How would the APM launch command look like? Do I still use the -A option for GCS and -C option to connect to MAVROS? Do I use virtual serial ports for that?

Would appreciate any ideas on this.

I’ve looked a bit more into the installation tutorial here: mavros/README.md at master · mavlink/mavros · GitHub
and i guess this is the way it’s supposed to work:

sudo ArduCopter-quad -A udp:127.0.0:14551 & 
roslaunch mavros apm.launch fcu_url:=udp://:14551@

But the mavros doesn’t get a heartbeat. Could it be related to the MAVLINK_DIALECT that’s used in APM? By default mavros uses ardupilotmega, would it work?

1 Like

I have almost the same problem here so I didn’t want to make a new thread. I have ROS, Mavros, ArduCopter and Ardu Plane wokring on raspberry pi 2. What is the suggested way to establish Mavros - ArduCopter communication? To be more exact, I want ArduCopter to send elemetry to local host.

I tried to run:

sudo ArduCopter-quad -A udp:127.0.0:14551

but the following message repeats itself:

read failed - Connection refused

If i try this:

sudo ArduCopter-quad -A udp:127.0.0:14551

it says;

connect failed to 127.0.0:14551 - Permission denied

Tried in root as well. Nothing changes.

Any ideas how to send that telemetry data to local host to make it able for Mavros to read it.

Thank you.

Hi,

There is an error in the line from posts above,

sudo ArduCopter-quad -A udp:**127.0.0:**14551

It should work if you launch APM with

sudo ArduCopter-quad -A udp:127.0.0.1:14550

And MAVROS with:

roslaunch mavros apm.launch fcu_url:=udp://:14550@

Or MAVPROXY:

mavproxy.py --master=127.0.0.1:14550

Oh…

It actually worked all this time. But I thought it didn’t because it gives this error:

read failed - Connection refused

Which didn’t prevent APM from running but it looks like in mavros topics some IMU data is missing :confused:. But in mission planner all seems fine. Thank you!