15 | | TODO |
| 15 | The demonstration is composed of two elements : the software running on the uav which make the uav follow the Apriltag (program called ApriltagFollower_uav) and the program processing a picture and returning the Apriltag pose in space (program called apriltags_detector). The main reason for the two different components is that the AR.Drone uav is not powerful enough to take care of the picture processing so we use another computation board (a Raspberry Pi). |
| 16 | |
| 17 | === Simulation === |
| 18 | |
| 19 | In simulation you have the two softwares on the same machine (your computer). The communication between the two softwares use socket but as your on the same computer, the local network is used. |
| 20 | |
| 21 | The picture shows the components and the communication : |
| 22 | |
| 23 | [[Image(2018-08-17_dge-schema-communication-simu.png)]] |
| 24 | |
| 25 | === In real === |
| 26 | |
| 27 | In real, things are different as one software runs on the uav and the other one on the Raspberry Pi. The communication between the two components still use sockets but this time it goes trough a network. As the only wire between the uav and the Raspberry Pi is an USB wire, we use Ethernet-over-USB feature to be able to use sockets. The network uses the usb0 interface of the uav and the Raspberry Pi. |
| 28 | |
| 29 | The picture shows this difference : |
| 30 | |
| 31 | [[Image(2018-08-17_dge-schema-communication-real.png)]] |
| 182 | }}} |
| 183 | |
| 184 | ===== Extra information about network ===== |
| 185 | |
| 186 | If you use your image for the Raspberry Pi, you may encounter some troubles with network communication. |
| 187 | |
| 188 | If you can't connect to the voliere router, please add these few words in the /boot/cmdline.txt file of the Raspberry Pi system : |
| 189 | |
| 190 | {{{ |
| 191 | cfg80211.ieee80211_regdom=GB |
| 192 | }}} |
| 193 | |
| 194 | The voliere router hds_platforms_roam use the channel number 13. But this channel does not exist in America, only in Europe. So you have to telle your Raspberry Pi that you are in Europe (America by default). |
| 195 | |
| 196 | The Raspberry Pi USB network is configured as follow (interface name : usb0, ip address : 192.168.7.36) : |
| 197 | {{{ |
| 198 | # Ethernet/RNDIS gadget (g_ether) |
| 199 | # ... or on host side, usbnet and random hwaddr |
| 200 | allow-hotplug usb0 |
| 201 | iface usb0 inet static |
| 202 | address 192.168.7.36 |
| 203 | netmask 255.255.255.0 |
| 204 | network 192.168.7.0 |
| 205 | gateway 192.168.7.1 |
| 206 | }}} |
| 207 | |
| 208 | If you want to change the configuration you will need to change a few extra things to make the communication between the programs on the uav and on the Raspberry Pi work. |
| 209 | |
| 210 | ==== Connecting the Raspberry Pi and the uav ==== |
| 211 | |
| 212 | If you have the Raspberry Pi in one hand and the uav in another hand, this section will explain to you how to connect them together. If the two elements are already connected together, you can directly go to the next section. |
| 213 | |
| 214 | First of all, you need a specific wire to connect the Raspberry Pi and the uav. The wire is a modified double usb male and looks like that : |
| 215 | |
| 216 | [[Image(cable_doc_small.png)]] |
| 217 | |
| 218 | So you have 4 elements to plug. Each usb port go in a female, the one going on the uav is indicated. Please be careful to plug the correct usb on the correct side otherwise it won't work. Below is a picture to connect the uav usb wire : |
| 219 | |
| 220 | [[Image(uav-usb_wiring.png)]] |
| 221 | |
| 222 | Then plug the two wires going on the Raspberry Pi. You can plug the usb port where you want. The small other connector goes in a specific place, as you can see in the picture below. '''Please be careful when you plug this connector, if you plug it anywhere else you will destroy the Raspberry Pi !''' |
| 223 | |
| 224 | [[Image(raspberry-pi_wiring.png)]] |
| 225 | |
| 226 | The last connector goes under the uav, like the picture below. You can't get wrong. |
| 227 | |
| 228 | [[Image(uav-power_wiring.png)]] |