whoenig/crazyflie_ros

Questions on cmd_vel

EceChaik opened this issue · 1 comments

Hi Wolfgang,

I have started trying to fly using a position controller and the cmd_vel topic. I have used your code in crazyflie_controller as a reference of how to use "cmd_vel". I have some questions.
First of all I couldn't get it to start at first, but after finding in another github issue that it might need some time to start up, I fed it a bunch of empty Twist messages at the start and this seems to have fixed it, so I assume this is not a serious issue.
Second, does the "cmd_vel" topic expect roll and pitch angles in Degrees instead of radians? Cause I'm assuming it uses radians and I'm getting some bad results.
Third, why do you use negative gains for your Pitch control? This last one has me very perplexed.
Thanks, Dimitris.

  1. This is related to a safety feature in the firmware, which is supposed to prevent the CF flying off if you plug-in a joystick. You are right that you have to send a few messages with zeros in order to 'arm' the CF.
  2. It is identical to the one in the official firmware, so the angles are in degrees.
  3. The 'legacy' CF coordinate has the y-axis sign swapped. I think it was never changed for compatibility reasons.