bebop_autonomy icon indicating copy to clipboard operation
bebop_autonomy copied to clipboard

Connecting Multiple Bebops

Open ghost opened this issue 9 years ago • 36 comments

Is it possible to connect multiple bebops to a single computer following the same procedure for the ardrone_autonomy? Or is there some other way?

ghost avatar Oct 14 '15 20:10 ghost

We haven't explored it yet. On the driver side, it should be trivial to change the IP address of target Bebop. Configuring Bebop to change it's IP address or make it connect to an infrastructure network needs investigation though.

mani-monaj avatar Oct 15 '15 02:10 mani-monaj

The IP address configuration is now supported by the driver: #20

mani-monaj avatar Dec 22 '15 19:12 mani-monaj

I have successfully connected the bebop to a secured network (linksys router). I will detail the process if ya'll are interested.

nicolasgallardo avatar Jul 22 '16 23:07 nicolasgallardo

I have successfully connected the bebop to a secured network (linksys router). I will detail the process if ya'll are interested.

It's definitely going to be useful.

mani-monaj avatar Jul 22 '16 23:07 mani-monaj

Here you go. Any problems or improvements, please let me know.

https://github.com/nicolasgallardo/multiple_bebops

nicolasgallardo avatar Jul 23 '16 01:07 nicolasgallardo

Hi mani, hi nicolas I managed to connect two drones into our lab network according to nicolas instructions. We can ping all drones separately and everything works nice. I can launch each single drone separately. But if i try to launch two at the same time, i get an network error: it seems that somewhere the address is not correctly set addr='0.0.0.0'. The full error message is:

[ERROR] [1471663299.254993686]: [ARNETWORKAL_WifiNetwork] 23:21:39:254 | ARNETWORKAL_WifiNetwork_Bind:571 - [0x7fa73824c440] bind fd=12, addr='0.0.0.0', port=43210: error='Address already in use' [ERROR] [1471663299.255159490]: [ARDISCOVERY_Device] 23:21:39:255 | ARDISCOVERY_Device_NewARNetworkAL:238 - error: Unknown generic error [ERROR] [1471663299.255244766]: [ARCONTROLLER_Network] 23:21:39:255 | ARCONTROLLER_Network_New:191 - error: Wifi generic error [ERROR] [1471663299.255348620]: [ARCONTROLLER_Network] 23:21:39:255 | ARCONTROLLER_Network_New:225 - error: Error during the getting of the ARNETWORKAL_Manager from the device [ INFO] [1471663299.255544175]: [ARCONTROLLER_Device] 23:21:39:255 | ARCONTROLLER_Device_StartRun:3514 - Start failed or canceled. [ERROR] [1471663299.255756633]: [ARCONTROLLER_Device] 23:21:39:255 | ARCONTROLLER_Device_StartRun:3522 - Start fail error :Error during the getting of the ARNETWORKAL_Manager from the device [ INFO] [1471663299.255872429]: [BebopSDK] 23:21:39:255 | Cleanup:331 - Bebop Cleanup() [FATAL] [1471663299.256158499]: Init failed: Waiting for device failed: No error [ INFO] [1471663299.256317528]: Bebop Nodelet Dstr: 0 [ INFO] [1471663299.256356918]: Killing Camera Thread ... [ INFO] [1471663299.256398893]: Killing Aux Thread ... [q1/real/bebop_driver-1] process has died [pid 14062, exit code -11, cmd /home/naegelit/catkin_ws/devel/lib/bebop_driver/bebop_driver_node __name:=bebop_driver __log:=/home/naegelit/.ros/log/43de27c0-667f-11e6-98c4-989096ad3513/q1-real-bebop_driver-1.log]. log file: /home/naegelit/.ros/log/43de27c0-667f-11e6-98c4-989096ad3513/q1-real-bebop_driver-1*.log

I use the following launchscript which seems to bi correct:

<arg name="config_file" default="$(find bebop_driver)/config/defaults.yaml" />
<arg name="camera_info_url" default="package://bebop_driver/data/bebop_camera_calib.yaml" />
 <group ns="q2/real">
    <node pkg="bebop_driver" name="bebop_driver" type="bebop_driver_node" output="screen">
        <param name="camera_info_url" value="$(arg camera_info_url)" />
        <param name="bebop_ip" value="192.168.1.14" />
        <rosparam command="load" file="$(arg config_file)" />
    </node>
    <include file="$(find bebop_description)/launch/description.launch" />
