Announcement

Collapse
No announcement yet.

Right Joystick Runs Continuously...

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Right Joystick Runs Continuously...

    Hello,
    Our left joystick controls one motor perfectly, however, the right motor runs continuously without even touching the right joystick, here is the code. We tried troubleshooting this on our own, but we are still learning how code works. https://drive.google.com/file/d/0B3w...ew?usp=sharing
    Thanks!

  • #2
    One of your problems is your use of variables. You are setting the "tgtPower" variable to both the right and the left sticks. So when you move the right stick all the way up, you get a value of -1 (but you reverse it, which is good). So that value goes to the variable, which is also plugged into both dcMotor1 and dcMotor2. So one stick powers both motors. Add another variable and name it "tgtPower2", and I would also change the key for your second telemetry block to be "power 2". That way you can see the power value of both motors, not just one at a time. The key works on the same idea as a variable. Because both keys are "power", the value that shows will constantly jump between the values of both sticks.
    Hope this helps you.
    FTC 8567 -Lead Programmer, 3-D Print Specialist, Lead CAD Designer

    Comment


    • #3
      Hi Psyche, thank you for your quick response. We updated some of the code, however, I want to clarify our issue. The left joystick responded appropriately to the left motor, however, the right motor responded independently of BOTH joysticks and just ran continously no matter what. Here is the code below. We still have the same issue. https://drive.google.com/file/d/0B3w...ew?usp=sharing

      Comment


      • #4
        What value are you seeing for the right motor's telemetry? Maybe there is a bad joystick feeding incorrect values to the robot controller app. If the telemetry reports a value of zero for target power, then maybe the motor controller is bad. Swap the outputs on the motor controller and see if the left wheel starts to run continuously.
        John McDonnell
        Co-Mentor, Team 5873
        https://www.facebook.com/Team5873

        Comment


        • #5
          We faced the same issue. We initially had arcade drive using left stick only which works perfect. I changed the code to test the tank drive mode by using the x axis feedback from the right stick. The motors ran continuously so I was forced to switch back to arcade only. Is this a controller or the gamepad issue ? I have double checked the controller settings for xbox modes.

          Comment


          • #6
            Try restarting the Driver Station phones

            Comment


            • #7
              I would also say to restart both phone. I am sure there is no problem with the program.
              Thanks,
              Programmer - FTC Delta Kappa

              Comment


              • #8
                Hey John,
                Thank you for your response, unfortunately I was on break and couldn't figure it out until now. The Left motors telemetry report shows Power from -1 to 1 but does not engage the motor, and the right motor telemetry data reports a constant -1 and rotates constantly

                Comment


                • #9
                  And I just messed around with it again and the right bumper was able to put it to 1, but if I let go of it, it immediately went back to -1

                  Comment


                  • #10
                    Try another controller. I recently had to get a new controller. It was giving my motors constant power values without me actually moving the sticks.
                    FTC 8567 -Lead Programmer, 3-D Print Specialist, Lead CAD Designer

                    Comment


                    • #11
                      Originally posted by voltemort View Post
                      We faced the same issue. We initially had arcade drive using left stick only which works perfect. I changed the code to test the tank drive mode by using the x axis feedback from the right stick. The motors ran continuously so I was forced to switch back to arcade only. Is this a controller or the gamepad issue ? I have double checked the controller settings for xbox modes.
                      I wanted to share some findings on this issue :-
                      We were exploring use of the left trigger (front-left-bottom button marked LT) and right trigger (front-right-bottom button marked RT) buttons on our gamepad and noticed that we couldn't send any values to the program. We noticed that on the FTC Robot Controller app's home the various gamepad values are displayed. the Right Stick X value is fixed to -1 and so does the value of Right Stick Y. Moving the right stick obviously doesn't changes these values for us. However when the LT and the RT buttons were pressed it started to change the values of the Right Stick X and Y !!
                      We were able to use the values of the Right Stick by pressing the RT/LT button in the program but the values of RT/LT button itself is unreadable.

                      Please check if your gamepad has the same behavior. Now is this a SDK issue or a h/w issue ?

                      Comment


                      • #12
                        I think you might have a hardware issue.
                        FTC 8567 -Lead Programmer, 3-D Print Specialist, Lead CAD Designer

                        Comment


                        • #13
                          Originally posted by voltemort View Post
                          I wanted to share some findings on this issue :-
                          We were exploring use of the left trigger (front-left-bottom button marked LT) and right trigger (front-right-bottom button marked RT) buttons on our gamepad and noticed that we couldn't send any values to the program. We noticed that on the FTC Robot Controller app's home the various gamepad values are displayed. the Right Stick X value is fixed to -1 and so does the value of Right Stick Y. Moving the right stick obviously doesn't changes these values for us. However when the LT and the RT buttons were pressed it started to change the values of the Right Stick X and Y !!
                          We were able to use the values of the Right Stick by pressing the RT/LT button in the program but the values of RT/LT button itself is unreadable.

                          Please check if your gamepad has the same behavior. Now is this a SDK issue or a h/w issue ?

                          I wanted to report that after updating the phone apps to version 1.5 and using the latest official SDK release made our issues go away. I'm glad that we don't have to replace the gamepads now.
                          Thanks !

                          Comment


                          • #14
                            Originally posted by FTC10507 View Post
                            Hello,
                            Our left joystick controls one motor perfectly, however, the right motor runs continuously without even touching the right joystick, here is the code. We tried troubleshooting this on our own, but we are still learning how code works. https://drive.google.com/file/d/0B3w...ew?usp=sharing
                            Thanks!
                            We had this happen where we accidentally pressed the "MODE" button without knowing it. We had to restart the driver station to get the bot from going wacky. The 2nd time it happened we figured it out, hitting the mode button again restored normal control (if you can claim our controls are normal )

                            Comment

                            Working...
                            X