Raspberry PI with droneapi/Mavproxy talking to PC Running SITL/Mavproxy

644 views
Skip to first unread message

Stephane Scherrer

unread,
Jul 28, 2015, 1:48:01 PM7/28/15
to drones-discuss
Hi all,

I want to setup a full SITL environment remote controller by a RPI running DroneAPI.

I have
1/ Raspberry PI running Dronekit over Mavproxy.py. This is loaded and working. Though I did not use any argument for launching Mavproxy for time being... The Raspberry is LAN Connected at 192.168.1.18 as mean of example
2/ a WIndows PC running SITL over/with Mavproxy using the sim_vehicle.sh script. This is loaded and working. PC is LAN connected at 192.168.1.4. I can command the drone with mavproxy command such as arm, ..etc... this is working but locally. On the PC, command "output" shows me 2 ports opened locally 127.0.0.1:14550 and 127.0.0.1:14551

Objective : I want to connect the RPI to the SITL so that
 a) I can retrieve all the simulated drone info (GPS, Altitude...)
 b) I can use the droneapi to run python scripts that will drive the simulator

At this stage I tried a bit everything I could following docs... but all failed. I tried as well running the SITL directly without Mavproxy on the PC and trying to establish cnx to RPI.. failed. I know the RPI Mavproxy can use --out command ? but directing to the PC I got cnx refused... Any guidance appreciated... I'm so close ...  ;)

Thanks !

Jaime Machuca

unread,
Aug 1, 2015, 1:58:12 PM8/1/15
to drones-...@googlegroups.com
Hello Stephane,
I saw your email a few days ago but hadn’t had a chance to respond. The way I have done it is I start STIL on my Linux box with the following command:

sim_vehicle.sh --console --map —out=x.x.x.x:14550

where x.x.x.x is your RaspberryPi IP address.

Then on the Raspberry Start Mavproxy with the following command:

sudo mavproxy.py —master=udpin:0.0.0.0:14550

That will start Mavproxy and listen for the UDP packets.

I am not familiar with running SITL on windows, If you cannot start SITL with the command above, once it is running you can type on the SITL console this command to add the output:

output add x.x.x.x:14550

That should get you going.

Best regards,

Jaime Machuca Mercado
CTO | Droidika | www.Droidika.com
Cel. +52 1 (33) 3945 3350




Este correo electrónico y cualquier archivo transmitido en él, son confidenciales y para uso exclusivo de los individuos y entidades a quienes está dirigido. Si usted no es el destinatario previsto o la persona encargada de recibirlo, y tiene por error este mensaje, queda prohibido y sin validez el uso, difusión, re-envío, reimpresión o copia. Toda oferta y/o aceptación de propuestas comerciales, celebración de contratos u otros actos tendientes a la adquisición de bienes o servicios, así como el establecimiento de cualquier clase de obligación legal para Droidika S.A. de C.V., deberá confirmarse por escrito firmado autógrafamente por funcionario competente, excepto que se cuente con un contrato vigente que autorice el uso de este medio para tales fines. Si usted recibió este correo por equivocación, favor de notificar inmediatamente por este medio a su remitente, y después borrarlo de su correo

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

Stephane Scherrer

unread,
Aug 2, 2015, 5:50:15 PM8/2/15
to drones-discuss
UR GENIUS !!!

It just worked. I had tried over last few days without success...

Many thanks for this.

Now on to some droneapi stuff to try out... !!!

Brgds
Stephane

Daniel Frenzel

unread,
Aug 3, 2015, 5:26:19 AM8/3/15
to drones-discuss
Just a question of interest. What is the purpose of a local MavProxy. 
The guide claims that with the current MissionPlanner a connection to the vehicle can be established (http://dev.ardupilot.com/wiki/companion-computers/raspberry-pi-via-mavlink/making-a-mavlink-wifi-bridge-using-the-raspberry-pi/). 
This was not possible before. Nevertheless, the whole system would work the same without MavProxy.
So what's the reason to use it?

Daniel Frenzel

unread,
Aug 3, 2015, 5:28:46 AM8/3/15
to drones-discuss
Ah I got it. Probably Mavproxy is just binding the socket. 
Reply all
Reply to author
Forward
0 new messages