</group>


<group ns="q1/real">
    <node pkg="bebop_driver" name="bebop_driver" type="bebop_driver_node" output="screen">
        <param name="camera_info_url" value="$(arg camera_info_url)" />
        <param name="bebop_ip" value="192.168.1.13" />
        <rosparam command="load" file="$(arg config_file)" />
    </node>
    <include file="$(find bebop_description)/launch/description.launch" />
</group>

I hope this is a small bug. Best, Tobi

tnaegeli avatar Aug 20 '16 03:08 tnaegeli

Hi all, I'm also trying to connect to multiple bebops from a single computer. I create two ros masters and run bebop-autonomy on each of them. Then I have exactly the same error as @tnaegeli mentioned above. Is there any solution for that error yet?

hoangtungdinh avatar Sep 23 '16 16:09 hoangtungdinh

Hi, The problem is the parrot SDK. I have a patched version which works with multiple drones.. maybe i can put it online. As i heard from parrot, they will fix the issue in the newest sdk. e.g. you have to separately download the sdk and copy the files into the bebop autonomy package.

tnaegeli avatar Sep 27 '16 10:09 tnaegeli

Hi all,

I patched the Parrot SDK, to be able to have a server with multiple IPs connecting to multiple bebops, avoiding the binding problems mentioned by @tnaegeli and @hoangtungdinh.

The target setup for this patch is when you have one computer with different network adapters, each adapter connecting to a different drone.

The patch simply consists in binding the connections to a particular IP, which is configured via a environment variable "LOCAL_DRONE_IP"

The patch to the SDK consists in changing any libraries which bind to all adapters to bind to only one IP. Thus, any libraries used in the SDK which have code like: recvSin.sin_addr.s_addr = htonl(INADDR_ANY);

becomes something like: const char* local_drone_ip = getenv("LOCAL_DRONE_IP"); recvSin.sin_addr.s_addr = inet_addr (local_drone_ip);

If you want to test, I uploaded the compiled binaries here: https://github.com/mhct/arsdk_multiple_bebops

You have to untar this file at the root folder of your bebop_autonomy workspace. The tar will overried the arsdk libs folder (devel/.private/bebop_driver/arsdk/out/arsdk-native/staging/usr/lib), with the patched version mentioned above.

Note that before loading the bebop driver you have to export the environment variable export LOCAL_DRONE_IP=192.168.42.xx where 192.168.42.xx is the IP of you adapter connected to the bebop.

If there is interest, I can also put the modified source code online.

mhct avatar Sep 27 '16 11:09 mhct

Thanks @mhct for your solution. I've been told that version 3.10.x of the SDK would fix the problem. I've updated the driver to support SDK 3.10.x (tested with firmware 3.9). Is it possible for you to verify that?

mani-monaj avatar Oct 02 '16 01:10 mani-monaj

Hi All, I can confirm that the latest SDK fixed all problems with multiple drones. You can follow these instructions: https://github.com/tnaegeli/multiple_bebops to use multiple bebops in the same network. It works fine with the autonomy package.

best, Tobi

tnaegeli avatar Oct 08 '16 18:10 tnaegeli

Thanks @tnaegeli for verifying that SDK 3.10.x and the updated version of bebop_autonomy work fine with the multiple_bebops patch. I will add the link to that repo to the documentation. In your opinion is it possible to achieve the connect-to-an-access-point procedure simpler or more streamlined?

mani-monaj avatar Oct 12 '16 03:10 mani-monaj

Hi all, Is it possible to connect using 5GHz band instead of 2.4GHz? I am not able to do that by simply adding "bcmwl band a" to the script.

Best, Sam

SlouchyCat avatar Feb 17 '17 06:02 SlouchyCat

Hi all, I have a problem @tnaegeli , please I need help, I did everything, but I got this message: "telnet: could not resolve 192.168.43.1]/ telnet: name or service not know" someone knows why I got that message?

danjos91 avatar Jun 30 '17 08:06 danjos91

Hi, @dannyjose

First you should confirm you can ping your bebop. $ ping 192.168.43.1

Then you have to press the on/off button 4 times, to activate the telenet server at the bebop.

mhct avatar Jun 30 '17 11:06 mhct

Hi, @mhct

