puku0x / cvdrone

CV Drone (= OpenCV + AR.Drone)
https://github.com/puku0x/cvdrone/wiki/How-to-build
Other
202 stars 94 forks source link

Send command to change Pitch, Yaw, and Roll values #16

Closed pouriast closed 8 years ago

pouriast commented 9 years ago

Hi,

Many thanks for this great piece of work. Helped me a lot!

I am just wondering how I can send/create a new command to change pitch, roll, and yaw values. There is a function 'move3d' to change velocity but I am not sure how to change the other values!

I would be thankful if you can help me out.

Thank you very much,

puku0x commented 9 years ago

Hi,

Thank you for your comment.

Although the arguments of ARDrone::move3D are velocities, the function changes pritch, roll, and yaw angles internally because it uses AT*PCMD command.

Please see " command.cpp ".

Regards, puku0x

pouriast commented 9 years ago

Thanks for your help. I just realised what you mean by using move3D to change pitch, roll and yaw. Can I please ask why you multiply the vx, vy, vz variables by some fixed values in the command.cpp ?

puku0x commented 9 years ago

The magic values in move3d are transformation coefficients, which were determined by an experiment, to convert the arguments in [m/s] and [rad/s] to percentages. I am not sure this is the best way, though.