paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Connect AR Drone 2.0 through router, then multiple


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] Connect AR Drone 2.0 through router, then multiple drones
Date: Sat, 18 Mar 2017 17:26:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Hi,


Le 18/03/2017 à 02:13, cTrippen a écrit :
Good morning Gautier,
  I ran the configure_network via telnet and am now able to connect to the
router and ping the ard2. GOLD :)

  I opened PPRZ and changed the AC_ID to 10, and selected the
ENAC/quadrotor/ard2_basic.xml as the airframe file. This is the airframe
file that I modified earlier. The build failed with the following message -

Fatal error: exception Failure("File not found:
conf/airframes/ENAC/quadrotor/ard2_10.xml")
make[1]: ***
[/home/ct/paparazzi/var/aircrafts/ardrone2/ap/generated/airframe.h] Error 2
This is because the calibration files for each drone is in a separated file with the AC_ID in the name: https://github.com/paparazzi/paparazzi/blob/master/conf/airframes/ENAC/quadrotor/ard2_101.xml

  Then I swapped back to the examples/ardrone2.xml airframe file,
      added the configure_name="HOST" name="192.168.2.$(AC_ID)" line, and
build went through. The GCS then was held up at "waiting for telemetry".
  I am thinking that the adr2 either can't talk back or is stuck within it's
own code.
After flashing, the program runs immediately. It is then possible to log with telnet and check that the code (ap.elf) is still running. You can also restart it by hand. The program should be in /data/video/paparazzi.

  Also, if I wanted to configure the ard2 back to its original network setup,
can I run the configure_network script and take out the host reference in
the airframe file?
yes, you may need to specify the correct host address the option --host of the python script

  As an aside, if you did actually have the incorrect name for the SSID,
instead of fixing via console, if you new what SSID you gave the drone,
could you just rename your router to match and then connect?
yes, I guess it would work as well

  Happy to update the wiki once I know what to put up there (and how to do
the update) :)
Thanks again
  Carl


Gautier Hattenberger-3 wrote
Hi,

The 2013 document is probably completely outdated now, so don't rely to
much on it.

Here is my situation to connect several ARDrones:

- First, you can run the configuration script independently of anything.
The script is located in the sw/tools/parrot folder on the ground
station, and it is in fact doing a mix of telnet/ftp commands to produce
the required changes (getting/settings parameters, executing commands,
uploading/downloading files).

let's say your router has IP 192.168.2.254 with SSID 'wifiNetworkName'
and your drone has 192.168.2.10. You can choose the AC_ID (from the
paparazzi center, top left part) to be 10, it can help later but it is
not mandatory. The script command would be:

./ardrone.py configure_network wifiNetworkName 192.168.2.10 managed

say 'yes' if it asks to update the wifi script if not done before and
restart the drone with the router running. After boot, it should connect
to the router, check with 'ping 192.168.2.10'. If it fails (wrong SSID
usually), you'll need to connect to the drone using the direct serial
console (http://wiki.paparazziuav.org/wiki/AR_Drone_2#Console_Fixing)
which is really annoying (that's why there is a warning).

- Then you need to configure the airframe to define the drone IP (HOST
parameter):

<configure name="HOST"
name="192.168.2.$(AC_ID)"/>

if AC_ID is equal to the last number of the address (with this you can
also reuse the same airframe file for several drones if their IP is
following the same principle), or:

<configure name="HOST" name="192.168.2.10"/>

to fix the value.

Now the GCS should know where to send the autopilot code (based on HOST
param). In the other direction, the drone is broadcasting an UDP stream,
so it is not needed to know the GCS IP.

I hope this clarify a bit. Don't hesitate to improve the documentation
on the wiki.

Gautier


Le 16/03/2017 à 08:38, cTrippen a écrit :
Hi there Gautier,
   Thank you for the reply.
   I would like to confirm a few things, if I may.
   At what point do you use the configure script? In the IMAV2013
document, it
telnets the whole command to the drone once paparazzi is loaded to it. Is
this the same point where I use the configure script? or can I set these
things before build/upload? I have telnet'd to the drone post upload but
couldn't find the file.

   My proposed command will be -
   ardrone.py configure_network --channel auto wifiNetworkName
desiredDroneIP(192.168.2.10) managed

   Regarding the airframe file, ard2_basic.xml, my router IP is
192.168.2.254,
so the entry in the file will be -

       line 7
<configure name="HOST" value="192.168.2.$(AC_ID)"/>
   Is the allocation of IP to the drone dynamic? and therefore successive
drones will be numbered in sequence? or does the $(AC_ID) retain its
current
number? In which case, I will have to configure their default IP.
Also, do I need to select this airframe file in the GCS? I am currently
using the ardrone2.xml from the examples folder.

   Regarding your warning, 'trouble to connect after restart', is that
only if
choosing the 'autostart' option?

Thanks again
Carl



--
View this message in context:
http://lists.paparazziuav.org/Connect-AR-Drone-2-0-through-router-then-multiple-drones-tp18279p18284.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.

_______________________________________________
Paparazzi-devel mailing list

Paparazzi-devel@
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
Paparazzi-devel@
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




--
View this message in context: 
http://lists.paparazziuav.org/Connect-AR-Drone-2-0-through-router-then-multiple-drones-tp18279p18289.html
Sent from the paparazzi-devel mailing list archive at Nabble.com.

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]