Table of Contents
incorporate all information that is still useful into other pages!
AR.Drone Setup - First Steps Tutorial
Unboxing and Initial Configuration
It is important that the steps in this section are followed in order.
- microUSB cable
- microSD or microSDHC card and reader
- At least three jumper wires (or plain telephone wire) soon not needed any more
- At least one FTDI 3.3V UART cable soon not needed any more
If you have the PX4 Toolchain installed (most users won't) there is no need to install the drivers separately.
- Windows: PX4FMU and PX4FLOW Windows driver installer (32/64 bit) (Alternative: ZIP file, manual installation)
- Mac OS: Comes with in-built drivers, no additional driver for the micro USB port, but you need the VCP drivers (32/64 bit) on MacOS X Lion or above for the FTDI connection
- Linux: Comes with in-built drivers, no additional driver needed
PX4FMU is on delivery equipped with a recent (not the most recent) version of the PX4 OS. If it is not connected to a carrier board and has no microSD card plugged in, it will boot into the command line (NuttShell) and show a solid blue led.
- Plug PX4FMU into your computer.
- Windows: If it fails to install the correct driver, install the driver manually: Follow the instructions on the downloads page.
- Mac OS: Your operating system is not as broken as Windows and does not need a special driver.
- Linux: Your operating system is not as broken as Windows and does not need a special driver.
This step will soon be replaced by an USB COM port. Right now (November 2012) this setup is however required.
Plug your radio modem into the socket in the front of the board.
Connecting to the Command Line
The onboard applications will later be started from the SD card and the command line does not need to be accessed for normal flight operation. For this tutorial we will however start the applications manually. The instructions how to open up the terminal connection are taken from this page: serial_connection.
Download and install TeraTerm (if you have the PX4 Toolchain installed, it will already be installed on your system).
- Select Settings from the menu
- Select COM Port
- Choose the COM port of the FTDI adapter connected to USART1 of PX4FMU
- Select 57600 baud, no parity, 8 data bits, 1 stop bit (57600 8N1)
Hit enter in TeraTerm. You should see the NSH prompt:
Linux, Mac Os and general UNIX
screen. On Debian / Ubuntu:
sudo apt-get install screen
Mac OS does already come with
screen installed. Start it in the terminal with:
screen /dev/where/ftdi/adapter/is/connected 57600 8N1
Hit enter, you should see the NSH command prompt.
Recommended: Starting MAVLink on a separate port
Starting MAVLink and connecting it to a GCS is very easy:
nsh> mavlink start -d /dev/ttyS1 -b 57600
This starts MAVLink on USART2 (remember, all *nix systems count from ttyS0 upwards, and since UART3 and UART4 are not configured on PX4FMU: USART1 = ttyS0, USART2 = ttyS1, UART5 = ttyS2, UART6 = ttyS3).
Connect now QGroundControl or Mission Planner on the UART / COM port where the second FTDI adapter is connected to. You should see heartbeats.
Now close screen (press Ctrl+Alt, then press \. Then press Y) or TeraTerm. Fire up QGroundControl or Mission Planner and connect it to the port where TeraTerm was connected before. You should see heartbeats.
Setting up a microSD autostart script
The instructions here are taken from this page: auto_starting_apps. To start a very basic setup that does not actuate any servos, just gives sensor readings and basic GCS connectivity, create a folder
etc on the microSD card and put a text file named
rc in it (so the absolute file name is
/etc/rc on the microSD card):
Auto Starting with one connected FTDI Adapter
If the same port is used for NSH / NuttShell and MAVLink, the start script needs an additional
exit command on the last line to quit the shell. Also, you will (usually) be using UART1.
#!nsh set MODE developer set USB no echo "[init] doing testing startup..." # # Start the ORB # uorb start # # Init the EEPROM # echo "[init] eeprom" eeprom start if [ -f /eeprom/parameters ] then param load fi # # Start the sensors. # sh /etc/init.d/rc.sensors # # Start MAVLink # mavlink start -d /dev/ttyS0 -b 57600 usleep 5000 # # Start the commander. # commander start # # Start the attitude estimator # attitude_estimator_ekf start # # Release shell for MAVLink # exit
Sensor and Parameter Calibration
The calibration includes the sensor calibration and the setup / calibration of the remote control. The remote control can either be controlled manually via QGroundControl or automatically via Mission Planner.
RC Calibration with QGroundControl
- Once QGroundControl is started and has been connected, search in the main menu for Tool Widgets.
- Select the Calibration and Parameters widget (Onboard Parameters?)
- Click on Get in the widget
- There are eight parameter groups named RC1-RC8. Each of those has three entries:
- MIN: The minimum value the channel can have. Move the lever around to find the minimum and enter it there
- MAX: The maximum the channel can have. Identify it similarly
- TRIM: The zero position of the channel. Centered sticks for roll, pitch and yaw and at zero for throttle.
- Once calibration is complete click on Set to write the new parameters to the FMU
- To write the parameters to non-volatile memory (so they are not reset to default after reboot) click Write (ROM)
- Note: For the write to be successful you must have started the EEPROM
RC Calibration with Mission Planner
Connect mission planner and then choose the RC calibration dialog as shown in the video. Proceed through the dialog as shown in the video.
Sensor Calibration with QGroundControl
First get and install the calibration widget for QGroundControl:
- Download the PX4 Calibration Widget: px4_calibration.qgw
- Select in the main menu Tool Widgets → Load Custom Widget File – select the px4_calibration.qgw file
- The new widget will now be visible and / or can be enabled through the Tool Widgets menu
Enable the communication console, it will interactively guide you through the calibration. Select from Tool Widgets → Communication Console.
Now perform first the static calibration: Place the FMU or vehicle on a surface and keep it still. Click on gyro to calibrate the gyro offsets. Then in the Calibration and Parameters widget, click on Write ROM to save them. Next (if the FMU is mounted on a quad rotor) place the vehicle as level as possible and click on the ACCEL button. Again click on Write ROM to save the offsets.
The last step is the magnetometer calibration. Click on MAG and then rotate the vehicle for 45 seconds around all its axes, so that optimally each arm reaches each point on a sphere once. PX4FMU will print a text message once its done. Again click on Write ROM.
Reboot the unit to be initialized with the new offsets. If you place your vehicle level on the ground, it should show a level attitude. If you point it north (and there are no strong magnets or iron objects nearby), it should show north.
Setting up a PWM-interfaced Multirotor
Check the PX4FMU connectors page for details. Most users will want to use the MULTI connector. The same pins are also available on the EXP connector. Relevant pins:
- Pin 1: Provide 5V power
- Pin 5: BATTERY_MONITOR: Connect to LiPo for voltage sensing
- Pin 6: PPM_INPUT: Connect to the CPPM/PPM-sum-signal output of your receiver
- Pin 7: USART1_RX: Connect to TX of your radio module
- Pin 8: USART1_TX: Connect to RX of your radio module
- Pin 9: USART2_RX: Connecto to motor controller 1
- Pin 10: USART2_RTS: Connecto to motor controller 2
- Pin 11: USART2_CTS: Connecto to motor controller 3
- Pin 12: USART2_TX: Connecto to motor controller 4
- Pin 15: Provide GND
Auto-Starting the Quad Control Software
Instructions mostly taken from here: auto_starting_apps.
Put the script below onto a microSD card into the
etc folder. The script should be named
rc, so the full path is
#!nsh set USB no set MODE custom # # Start the object request broker # uorb start # # Start the EEPROM and load params # echo "[init] eeprom" eeprom start if [ -f /eeprom/parameters ] then eeprom load_param /eeprom/parameters fi # # Activate the four PWM outputs on FMU (UART2 is now disabled) # fmu mode_pwm # # Setup mixing, X-configuration for quadrotors # mixer load /dev/pwm_output /etc/mixers/FMU_quad_x.mix # # Start the sensors. # sh /etc/init.d/rc.sensors # # Start MAVLink on UART1 (dev/ttyS0) at 57600 baud (CLI is now unusable) # mavlink start -d /dev/ttyS0 -b 57600 usleep 5000 # # Start the commander. # commander start # # Start the attitude estimator # attitude_estimator_ekf start # # Start the attitude controller # multirotor_att_control start # # Exit the shell as now MAVLink is using UART1 # NOTE: This will not connect to USB any more # if the /dev/ttyACM0 USB port is required # add the line below just before exit: # # sercon # exit
First Sanity Check
Propeller-less initial test
ARM the quad with the throttle stick put to the lower right corner. Give it 30% thrust. Tilt the quad and check that the motor speeds change.
Second level test with propellers
Mount the propellers and make sure you have two clockwise propellers on one axis and two counterclockwise propellers on the other axis. Again ARM the quad and put it at 40% throttle. Keep it in your hands and tilt forward, back, left and right. Check that it correctly tries to stay level. If not, check the mixing setup and make sure the responses feel right before you attempt a free flight.