AutonomyLab / ardrone_autonomy

ROS driver for Parrot AR-Drone 1.0 and 2.0 quadrocopters
http://wiki.ros.org/ardrone_autonomy
BSD 3-Clause "New" or "Revised" License
357 stars 226 forks source link

Navdata state does not change properly #186

Open angetria opened 8 years ago

angetria commented 8 years ago

I have made a ros node and send land, takeoff and geometry::Twist messages through their respective topics. The robot is running as it should but when i check the state i get the following

takeoff -> 7 . It should have been 6 (taking off). landing -> 9 . It should have been 8.

And when its in the air with zero velocity i get hover mode (4) instead of 3 or 7. This happens even if i disable auto-hover mode by giving angular.x (and y) non zero values.

Twist messages are published for a specific duration and with a fixed rate of 40hz.

mani-monaj commented 8 years ago
  1. "taking-off" and "landing" are transition states and are both very short-lived.
  2. The drone usually transitions from 8 (landing) to 9 (landed) pretty quickly. However for taking off (6), it should transition to 4 (hovering) not 3 or 7.
  3. I think even when the auto hover mode is set to False and when the drone receives zero-velocities, it is technically still hovering. Therefor, the reported state is still valid.

The driver simply publishes what it receives from the drone to ROS as the state. I can't quite remember where we obtained the code->state mapping from. If you experimentally verify that the documentation is wrong, please feel free to correct them and submit a PR.