Disco

From PaparazziUAV
Jump to navigation Jump to search
Parrot Disco


Introduction

The Parrot Disco is a Wifi controlled fixed-wing aircraft, originally designed for FPV flights. The hardware electronic components are very close the the Bebop quadrotor and the same principle can be applied to fly in full autonomous mode with Paparazzi.

Features

Here are some differences or addition compared to the Bebop hardware:

PWM

The Disco has 6 PWM outputs available with the following mapping:

  • Internal mapping of the PWM with output index
  • servo rail 1 <-> linux pwm_4
  • servo rail 2 <-> linux pwm_5
  • servo rail 3 <-> linux pwm_6
  • servo rail 4 <-> linux pwm_1
  • servo rail 5 <-> linux pwm_2
  • servo rail 6 <-> linux pwm_3

Radio Control Input

A radio control input is available for RC based on serial protocols such as Spektrum serial or SBUS out. Since the SBUS protocol is using an inverted logic (serial idle low), the signal input pin is tight to two UARTs internally and can be accessed with the the following symbolic links:

  • /dev/uart-sbus: the signal is inverted
  • /dev/uart-sumd: the signal is not inverted

The RC input is recommended for the safety link instead of using the Wifi link to control the plane in manual or assisted mode.

Automatically start 2 button press

In order to automatically start the 2-button press mode which is required in order to upload the paparazzi autopilot or to start an ftp session, you just have to enable the initial status of the telnet session.

First press the power button 2 times in order to activate the telnet session. Then telnet to it using

$ telnet 192.168.42.1

Mount and remount the drive to obtain write access to the files using

$ mount -o remount,rw /

Then change the /etc/boxinit.d/50-telnetd.rc file using:

$ vi /etc/boxinit.d/50-telnetd.rc

Go into write mode using :w + [Enter] and press i to go into insert mode. Change to disabled to enabled to automatically enable telnet.

Write to the file using :w + [Enter] and quit by pressing [Esc] and type :x + [Enter]

GPS

The GPS used is a uBlox M8N.

Modifications

Exernal Receiver

A long range telemetry can be connected to the USB bus via e.g. a USBtoSerial board. One needs to install drivers for this on the disco. A complete page is on the Bebop part of the wiki.

4G connection

A 4G to the USB can be used for telemetry over cellular network

Satcom

A small iridium sat transeiver can be used.

RTK GPS

The GPS module can be desoldered and replaced with a M8P in case one wants to use RTK.

Real-time kinematic positioning is a GPS system which uses to GPS modules in order to improve GPS accuracy. The 'base station' is located at a precisely known location. The coordinates of the base station are used in order to derive the propagation errors at the current location. The errors are then send to the 'rover station' in order to improve accuracy up to centimeter-level.

In order to use a RTK positioning system both rover- and base station have to be set up. Both base and rover board are identical, they only differ by their configuration. This tutorial explains how to set up the Parrot Disco for RTK usage in case a u-blox C94-M8P module is used.

Necessary software

In order configure both base and rover station, first you have to download u-center from their website. Wine will be needed as well to run u-center on Ubuntu. Start u-center using Wine and connect the base station via USB. While wine is able to configure the rtk messages and the setup, it should be noted that updating the GPS software using wine was not possible.

Note: In case you can not change the settings in the U-center, probably the receiver is polling the current setting to often. Turn off auto-poll with the buttons on the bottom left corner of the configuration window.

Note2: Each time you change the settings in the U-center you have to send the data to the board using the send button in the bottom left corner of the configuration view. Then go to UBX-CFG-CFG and chose all 4 devices to save the configuration too.

Setup of Ground station

First you find out the port that your GPS module is connected to using dmesg after the device has been connected. The figure gives an example where the modem has been connected to /dev/ttyACM0.

GPS module has been connected to /dev/ttyACM0

Link the corresponding port to a wine com port using:

   $ cd ~/.wine/dosdevices
   $ ln -sf /dev/ttyACM0 ./com32

If you open U-center now you should be able to connect to COM port 32 (as seen in the Figure).

Connect to a COM port in U-center

To setup the ground station for RTK usage, then go the 'Message View' from the 'View' hotbar. Scroll down until you find the MSG (UBX-CFG-MSG) menu. Check the USB output on the RTCM 1005 (Station coordinates) message and click the send button on the lower left corner. This step must be repeated for the RTCM 1077 (GPS Observations), RTCM 1087 (GLONASS observations) and the RTCM 1230 (GLONASS code-phase biases) message (don`t forget to hit the send button each time or your changes won`t be saved).