I've done every thing and it seemed fine but nothing worked after all. It made beep sound but when I checked ifconfig on drone shell it was still same and I couldnt ping for the settee IP, i.g) 192.168.0.x.

Can I get some advice from you?

IanMin1022 avatar Sep 17 '17 23:09 IanMin1022

Hi @mhct i get this when i execute the connect scritp: ESSID: bebop PASSWORD: bebop ADDRESS: 192.168.0.14 DRONE_IP: 192.168.43.1 Connection closed by foreign host.

can you help ?

bilelxlab avatar Sep 26 '17 17:09 bilelxlab

I'm not sure if this still works with the actual parrot firmware. But what shouls still work is chance the ip to: 192.168.x.1 and then use different usb wifi dongles. This is a workaround if you can not connect with the drone to a Router.

best, Tobi

2017-09-26 19:35 GMT+02:00 bilelxlab [email protected]:

Hi @mhct https://github.com/mhct i get this when i execute the connect scritp: ESSID: bebop PASSWORD: bebop ADDRESS: 192.168.0.14 DRONE_IP: 192.168.43.1 Connection closed by foreign host.

can you help ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AutonomyLab/bebop_autonomy/issues/15#issuecomment-332276053, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQU6r3RHujkkEBDruE7pM80AjJy1RoZks5smTXogaJpZM4GO_1y .

tnaegeli avatar Sep 26 '17 20:09 tnaegeli

@bilelxlab can you ping?

@tnaegeli I accessed with my own IP 192.168.0.9 and 192.168.0.18 but there is a problem here. I tried to connect both IP using roslaunch bebop_driver bebop_node.laucnh by changing launch file and bebop.cpp and I found out that I can't use another port for bebop 2 except 44444. Did you succeed to make multi drone with other way? Thanks

IanMin1022 avatar Sep 27 '17 06:09 IanMin1022

@tnaegeli do you mean change the ip adress in the roslauch with (param name="bebop_ip" value="192.168.1.14" /) ? when i do that i get :
[ERROR] [1506503854.147514340]: [ARDISCOVERY_Connection] 11:17:34:147 | ARDISCOVERY_Socket_Connect:721 - connect() failed: 101 Network is unreachable => Try reconnecting after 1 seconds

@lanMin1022 no i can't ping !

bilelxlab avatar Sep 27 '17 11:09 bilelxlab

@bilelxlab If you can’t ping then it means your PC and your drone is not on same AP. And the x.x.43.1 thingie- thats wired connection. If you want to connect your PC and drone on same AP like both are 192.168.43.x or 192.168.42.x or if you made your drone as a client mode, some other IP address.

IanMin1022 avatar Sep 27 '17 12:09 IanMin1022

@bilelxlab https://github.com/bilelxlab In the readme there is a second part called: To change the IP permanently. If you are only interested in having multiple bebops flying then use x usb wifi dongle. Each drone needs a own subnet. This means change the ip (as described in the readme) to 192.168.101.1 for the first drone, 192.168.102.1 for the second and so on (or whatever you like 192.168.x.1). Then you can connect each usb wifi dongle to the drone and you have as many local networks as drones. Change then the ip in the bebop.launch file:

use a new console for each drone (it turned out that the parrot driver has problems if you start more than one drone in a single launch file). I hope this helped.

If you still need to connect multiple drones to a single router, i'm not sure if this still works. I tested it the last time half a year ago and then it was not really stable anymore.

best, Tobi

2017-09-27 14:33 GMT+02:00 Ian_Min [email protected]:

@bilelxlab https://github.com/bilelxlab If you can’t ping then it means your PC and your drone is not on same AP. And the x.x.43.1 thingie- thats wired connection. If you want to connect your PC and drone on same AP like both are 192.168.43.x or 192.168.42.x or if you made your drone as a client mode, some other IP address.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AutonomyLab/bebop_autonomy/issues/15#issuecomment-332505922, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQU6qoW-O6xhJMVdq-_wYGji4IczfVrks5smkCugaJpZM4GO_1y .

tnaegeli avatar Sep 28 '17 08:09 tnaegeli

@IanMin1022

hemmm they are not on the same AP my router is 192.168.0.0 that's why in the script connect i gave ADDRESS= 192.168.0.14 ( if it's not like this what should i do ?)

or you mean i should do : ifconfig eth0 192.168.0.14 before unsing connect ?

bilelxlab avatar Sep 28 '17 14:09 bilelxlab

