Go to Post If you're destroying game pieces left and right, you're doin' it wrong. - Ian Curtis [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-03-2012, 18:54
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
New Jaguar Object causing failure

I was going to troubleshoot for a few days like always, but our first regional starts in 2 days. I really need some help. Basically this is what I have gotten to work. The template that it is based on (TemplateOfDoom) is very similar to IterativeRobot. It calls whatever mode we're in, constantly.

Code:
package edu.wilsonhs.robotics.seb;
import edu.wpi.first.wpilibj.*;

public class TankDriveOfDoom extends TemplateOfDoom {

Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
RobotDrive chassis = new RobotDrive(1,2,3,4);

    public void teleOp(){
        chassis.tankDrive(leftStick, rightStick);
        getWatchdog().feed();
    }
    
    public void init(){
        getWatchdog().setEnabled(true);
        getWatchdog().setExpiration(0.5);
    }
    
}
This drives perfectly, and all of the lights blink properly. Now in order to get other motors and arms working I use the wpilibj's Jaguar class. This line screws everything up:
Code:
private final Jaguar pooperScooper = new Jaguar(5);
What happens when i add Just that one single line is that:
1. It enables/disables properly, and my template is set to report that the operator changed modes in netBeans as well(println). It does.
2.All jags will idle (yellow blink), even the ones that moved before.
3. Joysticks won't do anything. Using the trigger to move a motor doesn't work either.
4. No error messages show up anywhere.
And, finally the most important one:
5. The status light, will blink slowly (good) when disabled, but will turn off entirely when activated (Bad). When I comment out that one line, it works just fine (no rhyme intended).

Has anybody ever had this problem before?
thanks, seb

p.s. Yes, I did try pooperScooper.setSafetyEnabled(false);
Reply With Quote
  #2   Spotlight this post!  
Unread 13-03-2012, 19:27
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: New Jaguar Object causing failure

99% sure that the issue isn't with your code.

Your Digital Sidecar needs 12V power from a 20A breaker on the Power Distribution board. Without this you will be able to run 4 PWM signals by leaching power from the cRIO module through the DB37 but when you instantiate a fifth one they all stop running.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-03-2012, 19:41
sebflippers sebflippers is offline
Registered User
FRC #2914
 
Join Date: Jan 2012
Location: dc
Posts: 56
sebflippers will become famous soon enoughsebflippers will become famous soon enough
Re: New Jaguar Object causing failure

Can't check now, but we did a pretty sloppy job wiring the backup electronics board. That would explain all of the symptoms.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi