ARDrone: Unterschied zwischen den Versionen
(→OLSRD Configuration and FunkFeuer Setup) |
(→OLSRD Configuration and FunkFeuer Setup) |
||
Zeile 164: | Zeile 164: | ||
Ip4Broadcast 255.255.255.255 | Ip4Broadcast 255.255.255.255 | ||
} | } | ||
+ | Press [ ESC ] andy type [ :wq ]. | ||
+ | * Create startupfile with IP/BSSID/ESSID... Setting´s | ||
+ | vi /etc/init.d/olsr.sh | ||
+ | Press [ i ] / Copy & Paste | ||
+ | #!/bin/sh | ||
+ | |||
+ | # kill all olsrd/httpd sessions and delete lock file... | ||
+ | # we can use this script to do restart´s | ||
+ | killall olsrd | ||
+ | killall httpd | ||
+ | rm /var/run/olsrd-ipv4.lock | ||
+ | |||
+ | # ready to setup wireless interface switch to adhoc, bssid, essid | ||
+ | ifconfig ath0 down | ||
+ | iwconfig ath0 mode ad-hoc | ||
+ | iwconfig ath0 channel 13 | ||
+ | iwconfig ath0 ap 26:A7:D4:E4:4F:4D | ||
+ | iwconfig ath0 essid ardrone.freiesnetz.funkfeuer.at | ||
+ | |||
+ | ifconfig ath0 78.41.113.10 netmask 255.255.255.0 up | ||
+ | ifconfig ath0:1 192.168.1.1 netmask 255.255.255.0 up | ||
+ | |||
+ | olsrd | ||
=== FILESYSTEM === | === FILESYSTEM === |
Version vom 13. November 2010, 21:14 Uhr
Inhaltsverzeichnis
AR.Drone
Parrot produces a very nice quadcopter called "AR.Done"
Homepage: http://ardrone.parrot.com/parrot-ar-drone/usa/
In Vienna you can get them at Mediamarkt for 300,- EUR
We plan to make a mesh of flying drones.
FAQ
- how long can it fly?
Approximately 15 minutes
- how much can it carry?
Approx. 200 grams
Documentation
Hardware
- Linux myhost 2.6.27.47-parrot-01227-g93dde09 #1 PREEMPT Fri Jul 2 15:23:06 CEST 2010 armv5tejl GNU/Linux
- Processor : ARM926EJ-S rev 5 (v5l)
- Mykonos Parrot platform,
- REv: 0904
- Memory: 128MB RAM
- Wi-Fi: AR6000
# cat /proc/cpuinfo Processor : ARM926EJ-S rev 5 (v5l) BogoMIPS : 233.47 Features : swp half thumb fastmult edsp java CPU implementer : 0x41 CPU architecture: 5TEJ CPU variant : 0x0 CPU part : 0x926 CPU revision : 5 Cache type : write-back Cache clean : cp15 c7 ops Cache lockdown : format C Cache format : Harvard I size : 32768 I assoc : 4 I line length : 32 I sets : 256 D size : 16384 D assoc : 4 D line length : 32 D sets : 128 # free total used free shared buffers Mem: 126072 12480 113592 0 0 Swap: 0 0 0 Total: 126072 12480 113592
Hardware : Mykonos Parrot platform Revision : 0904 Serial : 0000000000000000
The Wi-Fi chip seems to have it's own SDIO interface driver. Anyway, the good news for us is, that ad-hoc mode works very well.
OLSRD - HowTo / Build @ Debian 5.0
Add new Source to /etc/apt/sources.list:
deb http://www.emdebian.org/debian/ lenny main
Get new Update´s!
sudo apt-get update
Copy & Paste into Shell:
sudo apt-get install emdebian-archive-keyring libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi gcc-4.3-arm-linux-gnueabi g++-4.3-arm-linux-gnueabi apt-cross dpkg-cross libncurses5-dev sudo apt-get update
Download/Extract Latest STABLE OLSRD Release: (Example)
wget http://www.olsr.org/releases/[VERSION]/olsrd-[VERSION].tar.gz tar xfv olsrd-[VERSION].tar.gz cd olsrd-[VERSION]
Edit Makefile.inc:
vi Makefile.inc
Press [ i ]
CC=gcc-4.3-arm-linux-gnueabi
Press [ ESC ] & type [ :wq ] & PRESS ENTER
Compile OLSRD:
make make libs
Now olsrd is Compiled and ready for AR.Drone!
Copy Compiled OLSRD to AR.Drone
You need:
- Laptop with Wireless LAN
- Local Webserver (MacOS X has one ;)
- Compiled OLSR Binary´s (Plugin´s, OLSRD)
- Connect your Laptop with AR.Drone
- Wait few seconds for IP (192.168.1.2)
- Open a shell window and telnet into AR.Drone
telnet 192.168.1.1
- Lets create some Folder´s on AR.Drone
mkdir /data/apps mkdir /var/run
- Copy OLSRD Binary
cd /data/apps wget http://192.168.1.2/~[USERNAME]/olsrd ln -s /data/apps/olsrd /bin/olsrd chmod 777 /bin/olsrd
- Copy OLSRD_LIB´s
cd /lib wget http://192.168.1.2/~[USERNAME]/olsrd_txtinfo.so.0.1 wget http://192.168.1.2/~[USERNAME]/olsrd_httpinfo.so.0.1 wget http://192.168.1.2/~[USERNAME]/olsrd_watchdog.so.0.1
OLSRD Configuration and FunkFeuer Setup
- Create olsrd.conf
vi /etc/olsrd.conf
Press [ i ] / Copy & Paste
DebugLevel 0 IpVersion 4 AllowNoInt yes FIBMetric "flat" Pollrate 0.025 RtProto 111 TcRedundancy 2 Willingness 7 MprCoverage 7 LinkQualityFishEye 0 LinkQualityAlgorithm "etx_ff" LinkQualityLevel 2 UseHysteresis no LoadPlugin "olsrd_txtinfo.so.0.1" { PlParam "Port" "2006" PlParam "Accept" "127.0.0.1" } LoadPlugin "olsrd_httpinfo.so.0.1" { PlParam "Net" "0.0.0.0 0.0.0.0" PlParam "port" "8000" } LoadPlugin "olsrd_watchdog.so.0.1" { PlParam "file" "/tmp/0xffolsr_watchdog" PlParam "interval" "50" } Interface "ath0" { Mode "mesh" } InterfaceDefaults { HelloInterval 5.0 HelloValidityTime 100.0 TcInterval 3.0 TcValidityTime 500.0 MidInterval 30.0 MidValidityTime 500.0 HnaInterval 30.0 HnaValidityTime 500.0 Ip4Broadcast 255.255.255.255 }
Press [ ESC ] andy type [ :wq ].
- Create startupfile with IP/BSSID/ESSID... Setting´s
vi /etc/init.d/olsr.sh
Press [ i ] / Copy & Paste
#!/bin/sh
# kill all olsrd/httpd sessions and delete lock file... # we can use this script to do restart´s killall olsrd killall httpd rm /var/run/olsrd-ipv4.lock
# ready to setup wireless interface switch to adhoc, bssid, essid ifconfig ath0 down iwconfig ath0 mode ad-hoc iwconfig ath0 channel 13 iwconfig ath0 ap 26:A7:D4:E4:4F:4D iwconfig ath0 essid ardrone.freiesnetz.funkfeuer.at
ifconfig ath0 78.41.113.10 netmask 255.255.255.0 up ifconfig ath0:1 192.168.1.1 netmask 255.255.255.0 up olsrd
FILESYSTEM
-> / bin dev factory home mnt root sys update var data etc firmware lib proc sbin tmp usr www
-> /bin ash cp false ip mv pwd stat vi busybox cttyhack fgrep ipcalc netstat random_ip stty watch cat date gdbserver kill olsr.sh random_mac sync wifi_setup.sh channelselector dd getopt ln olsrd reset_dhcp.sh tar zcat check_update.sh df grep ls pairing_setup.sh rm touch checkplf dmesg gunzip mkdir pidof rmdir true chgrp echo gzip mknod ping sed umount chmod egrep hostname mktemp program.elf sh uname chown factory_reset_cb httpd mount ps sleep usleep
-> /etc fstab hostname httpd.conf init.d ld.so.cache olsrd.conf profile udhcpd.conf group hosts inetd.conf inittab nsswitch.conf passwd protocols
-> /etc/init.d rcS
-> /sbin arp fdisk ifconfig insmod iwgetid iwspy mdev modprobe rmmod switch_root udhcpc blkid halt ifrename iwconfig iwlist klogd mkdosfs poweroff route sysctl zcip fbsplash hwclock init iwevent iwpriv lsmod mkfs.vfat reboot setconsole syslogd
-> /data accs_infos.bin emergency.bin log_bin syslog.bin video apps fact_accs_infos.bin navdata_blackbox.bin sys?og.bin www config.ini fact_trims.bin random_mac.txt trims.bin
AR.Drone Configuration File (/data/config.ini)
# cat config.ini [general] num_version_config = 1 num_version_mb = 17 num_version_soft = 1.3.3 soft_build_date = 2010-09-22 15:30 motor1_soft = 0.0 motor1_hard = 0.0 motor1_supplier = 0.0 motor2_soft = 0.0 motor2_hard = 0.0 motor2_supplier = 0.0 motor3_soft = 0.0 motor3_hard = 0.0 motor3_supplier = 0.0 motor4_soft = 0.0 motor4_hard = 0.0 motor4_supplier = 0.0 ardrone_name = My ARDrone flying_time = 630 navdata_demo = TRUE com_watchdog = 2 video_enable = TRUE vision_enable = TRUE vbat_min = 9000 [control] accs_offset = { -2.1041426e+03 1.9623026e+03 2.0612791e+03 } accs_gains = { 9.8346788e-01 2.0515487e-02 1.5799545e-02 -1.3670200e-02 -9.8090577e-01 1.9539831e-02 5.9470539e-03 -3.6688969e-02 -9.7911078e-01 } gyros_offset = { 1.6544460e+03 1.6738420e+03 1.6580200e+03 } gyros_gains = { 6.9924705e-03 -7.0605604e-03 -3.7827170e-03 } gyros110_offset = { 1.5891379e+03 1.6813199e+03 } gyros110_gains = { 1.5292658e-03 -1.5492389e-03 } gyro_offset_thr_x = 4.0000000e+00 gyro_offset_thr_y = 4.0000000e+00 gyro_offset_thr_z = 5.0000000e-01 pwm_ref_gyros = 470 control_level = 0 shield_enable = 1 euler_angle_max = 3.4906584e-01 altitude_max = 10000 altitude_min = 50 control_trim_z = 0.0000000e+00 control_iphone_tilt = 5.8549303e-01 control_vz_max = 1.0000000e+03 control_yaw = 3.4906585e+00 outdoor = TRUE flight_without_shell = TRUE brushless = TRUE autonomous_flight = FALSE manual_trim = FALSE indoor_euler_angle_max = 2.0943952e-01 indoor_control_vz_max = 7.0000000e+02 indoor_control_yaw = 1.7453293e+00 outdoor_euler_angle_max = 4.6401200e-01 outdoor_control_vz_max = 1.3894274e+03 outdoor_control_yaw = 5.1314220e+00 [network] ssid_single_player = ardrone_v1.3.3 ssid_multi_player = ardrone_v1.3.3 infrastructure = TRUE secure = FALSE passkey = navdata_port = 5554 video_port = 5555 at_port = 5556 cmd_port = 0 owner_mac = 00:00:00:00:00:00 owner_ip_address = 0 local_ip_address = 0 broadcast_address = 0 [pic] ultrasound_freq = 8 ultrasound_watchdog = 3 pic_version = 262192 [video] camif_fps = 15 camif_buffers = 2 num_trackers = 12 [detect] enemy_colors = 1 enemy_without_shell = 0 detect_type = 3 [syslog] output = 7 max_size = 102400 nb_files = 5