Page 1 of 1

keyboard as controller

Posted: Tue May 28, 2013 8:32 pm
by gruffman
I'm still waiting for a PS3 controller to arrive. Anyone successfully tried to control their crazyflie with a keyboard? :)

Re: keyboard as controller

Posted: Tue May 28, 2013 9:07 pm
by TheFrog4u
that would be quite difficult as one doesn't have any analog input.. maybe using the mouse.

Re: keyboard as controller

Posted: Wed May 29, 2013 1:49 pm
by gruffman
Could you explain?

Re: keyboard as controller

Posted: Wed May 29, 2013 3:13 pm
by allynbauer
Joysticks generally produce values in the range -1-1. Buttons such as those on a keyboard are (typically) a boolean affair (True/False). Using a button would therefore rely on having a way to map the digital nature of a button onto the analog nature of a joystick. There are a few solutions I can imagine, all with numerous downsides. The easiest is probably to just assign a static value to the on-state of the button, but adding this functionality to the UI at present would be something of an undertaking.

Re: keyboard as controller

Posted: Wed May 29, 2013 5:06 pm
by rmirwin2
Main issue I see with keyboard is ergonomics and the responsiveness of the Crazyflie.

I use the familiar ADWXS mapping for gaming along with the mouse. Action on an axis is linked to individual keystrokes or the continuous press of a key to produce motion. I'm sure this could be achieved here too.

Many actually prefer the keyboard-mouse combination.

But this is a different animal, one that will probably keep you mobile, that is, out from behind a keyboard. The ergonomics of keyboard use will mean you're going to have to have that keyboard solidly mounted relative to your body. Getting up and down from that position may be tedious. Also, a crash can cost money, so again, you'll need to be sure fingers are properly on that keyboard.

Walking around, untethered, with a wireless controller is so, so much simpler.

Beyond that, for the case where each keypress produces a change of force on an axis (roll, pitch, yaw, or thrust), I'm afraid we will be frantically trying to press keys while watching the airborne device. Sometimes you'll need to make corrections on multiple axis simultaneously, e.g., thrust and pitch. It would be nice to have a few keys for debugging if you are sitting though...

I'm not saying this is impossible to work out. Perhaps using mouse control for roll and pitch would really be slick! I wouldn't mind trying that but getting in and out of a workspace area for flying would negate the convenience of it.

All I know for sure is the controls need to be very efficient and accurate. With the Crazyflie, things happen fast! I think you'll appreciate the need for joysticks first time you try to fly it!

Just my two cents!

Rich

Re: keyboard as controller

Posted: Fri May 31, 2013 9:14 am
by tobias
I like you analysis Rich!
I see a a future usage though, something we where trying to achieve in a master thesis: http://www.bitcraze.se/2012/06/camera-a ... er-thesis/. In FPV flight it would be much like a "first person shooter" game and you could map the controls of the Crazyflie pretty similar. With altitude hold as well you could lock it at a certain altitude to make it even simpler to control FPS style :D