Changes between Version 6 and Version 7 of apriltagsfollower


Ignore:
Timestamp:
08/17/18 16:43:15 (6 years ago)
Author:
Thomas Fuhrmann
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • apriltagsfollower

    v6 v7  
    1313== How does the demonstration work ? ==
    1414
    15 TODO
     15The 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
     19In 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
     21The picture shows the components and the communication :
     22
     23[[Image(2018-08-17_dge-schema-communication-simu.png)]]
     24
     25=== In real ===
     26
     27In 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
     29The picture shows this difference :
     30
     31[[Image(2018-08-17_dge-schema-communication-real.png)]]
    1632
    1733== Folder organization ==
     
    147163Once you have the uav, you will need to get a Raspberry Pi 3 board. In theory you have one board with the uav. If not, things will be a little bit more complicated as you will have to find a board and flash the correct distribution with the correct programs...
    148164
    149 TODO : put a generic working rpi image on a server to be able to flash easily a raspi with the correct image
    150 
    151165Okay, you have an uav and a raspberry pi, now you have to connect them together ! If you are lucky, it's already done, if not, take a look to the next section.
    152166
    153 ==== Connecting the Raspberry Pi to the uav ====
    154 
    155 TODO + add pictures
    156 
    157 cmdline.txt file : cfg80211.ieee80211_regdom=GB
    158 
    159 Pi usb0 ip : 192.168.7.36
    160 
     167==== Creating a SD-card ====
     168
     169If you have to create a SD-card for the Raspberry Pi, this section is for you. If not, you can skip this section and go to the next one.
     170
     171We have saved an image of the operating system for the Raspberry Pi so you don't have to reinstall all from scratch. Download the image and uncompress it :
     172
     173{{{
    161174wget https://uav.hds.utc.fr/src/rpi/latest/2018-08-17_apriltagfollower_demonstration_rpi.img.tgz
    162175tar xzf 2018-08-17_apriltagfollower_demonstration_rpi.img.tgz
     176}}}
     177
     178Then plug the SD-card and launch the flashing process. We assume your SD-card is on the mmcblk0 port :
     179
     180{{{
    163181dd if=2018-08-17_apriltagfollower_demonstration_rpi.img bs=4M | pv -pterb | sudo dd of=/dev/mmcblk0 bs=4M
     182}}}
     183
     184===== Extra information about network =====
     185
     186If you use your image for the Raspberry Pi, you may encounter some troubles with network communication.
     187
     188If 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{{{
     191cfg80211.ieee80211_regdom=GB
     192}}}
     193
     194The 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
     196The 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
     200allow-hotplug usb0
     201iface 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
     208If 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
     212If 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
     214First 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
     218So 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
     222Then 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
     226The last connector goes under the uav, like the picture below. You can't get wrong.
     227
     228[[Image(uav-power_wiring.png)]]
    164229
    165230=== Power on the uav ===
     
    228293
    229294{{{
    230 TODO
    231 }}}
    232 
    233 It may crash because the dsp program is not present. You can get it from ???
    234 
    235 {{{
    236 TODO
     295cd folder_location
     296./ApriltagFollower_ardrone2.sh
     297}}}
     298
     299It may crash because the dsp program is not present. You can get it from the flair-hds repository.
     300
     301{{{
     302scp $FLAIR_ROOT/flair-hds/bin/lib/dsp/dspcv_dsp.out root@uav_ip_address:folder_location
    237303}}}
    238304