Calibrating Your Drone
Follow this step-by-step guide to calibrate your drone. While some steps are universal across products, others may vary depending on your specific model. Use the tabs above to select the guide tailored to your product.
Head back to your Product page and start with the initial steps outlined there. Theyβll point you to the correct tutorial for your specific drone.
Your drone may have custom instructions available. If so, they can be found under the 4. Custom Instructions chapter on the Product Page.
Calibration is an essential step to ensure that the drone operates correctly. The calibration process is partly carried out using QGroundControl.
QGroundControl provides full flight control and mission planning for any MAVLink-enabled drone. It also facilitates the calibration of various components connected to the embedded flight controller, including the compass, accelerometer, gyroscope, and other sensors.
Sensor calibration should be performed every time the drone is moved to a new location (e.g., transporting the drone by car, not simply carrying it by hand over a distance of 100 meters). Additionally, calibration is required after a hard landing (e.g., a crash) or whenever the drone exhibits instability during position-hold flight.
Download and Install QGroundControlβ
Download and install the application by following the instructions here.
Prepare Your Droneβ
- DEFAULT DRONE
- RoboFly
Connect the battery to the drone as described in Powering. Turn on the computer and wait for the network to initialize.
Next, you need to start MAVROS on the drone in order to enable the communication between the PX4 and your computer through TCP/IP protocol. Connect to the drone through SSH (refer to the connecting tutorial for more information) and then run the following:
roslaunch mrs_uav_px4_api mavros_realworld.launch
The system should start and you can proceed with the calibration steps.
If you don't have the MRS UAV System installed or if you wish not to use it for the calibration, you can still connect your FCU (Flight Controller Unit) to your computer using the appropriate wire. QGroundControl should automatically detect your FCU and you can directly skip to the Gyroscope calibration.
Connect the battery to the drone as described in Powering RoboFly. Wait for the computer and network to initialize, then connect to the Portainer interface.
Start the sensor_diagnostics
stack as described in the previous section, Connecting RoboFly.
Calibration Stepsβ
The calibration of the drone includes several aspects such as the sensors, the motors and the safety features. The sensors are usually within the flight controller unit or connected to it.
For successful calibration, ensure the device is on a horizontal surface. It must be as level as possible and remain stationary throughout most of the calibration process.
IMU Calibrationβ
For outdoor flights using GPS, calibrate the four main sensors in the IMU. This step is crucial for correct drone behavior. Navigate to your QGroundControl application directory and execute the file in the terminal, ensuring that it is set as executable.
chmod +x ./QGroundControl.AppImage
./QGroundControl.AppImage
You should see a screen similar to the one below with Disconnected in the top left corner. Click on the logo next to it.
- DEFAULT DRONE
- RoboFly
Select the Comm Links tab and click Add to create a new link configuration. Name your drone, set the Type to TCP, and the Server Address to the drone network IP 192.168.11.149
(this is an example). Leave the Port at 5760 and click OK.
Select the Comm Links tab and click Add to create a new link configuration. Name your RoboFly, set the Type to TCP, and the Server Address to the RoboFly network IP 192.168.12.1
(this is the static IP if you kept the AP mode). Leave the Port at 5760 and click OK.
Select your newly added configuration setting (highlighted in yellow) and click Connect.
You might see a prompt to set up components prior to flight. Click OK to proceed and notice the summary window displaying current information from your drone. Various settings, such as low-battery scenarios like homing, can be configured here. These "fancy" features are not enabled by default, as they are often unnecessary for experiments.
Go Back in the top left corner, and you should see a Not Ready label with additional information about your device. The horizon and compass on the top right should respond when moving the drone.
Navigate to Vehicle Setup > Sensors to calibrate the individual sensors.
Gyroscopeβ
Click Gyroscope to begin calibration. Follow the on-screen instructions carefully. Place the drone on a level surface and wait. The red indicator will turn yellow when the correct position is registered and green upon successful calibration.
Accelerometerβ
Click Accelerometer to start calibration. Follow the on-screen instructions. Flip the drone through all six axes, waiting in each position until the corresponding indicator turns green. Ensure the drone is as level as possible during calibration.
Level Horizonβ
Click Level Horizon to begin calibration. Follow the prompts. The process is automated, with log messages confirming completion.
Compassβ
Perform compass calibration outdoors to avoid interference from concrete walls or steel. Refrain from performing calibration near high-voltage power lines. A calibrated compass is necessary even for GPS flights.
Click Compass to start calibration. Carefully rotate the drone along the axes through six positions, keeping it level. Alternatively, you can hold the device and turn yourself around if needed, though this may be less accurate. Continue until all indicators turn green.
When the drone displays a Ready to Fly status in the main window, calibration is complete. If not, review the logs and warnings provided by the application.
If the drone exhibits abnormal flight behavior, such as circling the target location, recalibrate the compass.
- DEFAULT DRONE
- RoboFly
VIO Flight Calibrationβ
For indoor flights, full GPS calibration is not required; however, calibration of the gyroscope, accelerometer, and level horizon remains necessary, as detailed above. Once done, connect to the RoboFly via SSH (see Connecting RoboFly). Ensure the sensor_diagnostics
stack is running.
Navigate to the IMU folder and run the calibration script. You may need the sudo password f4f
.
cd git/IMU_SPI_driver
./calibrate.sh
Reboot the computer to apply changes.
sudo reboot
Calibration is now complete.
Ensure the sensor_diagnostics
stack is running during the whole calibration process. If you reboot in the meantime, you will need to restart the stack.
Motorsβ
The Motors Setup page (left sidebar of the vehicle setup menu) can be used to check that the motors are spinning correctly (without the propellers). To enable it, you should first press for a few seconds the safety button located on the GPS module of the drone called "SWITCH". You should hear a little music. Make sure the space around the motors is clear and nothing is touching them.
On QGroundControl you can now switch the safety button on the motors setup menu. Try to slightly increase the "All" cursor. If all the motors are properly spinning (in their supposed rotation direction and evenly), you can skip to the next part. If one or more motors are not spinning try to make them spin using their individual cursors. If they spin, then it is most likely that you need to calibrate the ESC of the drone. Please refer to the official documentation.
The motors only spin after you release the slider and will automatically stop spinning after 3 seconds.
For additional information, refer to the official website.
Safetyβ
The Safety Setup page allows you to configure the most important failsafe settings.
Most of the Pixhawk safeties are disabled in order not to interfere with the one we use within the MRS system. Typical settings include the following triggers:
- Low battery failsafe: Warning
- RC loss failsafe: Land
- Return to launch settings: Later and do not land