Mavlink - ROS USB communication rate

209 views
Skip to first unread message

Jon Verbeke

unread,
Nov 18, 2014, 10:13:22 AM11/18/14
to drones-...@googlegroups.com
Hi,

I have connected a pixhawk to my laptop through USB and I am communicating with it using ROS and roscopter. I made my own custom mavlink messages to do this.

I'm testing how fast I can sent a value from my laptop in ROS to the pixhawk and receive it back through a second mavlink message. This is mainly in the interest of connecting a second onboard computer to in for higher order navigation and image processing. In de CGS_Mavlink.pde I simply wrote the received value into the second message that is send in the next iteration. Everything works fine.

At the moment I get rates up to 8Hz. So it takes around 0.12seconds for the value to travel to pixhawk and back. This seems very slow as I thought the Mavlink is updated at 50Hz. Does anybody know how I can speed this up?

Cheers,

Jon

Evan Slatyer

unread,
Nov 18, 2014, 10:03:41 PM11/18/14
to drones-...@googlegroups.com
Hi Jon,

From what I've been told (and a bit of personal experience), using USB in flight is probably not a good option. The NuttX USB stack is a complex bit of software that occupies quite a lot of CPU time and may not be robust enough for mission-critical data. I was getting a couple of odd servo glitches with it connected, which I suspect were due to timing issues. It wouldn't surprise me if it can't handle very high data rates while also flying the vehicle.

I've now switched to the serial port instead (there are two telemetry ports, so use one for the radio and the other for the onboard computer). No more servo glitches. Delay between the onboard computer sending data and getting an acknowledgement from the autopilot (PX4FMU) is about 0.02 to 0.03 seconds. That's measured at the ROS node that handles the serial port; obviously other ROS nodes have a larger delay due to the ROS message passing system.

Cheers,
Evan

Jon Verbeke

unread,
Nov 19, 2014, 3:32:02 AM11/19/14
to drones-...@googlegroups.com
Hi Evan,

Thanks for the response!

Are you using the FTDI-USB cable or a USB to serial cable?
I see you can choose if you want:

http://dev.ardupilot.com/wiki/odroid-via-mavlink/  (around halfway the webpage, two options are shown)

Cheers,

Jon



Op woensdag 19 november 2014 04:03:41 UTC+1 schreef Evan Slatyer:

Evan Slatyer

unread,
Nov 20, 2014, 12:57:13 AM11/20/14
to drones-...@googlegroups.com
Hi Jon,

My onboard computer actually has full PC-style serial ports (it's a Commell LP-170A). The only conversion I've needed is a MAX3232 to drop the voltages down to a level that the PX4 can handle.

Assuming the Odroid doesn't have any handy UARTs available, I'd just use an FTDI USB-to-serial adaptor board. They tend to be more compact than USB to serial cables.

Cheers,
Evan

Jon Verbeke

unread,
Nov 21, 2014, 2:03:27 AM11/21/14
to drones-...@googlegroups.com
Thanks Evan,

I ordered the FTDI-USB cable.

Cheers,

Jon

Op donderdag 20 november 2014 06:57:13 UTC+1 schreef Evan Slatyer:

Rakshak Talwar

unread,
Dec 12, 2014, 2:16:51 AM12/12/14
to drones-...@googlegroups.com
Does the Pixhawk run at 3V or 5V?

Philip Rowse

unread,
Dec 12, 2014, 4:52:05 AM12/12/14
to drones-...@googlegroups.com
3.3V

Philip Rowse
Electronics Engineering Dept
3DRobotics
Ballarat
Australia

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages