|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Problem with Jaguar Inputs
Okay, so I'm absolutely stumped on this, the code compiles, deploys and the robot can read it but when I try and give it an input with the joystick the robot remains immobile. I've set the Jaguars to use "Set" and the float is the Joystick Y-axis. Here is what I have:
void initMotors() { jMotor[1] = new Jaguar(4,1); // front right jMotor[2] = new Jaguar(4,2); // front left jMotor[3] = new Jaguar(4,3); // back right jMotor[4] = new Jaguar(4,4); // back left } This is in void TeleopPeriodic: jMotor[1]->Set(m_XboxRightStickY); jMotor[3]->Set(m_XboxRightStickY); jMotor[2]->Set(m_XboxLeftStickY); jMotor[4]->Set(m_XboxLeftStickY); They Joystick axis floats are set up correctly. So why does this not function properly? Also, this is my first post on Chief Delphi so if I left something out I apologize. Last edited by Nicholas Norman : 11-02-2011 at 13:03. |
|
#2
|
|||
|
|||
|
Re: Problem with Jaguar Inputs
Could we please see your full source code? It's really hard to debug with just a small snippet.
EDIT: I would recommend displaying the joystick values in NetConsole or on the DriverStation to make sure your joystick is functioning properly. |
|
#3
|
||||
|
||||
|
Re: Problem with Jaguar Inputs
|
|
#4
|
||||
|
||||
|
Re: Problem with Jaguar Inputs
Just going to make sure, it's made me feel like an idiot more than once today;
did you reset your robot after you deployed the code? Also, try undeploying then redeploying. |
|
#5
|
||||
|
||||
|
Re: Problem with Jaguar Inputs
I have multiple times yet every time i get the same result.
|
|
#6
|
||||
|
||||
|
Re: Problem with Jaguar Inputs
I really have no idea then, I haven't dealt with Xbox control.
|
|
#7
|
|||||
|
|||||
|
Re: Problem with Jaguar Inputs
What do the Jaguar's LEDs do while you're moving the joysticks?
Did you remember to ENABLE the robot from the Driver Station? |
|
#8
|
||||
|
||||
|
Re: Problem with Jaguar Inputs
The Jaguar's are blinking yellow as they normally do and yes I did enable the robot.
|
|
#9
|
|||||
|
|||||
|
Re: Problem with Jaguar Inputs
Blinking yellow means they're not receiving any commands. You're using PWM control from the Digital Sidecar, right? Make sure your cables are correctly connected to the pins they're supposed to be connected to. The Jaguar PWM connection is obvious, but check to see that you don't have it plugged in backwards. The Sidecar PWM connections are similarly obvious -- they're the widely-spaced triplets of pins with white friction-fit plastic retainers on each set -- but again verify that the connectors are not backwards.
And look at the three power LEDs on the Digital Sidecar. If any of them isn't brightly lit, you need to fix your power wiring. What is the big orange Robot Signal Light doing while you try to make your Jaguars respond? It should be on with a very brief flicker off about every second and a half. |
|
#10
|
||||
|
||||
|
Re: Problem with Jaguar Inputs
The three LEDs on the Digital Sidecar are brightly lit, and the robot signal light has a short flicker about every two seconds. I don't believe it's a wiring issue. It might be worth mentioning that I'm working on last year's robot until this years is ready to test.
|
|
#11
|
|||||
|
|||||
|
Re: Problem with Jaguar Inputs
I hope you updated the cRIO image before you tried using this year's code.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|