I've been remotely working with a team for the past couple of days on a strange control system issue.
Some details about their setup
When they deploy the application (without changing any of the files) from Android Studio to their Robot Controller phone and run it, the left drive motor correctly uses the input value from -gamepad1.left_stick_y to determine the motor power. The right motor, however, appears to use the right_trigger off of gamepad1 (even though the code would indicate it should be getting this value from -gamepad1.right_stick_y. Moving the right trigger does indeed change the right motor speed and this is reflected in the telemetry data printed in the OpMode.
In an attempt to troubleshoot this, the value for right in the program was set to a value of 0.9 (not using any of the gamepad values, just a constant, hardcoded value). This was the only change made to the program. Running the program again, the telemetry reflected that right = 0.9 but the right motor did not move. Also, when this change was made, the ability to control the left drive motor disappeared (even though this line was not changed).
In another attempt to troubleshoot this, the change was made to set right = -gamepad1.right_stick_x, to see if anything could be read off of that instead. Again, this was the only line changed in the entire file from the other troubleshooting sessions. With this change, the right motor was controllable via the left_trigger on the controller (instead of the right trigger, like it was originally) and the left motor was now controllable using the A and Y buttons on the controller (even though this line was not changed).
What would cause this? Could this be due to using the Rock Candy controllers instead of standard Xbox 360 controllers? Any help would be appreciated.
Some details about their setup
- They have built a Pushbot, completely wired and following the build guide for that.
- For the programming portion of the build, they are running the example file "PushbotTeleopTank_Iterative" using the default "HardwarePushbot" configuration.
- They are using Moto G 2nd Generation phones, running Marshmallow, for both their Driver's Station and the Robot Controller
- They are using SDK version 2.35, and both apps show this version (although the "App Build Time" under "About" for both applications shows 11/30/79 12:00 AM)
- The controller they're using is a "Rock Candy" Xbox 360 controller, as seen here
When they deploy the application (without changing any of the files) from Android Studio to their Robot Controller phone and run it, the left drive motor correctly uses the input value from -gamepad1.left_stick_y to determine the motor power. The right motor, however, appears to use the right_trigger off of gamepad1 (even though the code would indicate it should be getting this value from -gamepad1.right_stick_y. Moving the right trigger does indeed change the right motor speed and this is reflected in the telemetry data printed in the OpMode.
In an attempt to troubleshoot this, the value for right in the program was set to a value of 0.9 (not using any of the gamepad values, just a constant, hardcoded value). This was the only change made to the program. Running the program again, the telemetry reflected that right = 0.9 but the right motor did not move. Also, when this change was made, the ability to control the left drive motor disappeared (even though this line was not changed).
In another attempt to troubleshoot this, the change was made to set right = -gamepad1.right_stick_x, to see if anything could be read off of that instead. Again, this was the only line changed in the entire file from the other troubleshooting sessions. With this change, the right motor was controllable via the left_trigger on the controller (instead of the right trigger, like it was originally) and the left motor was now controllable using the A and Y buttons on the controller (even though this line was not changed).
What would cause this? Could this be due to using the Rock Candy controllers instead of standard Xbox 360 controllers? Any help would be appreciated.
Comment