Ap.parrot minidrone
Intro
Without Paparazzi the Parrot Minidrones are nice small flying quadrotor that can be flown over a Bluetooth connection with an Android or iOS device. But there it stops... Not any more: With a few simple clicks you can run Paparazzi on you Minidrone and let it perform whatever you wan it to. Well that is the intend, volunteers are hard at work to make it a reality.
Although there are various different Parrot minidrones, the base of all the drones is the same. that is why you see all this info on just one page.
NOTE: This page is a work in progress (WIP) and partly will not reflect the current state of Paparazzi and will contain major errors. Till the end of December 2017 this page will have greatly improved. If you can help, yes, please help out, if not... hope that other are willing to spend their time on improving support.
Supported Minidrones
Paparazzi have been tested with the special EDU Firmware v2.6.11. The original firmware doesn't allow bluetooth network connections. although one can upload a Paparazzi autopilotcode, one wil not have wireless telemetry. Discussion are opened with Parrot to distribute the alternate firmware or integrate the modification to the standard one. The supported models are:
Tested and basics working (not in master sourcecode yet as of 20171004)
- Swing
- Mambo
Later:
- Parrot Rolling Spider
Maybe:
The Maybe is since these airframes cannot create a IP network over bluetooth (no BNEP interface) by defaut. While it is possible from a hardware component side, setup of drivers not in default firmware. If one has time to hack it in, great. Or if Parrow would provide an furmware with this option, nice, but don't count on it. One could still try to hack a Mambo firmware on it somehow. Note that Paparazzi does run on thes if upload over USB network, but no telemetry. A 100% GPS (or vision) based flight belongs to the possibilities if you fancy that.
- Airborne Night
- Parrot Airborne Night Maclane
- Parrot Airborne Night Blaze
- Parrot Airborne Night Swat
- Airborne Cargo
- Parrot Airborne Cargo Travis
The Jumping Sumo and the Hydrofoil extension, while Paparazzi likely can run on those, since they cannot fly there are no plans for testing or support. If you have one and tested it with Paparazzi, great! Please make a pull request with any improvements you made, you're welcome.
Notes
This article assumes that you have already installed Paprazzi software on you local development PC. Used is Ubuntu 16.04. older version have different Bluetooth support, instructions there maydiffer.
Features
Connectivity
The minidrones have a Bluetooth Smart technology, Bluetooth V4.0 BLE device. Communication over older 2.0 bluetooth also possible after making some configuration changes on the Minidrone. Paparazzi can do this for you automatically
Sensors
Accelometer and gyroscope
- 3-axis gyroscope and 3-axis accelerometer (MPU 6050)
Pressure sensor
A Pressure is available an gives output, a better intergration is worked on (MS5607)
Ranging
- The Minidrone has a ultrasonic sensor, however this can not be used yet. It would be great if you read this to help write a driver for this sensor.
Info below is for developers and when it is working will be removed from here
/dev/ultra_snd
Vertical camera
- Vertical camera (not supported yet)
Note that when connected to USB camera is disabled so use a bluetooth connection to telnet and debug and develop in Info below is for developers and when it is working can be removed from here
Genesys chip
$ dmesg
gives:
... [ 0.634739] i2c /dev entries driver [ 0.636253] Linux video capture interface: v2.00 [ 0.637913] usbcore: registered new interface driver uvcvideo [ 0.637959] USB Video Class driver (1.1.1) ...
In the /dev derectory we find
lrwxrwxrwx 1 root root 6 Jan 1 00:00 vertical_camera -> video0
Killing the DragonProg and first and then running:
$ yavta -c -f YUYV -s 640x480 /dev/video0
Gives:
Device /dev/video0 opened. Device `USB2.0 Camera' on `usb-p6i-ehci.0-1.1' is a video capture device. Video format set: YUYV (56595559) 640x480 buffer size 614400 Video format: YUYV (56595559) 640x480 buffer size 614400 8 buffers requested. length: 614400 offset: 0 Buffer 0 mapped at address 0x40438000. length: 614400 offset: 614400 Buffer 1 mapped at address 0x40504000. length: 614400 offset: 1228800 Buffer 2 mapped at address 0x40646000. length: 614400 offset: 1843200 Buffer 3 mapped at address 0x407d5000. length: 614400 offset: 2457600 Buffer 4 mapped at address 0x40942000. length: 614400 offset: 3072000 Buffer 5 mapped at address 0x409f0000. length: 614400 offset: 3686400 Buffer 6 mapped at address 0x40a90000. length: 614400 offset: 4300800 Buffer 7 mapped at address 0x40b27000. 0 (0) [-] 1 614400 bytes 2897.416081 2897.453206 28.711 fps 1 (1) [-] 2 614400 bytes 2897.456086 2897.489326 24.997 fps 2 (2) [-] 3 614400 bytes 2897.492073 2897.528538 27.788 fps 3 (3) [-] 4 614400 bytes 2897.532074 2897.565110 24.999 fps
So nice...since this below would give a good start useing the camera withing Paparazzi
An example to capture an image [1]
Battery
- Swappable: Yes
- Type: Lithium-polymer 1s
- Capacity: 550mAh
- Charging time: about 25 minutes
- Compatibility: Parrot Mambo, Swing Jumping Night, Jumping Race, Airborne Night, Airborne Cargo and Hydrofoil
How to connect
There are two ways to connect a Parrot Minidrone with Paparazzi. The first one is an USB cable and the second one is via a Bluetooth connection. Both have the possibility to transfer files through FTP and execute programs over telnet. Note that connecting over USB disables the vertical camera, as it uses the same USB bus. Also free flight with USB attached is not ideal.
Pre steps
Latest Parrot firmware needs some button pressing action before we can start using the connection in combination with Paparzzzi
4x Button press
After the drone is fully started, on e.g. the Mambo visible by green LED's, then press the small on/off button four times (4x) in succession Note that it will take a while before the Connection is ready.
Automatic
Always 4x pressing the button after a battery swap is not ideal. It is possible to disable this and automatically be able to have a connection. It is tested and work but a description or better automatic flag is nit the work an will be added to this wiki and the sourceode
Connect via USB
- Plug in a micro-usb cable from your Drone to the computer
- Switch on your Minidrone
- A new network device will show up
- Connect with 192.168.2.1 through ftp or telnet
Connect via Bluetooth
Using blueman tool (tested with Ubuntu 16.04)
- Install blueman via:
sudo apt install blueman
- Power up your Minidrone
- Enable bluetooth on your computer, this can be done from blueman applet if present
- Scan or select your Minidrone from the list of the peripheral
- Configure this peripheral and select the "network access point" connection type
- A new network connection should appear
- To test go to your terminal and execute this line:
ifconfig bnep0
Result something like this:
bnep0 Link encap:Ethernet HWaddr 5c:e0:c5:63:8e:5d inet adr:192.168.3.2 Bcast:192.168.3.255 Masque:255.255.255.0 ...
- The minidrone has the IP 192.168.3.1, connect over bluetooth network with telnet via:
telnet 192.168.3.1
(With an USB the connection is via 192.168.4.1)
Older Ubuntu versions using the pand tool
- Execute "hcitool scan" and look for the mac address of the "RS_...." device. (If you cannot find it look at #Setup normal Bluetooth)
- Install the bluez-utils package (if not installed) with "sudo apt-get install bluez-utils"
- Execute "sudo pand --connect <MAC address> -dGN -n", to connect to the bluetooth of the drone. *
- Execute "sudo ifconfig bnep0 192.168.2.3 up", to setup the ethernet device over bluetooth. *
- Connect with the drone with telnet via:
telnet 192.168.2.1
Setup normal Bluetooth
This part doesn't seem to be needed anymore!!!
- First connect over Bluetooth 4.0 or USB to the drone as described above
- Connect with telnet to the drone. (telnet 192.168.*.1)
- Open the "/etc/init.d/rcS" file and search for the line with "BLEproxy". (vi /etc/init.d/rcS)
- Now change the "BLEproxy" to "BLEproxy --normalbt"
- Reboot your drone by executing: "reboot". (This makes sure the filesystem is saved)
Upload Paprazzi
If you do have a connection, press the upload button in the Paparazzi center
Airframe
At the moment, the Swing and Mambo airframes are supported and an example airframe is available. Choose Parrot_Mambo or Parrot_Swing
Note that while the Swing is a transitional airframe a full transistional configuration is not yet available but worked on to make it a reality soon.
Power button
Once the Paparazzi autopilot is running, the original Parrot software is stopped, but keeping the network connection open. A side effect is that the power button needs to be managed by Paparazzi as well. When pressing it, the board will reboot, restarting immediately with the original software. Pressing again the button will stop the minidrone.
Bottom camera
All minidrones have a camera which can be used for various purposes. 640x480 pixels. Note that a camera module for Paparazzi is not created yet. Feel free to help out.
Optic Flow
Using the Optic flow module and the bottom camera the Drone should be able to hover still.
Extend Hardware
GPS + Magneto
An GPS + Magneto module with I2C out connected to the USB port with a FTDI FT232H to 12C adapter] board, while possible, not done yet. Work is on its way to test it.
Serial
XBee and Si10xx based modems
By using external modems via an USB to serial adapter it would be possible to extend the telemetry range of the drones.
Micro laser range ring
A TU Delft project is in the works to make it possible to fly autonomous inside a building using micro laser rangers. See here... {TODO}
Links
Some links that might be helpful for developers or otherwise