ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Calibrating AR-Drone after flight

asked 2018-04-17 01:35:37 -0500

oha gravatar image

updated 2018-04-17 01:35:52 -0500

Hi all,
I am using ROS to fly a real AR-Drone. My problem is that after a takeoff-flight-land sequence if I try to takeoff again the drone can't stabilize properly and will not fly well.

If I take out the battery and put it back in the drone preforms its calibration (with the routers spinning) and then I can takeoff and fly again with no issues. My question is how do I make the drone preform that calibration without taking the battery out and in again?

It is very annoying to take the battery out and in every time, and also I don't know if this is going to cause problems for the drone/batteries in the future.

Any help would be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-04-17 02:10:02 -0500

jayess gravatar image

updated 2018-04-27 03:14:32 -0500

You didn't mention which version you're using in your question so I'm assuming that you're using the 2.0. While your drone is on a flat surface, run

rosservice call /ardrone/flattrim

From the docs

Flat Trim

Calling ardrone/flattrim service without any parameter will send a “Flat Trim” request to AR-Drone to re-calibrate its rotation estimates assuming that it is on a flat surface. Do not call this service while Drone is flying or while the drone is not actually on a flat surface.

If this still doesn't work, then try the calibration command from the phone app (again, while on a flat surface).


If the lights are red then you probably have an error due a high acceleration (even carrying the drone can cause this) or rotating the drone too much. Publish an std_msgs/Empty message to the ardrone/reset topic to reset it and then flat trim.

edit flag offensive delete link more


thank you very much! I didn't mention which version of ardrone because this happened to me both with 1.0 and 2.0. Still I should have probably mentioned it, sorry. I am currently also having other drone problems, so I can't test it with flying, when I will I will approve the answer as correct.

oha gravatar image oha  ( 2018-04-17 03:08:14 -0500 )edit

Sorry for the delay. I finally got my drone back on track. using rosservice call /ardrone/flattrim I get a message saying "flat trim set" but it doesnt seem to do anything. The lights on my ardrone2 are still red and the propellers didn't move in order to recalibrate.

oha gravatar image oha  ( 2018-04-27 02:54:23 -0500 )edit

Also I cant use the phone app, as I am connecting to my drone through an internal LAN I have setup and made the drone connect to. Thus my drones router is no longer visible. Do you have any other ideas by any chance? Or maybe I need to do something together with the flat trim? Thanks again for help!

oha gravatar image oha  ( 2018-04-27 02:56:13 -0500 )edit

Thank you so much! it seems to work, I think, I have some weird behavior still but I think that has to do with my actual drone and the reset and reconfiguration work. Small correction, I first needed to flattrim and then reset (not the other way around like you mention). Thanks again!

oha gravatar image oha  ( 2018-04-29 06:12:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-04-17 01:35:37 -0500

Seen: 644 times

Last updated: Apr 27 '18