PS3 controller
Forums:
I was able to link a PS3 controller and bluetooth dongle to the raspberry pi and run the diddyJoy.py. It is working, but I noticed when I turn left or right the inner wheels stop driving completely and only the outer wheels drive.
If I hold down R2, then the inner wheels change direction and drive at the same speed as the outer wheels. My question is whether the inner wheels stopping is normal behavior during a turn. It seems that it would turn better if they reversed direction but drove at a slower speed.
piborg
Sat, 01/10/2015 - 11:10
Permalink
PS3 controls
The way DiddyBorg is moving for you is how we intended him to work, however he can be configured differently fairly easily as well.
The controls are setup in the following mode by default:
No special butons held:
Drive at full speed, only use braking to turn DiddyBorg.
R2 held:
Drive at full speed, use full tank steering (wheels on the other side turn the opposite way).
L2 held:
Drive at half speed, only use braking to turn DiddyBorg.
L2 + R2 held:
Drive at half speed, use full tank steering (wheels on the other side turn the opposite way).
If you would rather have R2 work the other way around so it disables tank steeing instead of enabling it, there is a small mod you can do to the scripts.
In diddyJoy.py change:
to
the same change can be made to diddyJoyBall.py on line 309.
If you would rather they did turn slowly in the opposite direction you can adjust how much 'turning' is applied by changing the multiplier:
For example:
would provide 50% speed in the opposite direction with R2 released, and full tank steering with R2 held.
ericgero1
Sun, 01/11/2015 - 07:20
Permalink
Thanks for the fast response.
Thanks for the fast response. I was misinterpreting leftRight values, thinking that 0.5 should be half speed. Perhaps I hadn't read far enough. Lowering the speed of the inner wheels did not have the effect that I had hoped for, so I get why stopping them from turning is the default option.