keyboard as controller

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
gruffman
Beginner
Posts: 6
Joined: Tue May 28, 2013 8:30 pm

keyboard as controller

Post by gruffman »

I'm still waiting for a PS3 controller to arrive. Anyone successfully tried to control their crazyflie with a keyboard? :)
TheFrog4u
Expert
Posts: 113
Joined: Fri Feb 08, 2013 6:59 pm
Location: Bremen, Germany

Re: keyboard as controller

Post by TheFrog4u »

that would be quite difficult as one doesn't have any analog input.. maybe using the mouse.
gruffman
Beginner
Posts: 6
Joined: Tue May 28, 2013 8:30 pm

Re: keyboard as controller

Post by gruffman »

Could you explain?
allynbauer
Beginner
Posts: 12
Joined: Mon May 06, 2013 6:59 pm

Re: keyboard as controller

Post 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.
rmirwin2
Member
Posts: 51
Joined: Mon May 13, 2013 6:06 pm

Re: keyboard as controller

Post 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
VGer's v1.7.1 frame, 10DOF Crazyflie, Wireless Xbox360 Controller, Virtual Machine on VMware/Windows 7
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: keyboard as controller

Post 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
Post Reply