Quote:
Originally Posted by avolkov
2) Because of (possibly) some weird wiring issues, it took me some time to finally get the robot to respond to the joystick, as it should in "SimpleRobot"... but, as it turned out... the x and y axis were backwards... I have looked everywhere and tried a lot of things in the code to fix this issue, but came to no change... can someone please tell me exactly how to change the x and y axis control when it comes to the "SimpleRobot" program in WindRiver?
|
This is with single-joystick "arcade" style control? You are probably misinterpreting the problem. I suspect that the axes are correct, and the motor wiring is merely "backwards" on one side. If that's the situation, pushing the joystick forward or backward will make one side of the robot go forward and the other go backward, spinning the robot and making it act like a correctly-wired robot with the joystick pushed to the side. Pushing the joystick to the side will make both motors go in the same direction, emulating correct wiring with the joystick pushed forward or backward.
The appropriate fix is either to swap the wiring on the "backwards" motor, or to tell the software that the motor control on one side or the other needs to be inverted. The software fix is applied when you instantiate the arcade drive.