You seem to be running into this
problem for which there is a solution here
I can't test out the steps completely myself right now (my own controller refuses to be recognized by Virtualbox as it is captured by the host system and all USB filters in the world don't seem to prevent that...), I'll try to walk you through the steps. It is important
that you do them in the order I line out here, and that you check the command's outputs against the described expected output.
1. First open the Terminal in your VM by double-clicking the terminal icon on the desktop.
2. Enter the command sudo -s
and hit Enter. You will be asked for a password, enter crazyflie
for that and hit Enter. It should now say "root@bitcraze-ubuntu" at the beginning of your command prompt (it previously said "bitcraze@bitcraze-ubuntu")
3. Enter the command echo "blacklist xmap" > /etc/modprobe.d/blacklist.conf
and hit Enter. Nothing visible should happen.
4. Enter the command cat /etc/modprobe.d/blacklist.conf
and hit Enter. It should show exactly one line, blacklist xmap
5. Enter the command rmmod xmap
and hit Enter. If you do not happen to have your XBox controller plugged in, this might show ERROR: Module xmap does not exist in /proc/modules
, which in this case is ok. Otherwise it should show nothing.
6. Enter the command apt-get install xboxdrv
and hit Enter. It should probably say something like The following NEW packages will be installed
followed by the name xboxdrv
in the new line, it might also say something like xboxdrv is already the newest version
or maybe something along the lines of xboxdrv now being upgraded. All of these are ok.
Now follow the steps I couldn't test myself due to the issues stated above, I'll do my best to nevertheless describe what you'll need to do.
7. Make sure your controller is plugged in and on, then enter the command xboxdrv
and hit Enter. You should see some message about xboxdrv having found your controller. Try moving the sticks and pressing the buttons, that should write stuff on the screen. If you get feedback, great! Leave the terminal open for now.
8. Plugin your Crazyradio dongle (if it isn't already). Open another Terminal and in that start your crazyflie client.
9. Enter device configuration, selected the one that says something along the lines of "Xbox 360 controller (userspace driver)". Create new mapping for that, name it something like "xboxdrv", save, exit device configuration.
10. Make sure that under Input device > Devices in the menu you see the "Xbox 360 controller (userspace driver)" and that it is selected.
11. Make sure that under Input device > Mappings in the menu you see the "xboxdrv" mapping you just created and that it is selected.
12. Test the controller (do not connect the CF yet!). When you push the sticks you should see the values in the "Target" column under the horizon and the Thrust-bar change.
13. Power up the Crazyflie on a plane surface, wait until the motors rotated and the red LED is blinking steadily at about 1Hz.
14. Connect the Crazyflie, test if the Horizon is responding when you move it around.
15. Place the CF on a plane surface with 50cm/~2ft space to all sides, take your controller, slowly
increase thrust until the motors start spinning. If that works, congratulations, now it's time to learn flying. Please report back though, we'll need to make sure it does work in the future as well (basically you'll have to start xboxdrv via sudo xboxdrv
in a separate terminal, alternatively this can be done automatically when the controller is detected).