Open nanobot9000 opened 8 years ago
This would use the same basic code as in #7: set the parameter flightmode.yawMode to 0. The parameter flightmode.yawRst can be used to reset the "front" orientation of the Crazyflie. I am not sure how to include that in the GUI.
Thanks and good to know. I do plan on learning how to make these changes a reality myself, but for now will need to defer to you guys. Yeah, not sure how to represent that as well in the GUI and not sure it is even the right option for this app or if it would be useful.
Headless mode doesn't seem to be too complicated, since we have a compass in our iOS devices and we tell the user to start with the blue leds facing to them. The only things that seems to be tricky is when a wind turns the device. Than it has to be recalibrated. A compass module install in the crazyflie could also solve this problem.
The crazyflie has a compass, but it is not very useful indoor: just passing close to a computer will modify the magnetic field enough to completely turn the Crazyflie.
Firmware headless mode has been broken in the Crazyflie but there may actually be a better way to implement it from the ios client itself: Crazyflie uses gyroscope to keep its heading, it drifts over time but is is more than good enough during the time of a typical flight. The iPhone also has a gyroscope that can be used to read the device orientation.
Assuming the Crazyflie takes-off blue-leds towards the phone, it is possible to transform the pitch/roll setpoint in the phone to achieve headfree mode with back always aligned with the phone even if the phone turns.
This would be a nice experiment. The only potential problem is that we might have to setup a log block with the absolute yaw of the Crazyflie to be able to accurately calculate the pitch/roll transformation. Otherwise we can add a commander packet to send an absolute yaw instead of the current relative yaw rate.
It would be nice to be able to enable the Crazyflie to function in headless mode - perhaps a toggle in the settings to provide this function.