Page 1 of 1

[SOLVED]Input devices problems

Posted: Sat Jun 24, 2017 8:02 am
by Mitteau
At the begining, I used wireless xbox360 to pilot my cf2.
Following wiki, I blacklisted xpad (and joydev) to install xboxdrv. All things went satisfactorily. But xbox 360 is not a very precise device. Later, I had some problems with xboxdrv and discover that last version of xpad driver was also running xbox system.
And then things were awful. The device disappeared from /dev/input.... I tried by all possible methods to overcome the problem. Crazyflie clients and firmware have nothing to do with the difficulty. Neither does the xpad driver. Whatever I do, I never obtained jsx device in /dev/input. My feeling is that the Microsoft receiver and the joystick divorced...
Then I bought another joystick, namely UnderControl PS3, usb wired. A very cheap joystick, approximately 10€.
As for xbox360, PS3 joystick has nearly no documentation. I used a config input file found in crazyflie client, PS3_mode 2. But it was nearly impossible to control the flight. It looks as if the axis deliver two states only, 0 and full throttle. Finally, I suceed, I do not know how, the CF2 was flying slowly to the left so I made a correction to go right. The cf2 went away at high speed to the right, this was correct, but I could not stop it and the flight ended in my pond, five meters far. cf2 is dead: no more VCOM.
I POST THIS SAD STORY, because, due to the lack of documents, It is by chance that I discovered you have to press 10 seconds on the "home" button to shift axis from digital to analog output.... Now, it's OK, too late.
So WARNING: my SIXAXIS system is not an analog joystick when powered on! Needs to press 10 seconds the "home" button.
Furthermore, this joystick is a rough one. On axis, effective control is only between 30 an 70% of the run of the axis. It seems that there is no way to have better behavior.

Re: Input devices problems

Posted: Wed Jun 28, 2017 10:50 am
by bjorn
Hi Jean-Claude,

I'm sorry to hear that you've had some much problems, exactly what documentation did you follow?
Do you have any suggestions on how to approve the documentation that we provide?

Best regards,

Re: Input devices problems

Posted: Mon Jul 03, 2017 2:05 pm
by Mitteau
One thing could be to collect joystick json files of people who fly crazyflie. You will find mine attached, as PS3_UC6_LTY, UC for UnderControl SIXAXIS and Thrust and yaw at the left hand.
file 'PS3_UC_LTY.json'
"inputconfig": {
{"name": "Playstation 3 Mode 2 de UC6_LTY", "updateperiod":10,
"axis": [
{"name":"Roll", "type":"Input.AXIS", "id":2, "scale":1.0, "key":"roll"},
{"name":"Pitch", "type":"Input.AXIS", "id":3, "scale":-1.0, "key":"pitch"},
{"name":"Yaw", "type":"Input.AXIS", "id":0, "scale":1.0, "key":"yaw"},
{"name":"Thrust", "type":"Input.AXIS", "id":1, "scale":-1.0, "key":"thrust"},
{"name":"Alt1(ring)+", "type":"Input.BUTTON", "id":7, "scale":1, "key":"alt1"},
{"name":"Alt2(HL)+", "type":"Input.BUTTON", "id":5, "scale":1, "key":"alt2"},
{"name":"Alt3 son", "type":"Input.BUTTON", "id":6, "scale":1, "key":"alt3"},
{"name":"Hover+", "type":"Input.BUTTON", "id":4, "scale":1, "key":"assistedControl"},
{"name":"Connection", "type":"Input.BUTTON", "id":9, "scale":1, "key":"connect"},
{"name":"Pitch Cal+", "type":"Input.BUTTON", "id":0, "scale":-1.0, "key":"pitchNeg"},
{"name":"Pitch Cal-", "type":"Input.BUTTON", "id":2, "scale":1.0, "key":"pitchPos"},
{"name":"Roll Cal +", "type":"Input.BUTTON", "id":1, "scale":1.0, "key":"rollPos"},
{"name":"Roll Cal -", "type":"Input.BUTTON", "id":3, "scale":-1.0, "key":"rollNeg"},
{"name":"Killswtich", "type":"Input.BUTTON", "id":8, "scale":1.0, "key":"estop"}