IMC on an Arduino DUE

89 views
Skip to first unread message

Elias Strandell Erstorp

unread,
Jun 1, 2015, 6:22:30 AM6/1/15
to lsts-to...@googlegroups.com
Hey guys!

As we're moving from Ardupilot to an Arduino DUE, I'd like to abandon MAVlink in favour of using IMC also in the autopilot.
Obviously, this would make it a lot easier to keep the autopilot consistent with DUNE.
Thus, I wonder how C bindings for IMC messages are generated and if methods for serialisation/deserialisation etcetera 
are available or needs to be written manually. 

Basically I want to be able to:
1. Create an IMC message object in Arduino and assign values to its member variables.
2. Write the message object on a serial port. 
3. Read from a serial port and decode a message (in both Arduino and BeagleBone).
4. Dispatch the message on the IMC bus in DUNE.

Would this be relatively easy to accomplish?

Best Regards,
Elias

José Braga

unread,
Jun 2, 2015, 10:03:51 AM6/2/15
to Elias Strandell Erstorp, lsts-to...@googlegroups.com
Hi Elias,

A few quick notes:
  • We only have C++ bindings in DUNE
  • IMC has too much overhead for serial communications (e.g: CRC16 checksum etc) - we never use it in our ucontrollers
  • Leaving the MAVLink off of the interface with DUNE means you'd have to either:
    • write a new Ardupilot controller with just IMC (as the current depends on mavlink)
    • or, make sure you could use the plan/control architecture (without Ardupilot) to control the Ardupilot - I am not sure it's easy since I do not know exactly how Ardupilot works, but I imagine you'd need to understand very well the complete architecture, which is quite complex.
Unless you have other benefits I'd not suggest you to substitute mavlink with IMC.

A few months ago my ideal roadmap was to divide the Control/UAV/Ardupilot in three or four different tasks:
- one just for comms IMC <-> MAVlink
- probably one for controllers 
- another for calibration

Obviously that would mean having the time to rewrite code, modify IMC and so on, and currently we're very tight on available man power.

Thanks,
José Braga 

--
You received this message because you are subscribed to the Google Groups "LSTS Toolchain" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lsts-toolchai...@googlegroups.com.
Visit this group at http://groups.google.com/group/lsts-toolchain.
To view this discussion on the web visit https://groups.google.com/d/msgid/lsts-toolchain/10048b23-0266-4c99-8636-051e53ac005c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Elias Strandell Erstorp

unread,
Jun 2, 2015, 5:13:51 PM6/2/15
to lsts-to...@googlegroups.com, moe...@gmail.com
Hi Jose´,

I see, so a parser needs to be written in C. 
Since I wrote my own autopilot for the Ardupilot (using available libraries and reusing some
functions for navigation from previous projects) I have quite good understanding of how the autopilot works. I chose to use MAVlink in this autopilot as this was easier than (at that time) creating a new DUNE task. I have learnt a lot in the past 6 months and now that I'll write a new autopilot for an Arduino platform I thought that IMC is interesting as the information flow will be more consistent and I make the autopilot fit the DUNE control hierarchy in a neater way. For instance, I want the autopilot to be able to receive something similar to the DesiredPath message with both start- and endpoints set. This could of course be done with MAVlink, but would require multiple messages to be sent back and fourth. I'll also have to do a few extra transformations of sensor data to fit the MAVlink specification and then to IMC (in DUNE). 
While MAVlink is easy to use, all the messages and transformations may make debugging more difficult.

If the overhead of IMC is much larger than MAVlink then I could:
* Reduce the transmission frequency.
* Increase baudrate (maybe up to 500 kBaud with Arduino DUE).
* Use SPI instead

One option is to create a new set of MAVlink messages that resembles IMC messages that we need.

I know you're very busy and I'm not expecting you to put any time on this. I'll have a look at the papers
published on IMC to get a picture of how much time it would take me to write a parser, but I have a feeling I'll stick with MAVlink :)

Ciao,
Elias
Reply all
Reply to author
Forward
0 new messages