[Solved] Raspberry Pi and PS2 Controller
Posted: Wed Mar 26, 2014 4:31 am
Hey guys,
I've been working on setting up a base station with the raspberry pi, based on all the instructions posted by the community on the website, and this forum. I've successfully been running off battery power, and am using peripherals using a hub. I think I am very close to being able to fly.
I am encountering a problem when I start up the software. Here is the status script that prints to the raspberry pi screen:
I believe that I am having a problem with the controller I am using. I'm using a playstation 2 controller, connected to the system using a PS2 to USB converter. For some background, I pilot the crazyflie successfully from my computer, using my own own json file. However, when I first began, I found that my computer recognized two playstation controllers in the device manager. In order to fly the crazyflie, I had to disable the second PS2 controller that my computer was recognizing. I believe my raspberry pi problem is somehow analogous to the problem I had on my computer. That is my best guess. I have done research on how to disable devices recognized by the pi; however they did not produce any significant leads. I might also add, that my controller is recognized by the "joystick" program that I downloaded. All the buttons produce change in numbers when I run "jstest".
I look forward to any suggestions.
I've been working on setting up a base station with the raspberry pi, based on all the instructions posted by the community on the website, and this forum. I've successfully been running off battery power, and am using peripherals using a hub. I think I am very close to being able to fly.
I am encountering a problem when I start up the software. Here is the status script that prints to the raspberry pi screen:
Code: Select all
pi@raspberrypi ~ $ python ~/crazyflie-pc-client/bin/cfheadless -i PS_#1 -c 0
Info: Using config path: /home/pi/crazyflie-pc-client/lib/../conf
Info: sys.path= ['/home/pi/crazyflie-pc-client/lib', '/home/pi/crazyflie-pc-client/lib/../conf', '/home/pi/crazyflie-pc-client/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7']
Disabling standard output for libraries!
INFO:cfclient.utils.config:Dist config read from /home/pi/crazyflie-pc-client/lib/cfclient/configs/config.json
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_2.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1.json]
INFO:cfclient.utils.config_manager:Parsing [PS_#1.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_3.json]
INFO:cfclient.utils.config_manager:Parsing [Generic_OS_X.json]
INFO:cfclient.utils.config_manager:Parsing [xbox360_mode1_linux.json]
INFO:cfclient.utils.config_manager:Parsing [PS3_Mode_1.json]
Will use [Twin USB Joystick] for input
INFO:cflib.crazyflie:Callback->Connection initialized[radio://0/10/250K]
INFO:cflib.crazyflie:We are connected[radio://0/10/250K], request connection setup
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
INFO:cflib.crazyflie:Callback->Connected to [radio://0/10/250K]
ERROR:cflib.crazyflie.toc:Got packet that was not on TOC channel, TOC fetch will probably not succeed
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/10/250K]
I look forward to any suggestions.