![]() |
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. |
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. |
Re: Problem with Jaguar Inputs
1 Attachment(s)
|
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. |
Re: Problem with Jaguar Inputs
I have multiple times yet every time i get the same result.
|
Re: Problem with Jaguar Inputs
Quote:
|
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? |
Re: Problem with Jaguar Inputs
The Jaguar's are blinking yellow as they normally do and yes I did enable the robot.
|
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. |
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.
|
Re: Problem with Jaguar Inputs
Quote:
|
Re: Problem with Jaguar Inputs
yes we did. I made sure of that.
|
Re: Problem with Jaguar Inputs
If the big orange RSL is on with short winks off, that by itself is a pretty good indication that the Digital Sidecar is properly powered and the robot is enabled. The blinking yellow LED is the primary clue here. It's telling you that the Jaguar is not receiving a PWM signal. There are a couple of things I can think of immediately that would cause that. One is faulty software that isn't initializing the PWM channel.
Looking at the code you posted, I don't see anywhere that initMotors() is being called. That might be a problem. |
Re: Problem with Jaguar Inputs
initMotors() is at line 28, also I would like to thank you for trying to help me thus far.
Code:
void initMotors() |
Re: Problem with Jaguar Inputs
But what calls the initMotors() function? I don't see anywhere in the code you posted that sets the jMotor array values.
|
| All times are GMT -5. The time now is 03:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi