Crazyflie Keyboard Control - A simple approach

Discussions and questions about the Crazyflie Nano Quadcopter
SKChakra
Beginner
Posts: 5
Joined: Tue Dec 30, 2014 11:01 am

Crazyflie Keyboard Control - A simple approach

Post by SKChakra » Tue Dec 30, 2014 11:53 am

For those who hate buying an XBox/PS controller/Joystick,for those who wanna just fly the quad right after unboxing (but do not have a recommended input device-like me :( ) for those who played flight simulator games like Tom Clancy's H.A.W.X on a PC keyboard and for those who wanna feel like flying the quadcopter from your PC keyboard, you've come to the right place. The method I followed to set up such a thing is very simple - involves NO coding, scripting,etc. You just get to fly it off the shelf!!! So lets get started, I'll walk you through...

STEP 1: Download and Install "VJoy". VJoy is a free gamepad simulation software that gives you the freedom to map gamepad control to keyboard buttons, cool huh?

download link: http://www.headsoft.com.au/download/pc/VJoySetup.exe

or follow the instructions at http://www.headsoft.com.au/index.php?category=vjoy

STEP 2: Once done installing VJoy, you can start configuring your custom controls, say for example, the one shown in my screenshot , scrn1
scrn1.png
Screenshot 1 - configuring VJoy
STEP 3: Okay, now for the next step, open the Crazyflie PC Client and go to Input Device > Device and make sure you have selected the appropriate device, as shown in screenshot 2
scrn2.png
Screenshot 2- adding virtual joystick
STEP 4: Configure the device on crazyflie PC client, go to input device > mappings > PS4_mode1_windows. Then go to input device>configure device mapping and configure the device as per instructions from the window. Make sure the correct device and corresponding mapping is selected.

Congratulations, you are now ready to fly the crazyflie via keyboard!!!



chonchonchon
Beginner
Posts: 18
Joined: Sat Sep 20, 2014 1:47 am

Re: Crazyflie Keyboard Control - A simple approach

Post by chonchonchon » Tue Dec 30, 2014 6:13 pm

Thank for the info ! Will try it! Love my keyboard :)

For flying out of the box, you can use the bitcraze iApp
...don't know if it work for cf1 too ? But like a charm for cf2!!!

Chon

SKChakra
Beginner
Posts: 5
Joined: Tue Dec 30, 2014 11:01 am

Re: Crazyflie Keyboard Control - A simple approach

Post by SKChakra » Wed Dec 31, 2014 3:11 am

chonchonchon wrote:Thank for the info ! Will try it! Love my keyboard :)

For flying out of the box, you can use the bitcraze iApp
...don't know if it work for cf1 too ? But like a charm for cf2!!!

Chon
Chon, the app works for cf1 too, which is what i have... But you require usb OTG support on the phone for that...

SKChakra
Beginner
Posts: 5
Joined: Tue Dec 30, 2014 11:01 am

Re: Crazyflie Keyboard Control - A simple approach

Post by SKChakra » Wed Dec 31, 2014 3:27 am

Oh, and btw, you can try different mappings too, with incremental control...the mapping described above gives only the extremes, unlike a PS/xbox controller, which is analog... Vjoy also has an open source sdk to do some scripting, here we can implement analog control via keyboard, working on that presently...

chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Crazyflie Keyboard Control - A simple approach

Post by chad » Wed Dec 31, 2014 3:59 am

No love for Linux or OS X though?... :(
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.

SKChakra
Beginner
Posts: 5
Joined: Tue Dec 30, 2014 11:01 am

Re: Crazyflie Keyboard Control - A simple approach

Post by SKChakra » Wed Dec 31, 2014 4:36 am

chad wrote:No love for Linux or OS X though?... :(
Lots of love for linux, buddy...will have to try this one out too

http://andersmalmgren.github.io/FreePIE/

chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Crazyflie Keyboard Control - A simple approach

Post by chad » Wed Dec 31, 2014 5:03 am

Nice! That looks interesting.
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.

dbrgn
Member
Posts: 51
Joined: Tue Dec 16, 2014 9:42 pm

Re: Crazyflie Keyboard Control - A simple approach

Post by dbrgn » Fri Jan 02, 2015 10:39 am

Is the CF2 even manageable with digital controls?

SKChakra
Beginner
Posts: 5
Joined: Tue Dec 30, 2014 11:01 am

Re: Crazyflie Keyboard Control - A simple approach

Post by SKChakra » Tue Jan 06, 2015 5:56 pm

dbrgn wrote:Is the CF2 even manageable with digital controls?
I do not have the CF2, but regardless, digital control is really very tough and a pain in the neck. This was just an initiative to start from a more "primitive" controller, a.k.a., the keyboard. While i have achieved some analog success with the mouse via PPJoy, I have been able to hover the CF, i have also been trying to write a script for flying it off a keyboard or mouse or a combo of both...I'm trying it the python way...so I will post it once I even manage to get reasonable success...Cheers!...

vinaybysani
Beginner
Posts: 1
Joined: Sat Feb 18, 2017 10:36 pm

Re: Crazyflie Keyboard Control - A simple approach

Post by vinaybysani » Sat Feb 18, 2017 10:41 pm

I've opened the vjoy and configured the keys as mentioned. However the PC client could not detect the vjoy. The (Input Device -> Device) itself is disabled. I have tried a lot of things. Can you let me know what am I missing here?

Post Reply