bitcraze / crazyflie-firmware

The main firmware for the Crazyflie Nano Quadcopter, Crazyflie Bolt Quadcopter and Roadrunner Positioning Tag.
GNU General Public License v3.0
1.19k stars 1.06k forks source link

Option to choose orientation of drone at calibration #406

Closed benkuper closed 5 years ago

benkuper commented 5 years ago

It would be nice to have an option to be able to choose how the drone is when calibrating, currently is default to x positive, it could be something like X+, X-, Z+, Z- It would allow to have in a performance context the drone to be facing the public (Z-) or the performer behind (Z+)

It think it should at least be defaulting to Z- , which is probably the most used (drone facing front, meaning we are looking at the LPS cube with X+ being on the right and Z positive being behind

krichardsson commented 5 years ago

The initial yaw can be set through the kalman.initialYaw parameter. The initial yaw is used to initialize the estimator when the Crzyflie is not oriented in the positive X direction.

Initial Yaw is set in radians where: 0: facing positive X (default) PI / 2: facing positive Y PI: facing negative X 3 * PI / 2: facing negative Y

Note: initial yaw takes effect after the kalman filter is reset.

benkuper commented 5 years ago

Nice !