|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: turning joystick controls 90% in programming
You are speaking to the true false statements in the motor as it sits one is true the other is false.
|
|
#2
|
||||
|
||||
|
Re: turning joystick controls 90% in programming
You should just be able to swap the X and Y axis values, if you are using labview then just swap the wires going to axis 1 and axis2.
|
|
#3
|
|||||
|
|||||
|
Re: turning joystick controls 90% in programming
indubitably is correct. One of your motors is running backwards. You can fix that by either swapping the wires or by changing its "invert" constant on the Open Drive in Begin.
Put the robot up on blocks. Push the joystick forward. Observe which motor is doing the wrong thing. Fix it to do the right thing. (If you then find that the robot is turning the wrong direction when you push the joystick sideways, that would be because you have the left and right motors swapped. Fix that in the Begin vi as well, by changing the left and right motor PWM definitions.) |
|
#4
|
|||
|
|||
|
Re: turning joystick controls 90% in programming
when you say swap wires you are talking on the physical robot or in the code?
When you say invert in the OPEN drive it is swapping the true false statement? Then finally it is changing to reverse the PMW1 address to PMW2 and vise versa in the Drive.vi? Sorry to be tedious but I want to be sure. Thanks for the assistance by the way |
|
#5
|
||||
|
||||
|
Re: turning joystick controls 90% in programming
@Coach#3536:
You can physically swap the wires going to the motor which is going in the wrong direction, or you can reverse the motor direction in software by setting the appropriate "motor inverted" input to True or False in the "Drive Open Motor" vi. you can swap left and right (or front and rear for that matter) motors by changing the PWM channels. see attached screenshot. |
|
#6
|
|||
|
|||
|
Re: turning joystick controls 90% in programming
As I stated before....."the WPI_JoystickGet.vi it appears that the for/aft movement is being sent into the wrong output to the motors."
When I switched them in this area the control issue was corrected. Thanks for the input to get me to the correct spot. |
|
#7
|
|||
|
|||
|
Re: turning joystick controls 90% in programming
We have the same problem (x and y axis inverted). How do you fix it if we are using C++ ?
thank you |
|
#8
|
||||
|
||||
|
Re: turning joystick controls 90% in programming
Gmzcarlos, you'll need to post the parts of your code that affect drive so we can help you.
|
|
#9
|
|||
|
|||
|
Re: turning joystick controls 90% in programming
We are using the "SimpleRobot" template Code.
When in Autonomous, the robot just spins and in teleoperated the x and y axis are inverted. Let me know if you need additional information. - UPDATE - We got it, just needed to revert the polarity of one the engines, and its now working. Last edited by Gmzcarlos : 12-02-2011 at 14:58. |
|
#10
|
||||
|
||||
|
Re: turning joystick controls 90% in programming
You should try different variations of true/false as I am like 90% sure that is your problem.
The reasons you see different numbers being output to your motors than the values that are sent into the subvi is because the arcadedrive vi squares your inputs to allow for a smoother control. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|