Robotics StackExchange | Archived questions

Stabilize hover in drone

Hello everyone. I'm using an AR.Drone 2.0 and, when I was using it in ROS+Gazebo everything worked perfectly because it was perfectly stable in hover mode (I mean, when it was flying in a specific point (x,y,z) and not moving).

But now I'm using it in the real world and when I publish a takeoff message it goes up and then anywhere. I don't know if it's because it was hit by anyone (I'm not the first user of this drone) or what can happen. Is this drone pretended to hover stable without doing anything? Or do I have to make a PID to control the velocities and the orientation? How can I do that PID if I don't have any tag or marker? Does the drone give me the yaw, roll, pitch, and velocities?

This is the launch I'm using for the real AR.Drone (it was taken from the Internet):

<launch>
        <arg name="droneip" default="192.168.1.1" />
        <node name="ardrone_driver" pkg="ardrone_autonomy" type="ardrone_driver" output="screen" args="-ip $(arg droneip)">
                <param name="navdata_demo" value="False" />
                <param name="realtime_navdata" value="True" />
                <param name="realtime_video" value="True" />
                <param name="looprate" value="30" />
        </node>
</launch>

Thanks

Asked by Dylan on 2019-01-07 22:39:29 UTC

Comments

This is one of the differences between simulation and reality. Although the drone has built-in stabilization, it's visual and relies on the drone being able to estimate its velocity. If it can't do that sufficiently accurate enough, then you'll see the behavior that you are.

Asked by jayess on 2019-01-07 23:22:16 UTC

How about the downward facing camera? Is it working correctly? Are you facing the same problem when you try to control through Mobile App?

Asked by pavankumarbn on 2019-01-08 00:23:57 UTC

It's hard for me to say if it's working correctly, but when I used this drone we'd place an object underneath its camera to help it better estimate its speed (I'm too sure how effective it was but it seemed to better with something in the bottom camera's field of view)

Asked by jayess on 2019-01-08 01:48:09 UTC

@jayess I also faced the same problem. The reason was downward facing camera was not working because AR 2.0 uses it to hold the position during flight. I replaced the entire body after that it worked perfectly fine. Sometimes cable loose connection leads to the problem.

Asked by pavankumarbn on 2019-01-08 02:53:53 UTC

The downward facing camera is working perfectly. I use it to detect tags and they are detected correctly. I face the same problem when I try to control the drone through the mobile app

Asked by Dylan on 2019-01-08 05:42:38 UTC

What about the documentation, where it talks about the hover modes? I need to detect tags and I programmed a control to land on a tag. Can I add something to my program (like an offset for each thruster) to stabilize it?

Asked by Dylan on 2019-01-08 05:45:15 UTC

or is it any method to stabilize the drone in a position without having any tag or something below? I mean, reading the IMU of the drone

Asked by Dylan on 2019-01-08 05:46:09 UTC

Even with your camera working properly there will be some issues and there will be latency due to everything going over wifi using tcp as well

Asked by jayess on 2019-01-08 08:28:38 UTC

So you say that the only solution would be changing all the downward facing camera? Is there any possibility to use some topics of the ardrone to stabilize it?

Asked by Dylan on 2019-01-08 12:12:10 UTC

No, I wouldn't say that. I don't know if you're drone's camera is in good or bad shape. My comment was basically that this sounds fairly normal and that what works in sim won't necessarily work in real life.

Asked by jayess on 2019-01-08 15:13:56 UTC

To stabilize it, you can try some visual servoing via the bottom camera's image topic or some other method

Asked by jayess on 2019-01-08 15:16:10 UTC

But the bottom camera would need some landmark or something and the idea is to not have any

Asked by Dylan on 2019-01-08 16:21:32 UTC

@Dylan How about checking with tum_ardrone once. They implemented a PID controller for drone stabilization. In my case, the problem was very clear that downward facing camera. After taking off drone was moving abruptly in random directions.

Asked by pavankumarbn on 2019-01-08 20:27:28 UTC

Can you please post publish part of the code? I agree with @jayess simulation is different and working in the real scenario is different.

Asked by pavankumarbn on 2019-01-08 20:30:56 UTC

@pavankumarbn the same is happening to me. I’m using a simulator called QLAB that is similar to the tum but for ROS kinetic. Which is the PID for drone stabilization that you refer? I would have no landmarks :S

Asked by Dylan on 2019-01-08 20:32:25 UTC

@Dylan sorry to hear that. I know the pain of that problem. Ok. I was talking about http://wiki.ros.org/tum_ardrone. Now I stopped working on Parrot AR 2.0.

Asked by pavankumarbn on 2019-01-08 20:38:00 UTC

But the problem would not be from my code, because it works bad even when I only post a takeoff, and also when I use it from the smartphone application. Maybe applying a static offset in one direction (for example, offset_vel_x = 0.3 and offset_vel_y = 0.04) can help? @pavankumarbn

Asked by Dylan on 2019-01-08 21:39:37 UTC

@Dylan I am not sure by applying the static_offset you can fix this problem. Otherwise, you need to analyze nav_data to decide how to compensate vel_x and vel_y values.

Asked by pavankumarbn on 2019-01-08 21:50:29 UTC

Answers