Robotics StackExchange | Archived questions

Can I use MAVROS without connecting to a FCU?

Is it possible to use MAVROS to only convert messages from Mavlink messages to ROS messages and vice-versa? I do not want a connection to a FCU, like you are forced to have (I do not have a Mavlink enabled drone).

Thanks for any help!

Asked by MatejH on 2018-03-29 08:37:06 UTC

Comments

It's unclear why you want to do this. If you want to simulate a drone or rover, you might use SITL and mavproxy with mavros. (That's how we're simulating a rover.) See: http://ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html

Asked by Mark Rose on 2018-04-03 17:03:25 UTC

We are using a DJI drone, with which we interact only with ROS messages (sending commands/receiving position/...). The messages will be sent over the RC in Mavlink format. What we now need is only to convert those Mavlink messages to ROS and vice-versa.

Asked by MatejH on 2018-04-09 08:13:48 UTC

This was a long time ago, but did you find any solution? Or is mavros an overkill if I just want "basic communication"?

Asked by xlightx on 2020-10-13 11:49:57 UTC

Answers

To answer xlightx: It has indeed been a time, and there might a better solution than the one I'll describe. I was working on an DJI drone and we wanted to communicate with it over a very slow connection (a mobile device using the remote controller) with DJI Onboard SDK ROS (running on the drone's Ubuntu computer). My solution was:

  • create a new Mavlink dialect (we wanted ROS-like messages) and use a generator to create Java and C++ classes
  • I copied Mavros' PluginBase class, so that it was easier to add new plugins to handle the new messages. This meant, I didn't need a reference to the Mavros project in the end (I needed only Mavlink)
  • created a new ROS node that handled communication between the mobile device and DJI Onboard SDK ROS via the Mavlink messaging protocol
  • link, if it helps: https://github.com/HrlecMatej/RCAndVRSupportForDrones/tree/master/remote_controller_support

Asked by MatejH on 2020-10-14 00:54:59 UTC

Comments

Thank you very much, that's very helpful. I will take a look into what you did, but the gcs_bridge node from mavros might be enough for me!

Asked by xlightx on 2020-10-14 05:47:24 UTC

Yeah, that might be enough. I had to go through all the extra work, because I was basically converting a DJI drone autopilot to behave somewhat like a Mavlink autopilot. The potential end goal being making a DJI drone controllable through QGroundControl (which would require a whole lot more work, because of big differences in how data is interpreted on Mavlink and DJI drones. So my thesis stopped once we had a working Android GCS prototype, and were able to send Heartbeat messages to QGroundControl).

Asked by MatejH on 2020-10-14 06:03:21 UTC

Nice job though, thank you!

Asked by xlightx on 2020-10-14 06:21:13 UTC