Problems connecting from dronekit to mavproxy

508 views
Skip to first unread message

Trond Hindenes

unread,
Feb 18, 2016, 9:13:24 AM2/18/16
to drones-discuss
Hi, 
I'm developing some python code that will eventually end up on an on-board computer. 
My dev environment is: 
-Computer1: dronekit-sitl and mavproxy
-Computer2: dev station where I run python code.

From computer2 I am able to run code connecting directly to the sitl instance running on computer 1 using "connect("tcp:computer1:5760",wait_ready=True)"

My problem is that I'd like to connect to the mavproxy instance on computer1 instead of directly to the sitl instance. I know I can run code inside of mavproxy, but that's not what I'd like to do as this would make my debugging work harder.

Is this at all possible?
As far as I understand, sitl binds to tcp port 5760 on startup. Mavproxy can connect to this port (mavproxy.py --master tcp:127.0.0.1:5760) without problems. 
What I'm struggling to understand is whether mavproxy binds to some other port in the same manner, so that I get an endpoint I can connect to from dronekit.

Any pointers would be deeply appreciated!

Trond Hindenes

unread,
Feb 18, 2016, 9:29:36 AM2/18/16
to drones-discuss
I was able to get this working by simply connecting to one of the other sitl-ports (5762 for instance)

Bill Bonney

unread,
Feb 18, 2016, 12:45:22 PM2/18/16
to drones-...@googlegroups.com
You can connect toTCP 5762 or 5763 with the GCS or droneKit API for a mavlink connection

Or if you setup your code to listen of a UDP port, ie 14550 is the default conventional start to the range. you can pass 
--out=10.0.1.201:14550 to mavproxy to recast MAVlink to that UDP port

see http://dev.ardupilot.com/wiki/sitl-simulator-software-in-the-loop/ for neat diagram of how the SITL is setup. (note port 5762 isn’t documented on the diagram)

Bill


--
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.

Ramon Roche

unread,
Feb 19, 2016, 1:45:45 PM2/19/16
to drones-...@googlegroups.com
You can use the --out option on mavproxy documented here http://dronecode.github.io/MAVProxy/html/getting_started/starting.html#out

Here's some docs on how to use sitl with dronekit + mavproxy http://python.dronekit.io/develop/sitl_setup.html
Reply all
Reply to author
Forward
0 new messages