3drobotics / solodevguide

Solo Development Guide (SDG).
http://dev.3dr.com/
41 stars 62 forks source link

Brand new drone - example OpenCV causes drone to disconnect #306

Closed alexblack closed 8 years ago

alexblack commented 8 years ago

See: https://github.com/3drobotics/solodevguide/tree/master/examples/opencv

Steps to repro

  1. Buy a brand new 3DR Solo, and GoPro 4 Silver (did this 1 hour ago)
  2. Get the drone setup (ssh, install pip, git etc)
  3. Copy examples/opencv onto the drone
  4. python SoloCamera.py
  5. See output showing images get captured
  6. Drone then beeps a few times, disconnects, and lights flash continually red
root@3dr_solo:~/ddc/examples/opencv# python SoloCamera.py
Capturing 10 images...
24.2929773247
19.1299731361
20.4394803271
83.6385100104
41.010462092
44.9218048817
32.2059062918
50.0878204899
53.7896788756
30.4276832674
40.4957228648
30.6560832639
97.9153982631
53.1011938673
70.7612781321
16.9127207184
1.89259127233
21.8193092613
22.2628782531
54.4545076859
51.9830453858
45.2572267121
39.8168217201

Here is what I did to setup the drone

3DR Solo first time setup

Normal setup

root@3dr_solo:~# df -h
Filesystem                Size      Used Available Use% Mounted on
none                     85.2M     12.0K     85.2M   0% /dev
/dev/mmcblk0p2           95.8M     73.3M     22.5M  77% /mnt/boot
/dev/loop0               64.6M     64.6M         0 100% /mnt/rootfs.ro
/dev/mmcblk0p3           92.0M     50.3M     37.0M  58% /mnt/rootfs.rw
none                     92.0M     50.3M     37.0M  58% /
tmpfs                   249.9M    184.0K    249.8M   0% /run
tmpfs                   249.9M     16.0K    249.9M   0% /var/volatile
root@3dr_solo:~# df -h
Filesystem                Size      Used Available Use% Mounted on
none                     85.2M     12.0K     85.2M   0% /dev
/dev/mmcblk0p2           95.8M     73.3M     22.5M  77% /mnt/boot
/dev/loop0               64.6M     64.6M         0 100% /mnt/rootfs.ro
/dev/mmcblk0p3          666.4M     52.2M    579.9M   8% /mnt/rootfs.rw
none                    666.4M     52.2M    579.9M   8% /
tmpfs                   249.9M    188.0K    249.8M   0% /run
tmpfs                   249.9M     16.0K    249.9M   0% /var/volatile
/dev/mmcblk0p4            6.3G     15.9M      6.0G   0% /log

This allocates a lot of space to the primary parition for development (instead of for logs)

alexblack commented 8 years ago

Now, I can't get the sample above to start, even after doing solo video acquire and rebooting

root@3dr_solo:~/ddc/examples/opencv# python SoloCamera.py
VIDIOC_QBUF (start) error 22, Invalid argument
failed to open gopro
closing camera...
Exception AttributeError: "'NoneType' object has no attribute 'solocam_close'" in <bound method SoloCamera.__del__ of <__main__.SoloCamera object at 0x7f41b0>> ignored
alexblack commented 8 years ago

Haven't solved the disconnect issue, but, in general the video issues like error 22 above were solved by: https://github.com/3drobotics/solodevguide/issues/302