@tnaegeli I think if I get access to another port of Bebop, I can just do anything in same launch file. I'm still figuring out how to get another accessible port except 44444. Anyway seems like you are out of this project now. Thanks, and good luck for your next one.

@bilelxlab First, I think your PC and drone need to be on same AP and plus, before you launch the connect script, would you just get in to Bebop's shell and check ifconfig in there? And mmm... maybe I'm wrong but as I know router's IP is supposed to end with 1, e.g. 192.168.0.1.

IanMin1022 avatar Sep 29 '17 00:09 IanMin1022

@Ian_Min Sorry it was a missunderstanding. i thought you simply want to connect and fly several drones with your computer which is no problem and works gread. We fly here in the lab 4 Bebops without any issues.

2017-09-29 2:32 GMT+02:00 Ian_Min [email protected]:

@tnaegeli https://github.com/tnaegeli I think if I get access to another port of Bebop, I can just do anything in same launch file. I'm still figuring out how to get another accessible port except 44444. Anyway seems like you are out of this project now. Thanks, and good luck for your next one.

@bilelxlab https://github.com/bilelxlab First, I think your PC and drone need to be on same AP and plus, before you launch the connect script, would you just get in to Bebop's shell and check ifconfig in there? And mmm... maybe I'm wrong but as I know router's IP is supposed to end with 1, e.g. 192.168.0.1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AutonomyLab/bebop_autonomy/issues/15#issuecomment-332999280, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQU6mHt0ssSytPLllAZ63G6J0MHJdzAks5snDqBgaJpZM4GO_1y .

tnaegeli avatar Sep 29 '17 07:09 tnaegeli

@tnaegeli That's great. Did you make it by executing 4 launch files or other way?

IanMin1022 avatar Sep 29 '17 12:09 IanMin1022

@Ian_Min Since the newest updates (sdk & onboadr code) i have problems with a single lauch file (before it was working) and now it works 1 out of 5 trials. But using 4 different lauch files works great and there is absolute no problem.

2017-09-29 14:35 GMT+02:00 Ian_Min [email protected]:

@tnaegeli https://github.com/tnaegeli That's great. Did you make it by executing 4 launch files or other way?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AutonomyLab/bebop_autonomy/issues/15#issuecomment-333114380, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQU6jqofhZkYQu6Xq1yVjtCDdG2TDQkks5snOQbgaJpZM4GO_1y .

tnaegeli avatar Sep 29 '17 15:09 tnaegeli

@IanMin1022 ifconfig shows this !

eth0 Link encap:Ethernet HWaddr A0:14:3D:BC:A7:00
inet addr:192.168.0.105 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:233 TX packets:156 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:19190 (18.7 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

rndis0 Link encap:Ethernet HWaddr AE:26:88:F8:C8:F1
inet addr:192.168.43.1 Bcast:192.168.43.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:82 errors:0 dropped:0 overruns:0 frame:0 TX packets:80 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9072 (8.8 KiB) TX bytes:15144 (14.7 KiB)

my router is (192.168.0.1) i gave the good ssid and PW but i can't ping the drone !!!! can't understand what is wrong !!!!!

bilelxlab avatar Oct 02 '17 13:10 bilelxlab

@tnaegeli sorry i missed your email about the wifi usb dongle (Thank you for the details)

  1. about changing the IP adress: i am not trying to change it permanently i am trying just to connect to my router when i push the bebop botton 3 times this doesn't work too ?

bilelxlab avatar Oct 03 '17 08:10 bilelxlab

@bilelxlab i did this one ywar ago but have problems with the connection now. Therefore i switched to the usb-Wifi solution and have absolute no problems flying with multiple drones. Also the parrot app works without problems after changing the ip

2017-10-03 10:28 GMT+02:00 bilelxlab [email protected]:

@tnaegeli https://github.com/tnaegeli sorry i missed your email about the wifi usb dongle (Thank you for the details)

  1. about changing the IP adress: i am not trying to change it permanently i am trying just to connect to my router when i push the bebop botton 3 times this doesn't work too ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AutonomyLab/bebop_autonomy/issues/15#issuecomment-333774943, or mute the thread https://github.com/notifications/unsubscribe-auth/ACQU6gw3A6d-eEVimRqV6BRGqKrBvJrkks5sofA0gaJpZM4GO_1y .

tnaegeli avatar Oct 03 '17 12:10 tnaegeli