Configuration for ground station output

Next you have chose how the base station calculated it`s position. This can be done in TMODE3 (UBX-CFG-TMODE3). You will have 2 choices: Survey-in (if you don`t know the exact position) and Fixed (if you know the exact position). Don`t forget to click the send button after chosing your configuration. In case you selected the Survey-In mode, you can go to UBX-NAV-SVIN to see the status of the survey.

Configuration for ground station position

Finally, the rate has to be set to the same measurement period and navigation rate as in the rover station. It is recommended to just start paparazzi with all the required modules and then see the configured rates on the Disco itself. The reason for this is that several paparazzi modules might change the ublox configuration at startup. (In the case of the Dezember 2019 master version, the navigational rate is set to 1 cyc and the measurement period to 250 ms in case the ubx_ucenter module is used for configuration).

After having configured both the rates and the ports, you just have to specify which messages will be send. Go to the MSG (Messages) menu again and disable all NMEA messages. Then enable NAV-POS-LLH, NAV-STATUS NAV-SOL and NAV-VELNED. These are required to obtain positional information, however not in case only RTK is used. Hit send after each change.

The last step is to save the whole configuration. Go to the Configuration menu (UBX-CFG-CFG), select all 4 devices and click send. You have now successfully configured your base.

Setup of Rover station

The rover is the module that receives RTCM messages. It will automatically go into RTK operational mode as soon as a RCTM message is received and thus only the radio link has to be configured correctly.

In order to setup the rover stations first a serial bidirectional terminal access has to be obtained.

After coupling the GPS module of the drone to the wine com port, U-center should be able to connect to the rover module.

Go to the Message View from the View hotbar again and scroll down until you find the PRT (Port) section (UBX-CFG-PRT). Enter your autopilot`s GPS port`s baudrate to allow it to communicate correctly. This is necessary as the GPS connection is serial and thus the baudrate is not controlled by any other protocol. Click the send button in the lower left corner.

Then you have to modify the frequency of the chip. Go to the RATE (Rates) menu (UDX-CFG-RATE) and change the Measurement period to the same period you have set on the base station. Press the send button again. Note, it might be possible that either paparazzi or your own board autopilot (Parrot for example) overwrite this change at each startup. In order to overcome this problem simply change the Rate on your ground station instead of on the Drone.

Finally, save the configuration from the CFG (Configuration) menu (UDX-CFG-CFG). Select all four devices and click send. You have successfully set up your rover station.

Configuration for Rover output

Moving baseline rtk

In case the ground station is not staying at a fixed position and moving (on a boat/car for example), the base station has to be set up for moving baseline.

For this, nearly the same step as in the rover station setup has to be performed. In addition to this, message 4072 has to be enabled for the USB output. This will automatically disable message 1005. Furthermore, TMODE3 has to be set to Disabled instead of Survey-In or Fixed.

The setup of the rover station is equivalent.

In order to allow moving baseline operation, a firmware upgrade on the NEO M8P module towards firmware 1.40 is required. Upgrading the firmware on wine under Ubuntu was not possible and a direct link between the GPS module and a Windows computer running the newest version (19.12) of u-center was required as well. The ground station can thus simply be upgraded using a standart usb cable connected to it. For the reference module in the Parrot Disco itself, the GPS module had to be desoldered and soldered on a USB connector. The firmware update then had to be performed from this connector after which the module could be soldered again into the Disco.

Direkt Ground Station to Rover Debugging

In case you are trying to debug messages and see whether the actual RTK setup is set correctly, it is also possible to send the data from the ground station to the Disco directly. A couple of steps are required in order to do so:

First, connect to the Disco and upload the paparazzi autopilot to it. Telnet into the Disco and kill the autopilot process using

   $ killall ap.elf


After this, you are required to set up a serial bidirectional terminal access for the Disco and simply connect your ground station to a serial device as well. You should now have a serial device connected to the ground station and one to the rover. The last step is to combine these to serial devices using:

   $ socat /dev/ttyACM0,raw,echo=0,crnl /dev/pts/6,raw,echo=0,crnl

where /dev/tty/ACM0 is your ground station device and /dev/pts/6 is your serial bidirectional terminal access. All the RTCM messages from the ground station are now send to the Disco and vice versa. In U-center you can connect to both the Disco and ground station and debug using Packet Console etc.

Alternative servo

If your servo is broken one an use a Hitec Digital 5055MG as a direct fit replacement