Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   CAN (http://www.chiefdelphi.com/forums/forumdisplay.php?f=185)
-   -   Updated CAN Jaguar Issue (http://www.chiefdelphi.com/forums/showthread.php?t=88846)

Alexander Meyer 11-01-2011 20:26

Updated CAN Jaguar Issue
 
Hey y'all! Question.. (correct me if this should go in the Java section)

During the offseason, our team got an old swerve chassis up and running with five black jags hooked up to the cRio via the serial interface. We programmed the whole setup using Java. After kickoff, we moved the controller board to a new prototype chassis--all CAN and encoder wiring stayed exactly the same. We then updated:

1) cRio -> image v25, with black jag serial plugin selected
2) Driver station
3) Black jags -> firmware version 92
4) Netbeans plugins

Now, all our code (which is also exactly the same) fails at jag initialization with an UncleanStatusException. In the past, this problem had to do with a low battery, but we hooked up a fully charged one and the problem still persists. We also tested the jags with BDC-COMM v92, and they work perfectly. Is there anything else that needs to be updated/changed to get these working?

DonRotolo 11-01-2011 21:36

Re: Updated CAN Jaguar Issue
 
Please excuse my unhelpful and indeed useless post in advance, and PLEASE do not follow this advice. Thank you.

Quote:

Originally Posted by Alexander Meyer (Post 997382)
UncleanStatusException

Wash the jaguars so they are clean again.:eek:

Alexander Meyer 11-01-2011 21:44

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by DonRotolo (Post 997473)
Wash the jaguars so they are clean again.:eek:

We tried that, but it resulted in a WetStatusException; we let them dry, but apparently they got dirty again..

Al Skierkiewicz 11-01-2011 21:48

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by DonRotolo (Post 997473)
Wash the jaguars so they are clean again.:eek:

Time to go home, Don.

drakesword 12-01-2011 12:06

Re: Updated CAN Jaguar Issue
 
Unclean can be caused by multiple issues. When we first dabbled in it we cam across three. Cant recall the numbers but one was that the jag plugin wasn't loaded. One was because one of the students loaded the serial plugin and the 2can plugin. The last error was because there was a short on the can bus (particularly the serial plug terminating resistor)

So to summerize ...

Check your can network
Check to make sure you have added the plugin to the cRio
Check that it is loading
Make sure you don't have both plugins loaded

rrossbach 12-01-2011 14:01

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 997382)
Now, all our code (which is also exactly the same) fails at jag initialization with an UncleanStatusException. In the past, this problem had to do with a low battery, but we hooked up a fully charged one and the problem still persists. We also tested the jags with BDC-COMM v92, and they work perfectly. Is there anything else that needs to be updated/changed to get these working?

Does your code retry when getting the exception, or just give up without retrying? Last year we noticed that we'd occasionally get the UncleanStatusException at initialization of the first Jag, and as best we could tell seemed to do with sensitivities with all the inter-task communications - i.e. the WPI library calls FRC_NetworkCommunication, which in turn calls the plugin main task, which calls send/receive tasks.... - I'd have to check with the team to see exactly where the diagnosis led.

In any case, we solved it by wrapping the constructors in a try block, and putting that in a loop so that we kept retrying the initialization until successful. The first Jag would occasionally have to be tried a couple of times before success.

- Ron
Team #2607 controls mentor

jhersh 12-01-2011 14:29

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 997382)
Hey y'all! Question.. (correct me if this should go in the Java section)

During the offseason, our team got an old swerve chassis up and running with five black jags hooked up to the cRio via the serial interface. We programmed the whole setup using Java. After kickoff, we moved the controller board to a new prototype chassis--all CAN and encoder wiring stayed exactly the same. We then updated:

1) cRio -> image v25, with black jag serial plugin selected
2) Driver station
3) Black jags -> firmware version 92
4) Netbeans plugins

Now, all our code (which is also exactly the same) fails at jag initialization with an UncleanStatusException. In the past, this problem had to do with a low battery, but we hooked up a fully charged one and the problem still persists. We also tested the jags with BDC-COMM v92, and they work perfectly. Is there anything else that needs to be updated/changed to get these working?

Please let me know what the actual status code is. I'm also in the process of cleaning up the exception handling in the Java implementation. I know it is not good at the moment.

-Joe

Alexander Meyer 12-01-2011 14:32

Re: Updated CAN Jaguar Issue
 
The status code is -52007.

jhersh 12-01-2011 14:39

Re: Updated CAN Jaguar Issue
 
That's a timeout. It may be that you are trying to talk to a device number that you haven't assigned on the bus or have a problem with the bus termination or there is a bug in the CANJaguar class. Have you tried it in LabVIEW or C++?

-Joe

Bryscus 12-01-2011 14:41

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 997382)
Hey y'all! Question.. (correct me if this should go in the Java section)

During the offseason, our team got an old swerve chassis up and running with five black jags hooked up to the cRio via the serial interface. We programmed the whole setup using Java. After kickoff, we moved the controller board to a new prototype chassis--all CAN and encoder wiring stayed exactly the same. We then updated:

1) cRio -> image v25, with black jag serial plugin selected
2) Driver station
3) Black jags -> firmware version 92
4) Netbeans plugins

Alexander,

Did you try the setup after transferring the parts and before updating the firmware/software? When it comes to designing complicated systems only change one (or as few as possible) thing(s) at a time before testing again. This may seem like it takes longer, but it's worth it. It's like writing all of your code for the year without testing it at the end. Test the components along the way and you're likely to end up with a fully functioning design.

Now aside from that, I've got nothing helpful :). Sorry.

- Bryce

Alexander Meyer 12-01-2011 15:21

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 998135)
That's a timeout. It may be that you are trying to talk to a device number that you haven't assigned on the bus or have a problem with the bus termination or there is a bug in the CANJaguar class. Have you tried it in LabVIEW or C++?

-Joe

I assumed that the CAN wiring (and all the IDs) were fine because a test with BDC-COMM yielded good results, i.e. everything worked. I have not tried it in any other languages, when I get over to the school I'll hack together some C++ code. As a side note, is there a list of status codes and what they mean anywhere?

To Bryscus, we performed limited testing (running one Jag in position control mode) after the move but before the firmware/software updates, and it worked fine.

Thanks for all the help so far!

Alexander Meyer 12-01-2011 15:26

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by rrossbach (Post 998105)
Does your code retry when getting the exception, or just give up without retrying? Last year we noticed that we'd occasionally get the UncleanStatusException at initialization of the first Jag, and as best we could tell seemed to do with sensitivities with all the inter-task communications - i.e. the WPI library calls FRC_NetworkCommunication, which in turn calls the plugin main task, which calls send/receive tasks.... - I'd have to check with the team to see exactly where the diagnosis led.

In any case, we solved it by wrapping the constructors in a try block, and putting that in a loop so that we kept retrying the initialization until successful. The first Jag would occasionally have to be tried a couple of times before success.

- Ron
Team #2607 controls mentor

Whoops, missed your post. Our code gives up without retrying--that's a good idea. I'll test that when I get there today.

Also, thanks for the hints, drakesword.

jhersh 12-01-2011 15:38

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 998180)
As a side note, is there a list of status codes and what they mean anywhere?

Check out the \src\com\ni\rio\NiRioStatus.java in the WPILibJ source. It has most of the errors that you're likely to run across in v25.

The next version of the cRIO image will have more custom error codes so it should be more clear what they are when you see the errors in the DS errors window.

-Joe

rrossbach 12-01-2011 15:45

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 998188)
Quote:

Originally Posted by rrossbach (Post 998105)
In any case, we solved it by wrapping the constructors in a try block, and putting that in a loop so that we kept retrying the initialization until successful. The first Jag would occasionally have to be tried a couple of times before success.

Whoops, missed your post. Our code gives up without retrying--that's a good idea. I'll test that when I get there today.

Also, thanks for the hints, drakesword.

At the risk of stating the obvious :D - of course give the loop a max number of retries....that way if there is something else going on and it never succeeds, you'll be able to see that rather than just continuing to try indefinitely.....

- Ron
Team #2607 controls mentor

drakesword 12-01-2011 18:33

Re: Updated CAN Jaguar Issue
 
We would also advise that you run PWM cables to your jags so if the CANBUS goes down you can still control your motors. Just have a reduced functionality mode.

jhersh 12-01-2011 18:40

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by drakesword (Post 998404)
We would also advise that you run PWM cables to your jags so if the CANBUS goes down you can still control your motors. Just have a reduced functionality mode.

That is disallowed by the rules. Rule R58-A

Quote:

The Jaguar must receive signals via either a PWM cable -OR- a CAN-bus connection. Both may not be used simultaneously.
-Joe

Alexander Meyer 12-01-2011 19:53

Re: Updated CAN Jaguar Issue
 
Alright, I tried looping the Jag initialization in Java until the exception went away..we let it go for about a minute then figured it wasn't going to fix anything. We reflashed the cRio for C++, wrote some test code, loaded it, and voila! Working robot. We figured all our problems were solved, shut off the robot, and continued where we left off. BUT..

..next time we powered up, we got the same exception. Drat. We checked the code, redeployed, and still nothing. We rebooted via the driver station a couple more times..and the third or fourth time, it worked. Weird. It continued functioning well for about an hour through numerous code changes/redeploys/reboots, then crapped out on us again. We hard rebooted via the breaker, then rebooted twice via the driver station, and we had control again.

So..we're still scratching our heads. Any ideas?

jhersh 12-01-2011 20:08

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 998497)
So..we're still scratching our heads. Any ideas?

And all of this was while using C++?

Can you try power-cycling the Jags in the case where it fails? I'd like to identify if the jags that stop responding or what.

Thanks,
-Joe

Alexander Meyer 12-01-2011 20:24

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 998512)
And all of this was while using C++?

Can you try power-cycling the Jags in the case where it fails? I'd like to identify if the jags that stop responding or what.

Thanks,
-Joe

Yes.

We tried that multiple times, and it never worked. The only time it worked is when we soft-rebooted the cRio a couple times after a power cycle.

jhersh 12-01-2011 20:28

Re: Updated CAN Jaguar Issue
 
Please double check your termination and wiring.

Alexander Meyer 12-01-2011 20:35

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 998544)
Please double check your termination and wiring.

Will do.

Alexander Meyer 13-01-2011 18:27

Re: Updated CAN Jaguar Issue
 
We triple-checked the wiring, and everything seemed to be fine. We are getting a new error, though (-63194), which from a cursory look in CANJaguar.cpp is caused by a mismatch in firmware versions, even though all the firmware versions are the same (we double-checked).

Still scratching our heads..

msk 13-01-2011 21:54

Re: Updated CAN Jaguar Issue
 
We are having a similar UncleanStatusException -52007 from the JaguarCANDriver class when we try to run our JAVA code. We just updated the firmware on all of the jaguars and also updated crio, netbeans, etc.

Our code was running okay on our robot before the updates....

Any ideas?

Thanks.

jhersh 14-01-2011 02:10

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Alexander Meyer (Post 999354)
We triple-checked the wiring, and everything seemed to be fine. We are getting a new error, though (-63194), which from a cursory look in CANJaguar.cpp is caused by a mismatch in firmware versions, even though all the firmware versions are the same (we double-checked).

Still scratching our heads..

I guess there must be an issue in the way the Java code is calling out to C++ land. I'll try to reproduce the issue.

-Joe

Shadow24 14-01-2011 09:04

Re: Updated CAN Jaguar Issue
 
We are also getting this problem using Java. All of the Jaguars are updated to v92 firmware and seem to be wired correctly.

dyanoshak 14-01-2011 14:30

Re: Updated CAN Jaguar Issue
 
Just to be absolutely sure:

Check the wiring to make sure that pin 1 on one connector goes to pin 1 on the other. When held flat and stretched out, the modular connectors on each end of the cable will be oppositely oriented from each other.

See the diagrams in the Cable Assembly sections of the Jaguar (or Black Jaguar) getting started guides at www.luminarymicro.com/jaguar

Sorry to repeat what others have suggested, but I have seen weird errors when a perfectly crimped cable actually crosses the signals.

-David

Shadow24 14-01-2011 14:56

Re: Updated CAN Jaguar Issue
 
We had our electrical team check it over several times and it works fine when tested in BDC_COMM (same as the other team experiencing these issues). They wired it the same way as last year so unless that changed....

jhersh 14-01-2011 14:59

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Shadow24 (Post 1000050)
We had our electrical team check it over several times and it works fine when tested in BDC_COMM (same as the other team experiencing these issues). They wired it the same way as last year so unless that changed....

Sounds to me like that's a good validation of the wiring. I'll look into the Java software for issues.

Shadow24 14-01-2011 15:18

Re: Updated CAN Jaguar Issue
 
Just for reference. This is the last section of the compiler/deployment output that I get. The most pertinent code is in the last 20 or so lines:

(Sorry that this is obnoxiously long, just trying to help out with troubleshooting)

------------------------------------------------------------------


init:
init:
No to.jar.file specified.
Using "suite\3173_Alpha_v1.0_1.0.0.jar"
Deleting directory C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\build
Deleting directory C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite
Deleting directory C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\j2meclasses
clean:
Created dir: C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\build
Compiling 1 source file to C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\build
compile:
Created dir: C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\j2meclasses
preverify:
Created dir: C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite
Building jar: C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite\3173_Alpha_v1.0_1.0.0.jar
jar-app:
Using "suite\3173_Alpha_v1.0_1.0.0.jar"
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] ...]
### Excluding compile: com.sun.squawk.Method::getParameterTypes
### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
[Including resource: META-INF/MANIFEST.MF]
Romizer processed 90 classes and generated these files:
C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\image.sym
C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\image.suite
C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\image.suite.metadata
C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\image.suite.api
Expanding: C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite\3173_Alpha_v1.0_1.0.0.jar into C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite
Moving 1 file to C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite
Moving 1 file to C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite
Moving 1 file to C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\suite
Deleting: C:\Users\Nick\Documents\NetBeansProjects\3173_Alph a_v1.0\image.suite.api
target IP: 10.31.73.2
Network interfaces on host:
Realtek PCIe GBE Family Controller: address: 10.31.73.6 netmask: 255.255.255.255
WARNING: Host is not on same subnet as robot. May not be able to complete all communication with robot.
Connecting FTP @10.31.73.2
upgrade:
Sending local file image.suite
flashapp:
deploy:
init:
[cRIO] [OTA Server] ********* REBOOTING cRIO *********
[cRIO]
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
[cRIO]
[cRIO] -> * Loading StartupDlls: debug
[cRIO] Entering debug.o StartupLibraryInit
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: MPC5200 -- Wind River Lite5200 BSP.
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 2.0/10
[cRIO] Created: Jul 29 2009, 13:41:47
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] Leaving debug.o StartupLibraryInit
[cRIO] * Loading StartupDlls: NiRioRpc
[cRIO] * Loading StartupDlls: niorbs
[cRIO] * Loading StartupDlls: NiViSrvr
[cRIO] * Loading StartupDlls: visa32
[cRIO] * Loading StartupDlls: nivissvc
[cRIO] task 0xecc5c8 (PAL00f9d9c0) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 3.2 started successfully.
[cRIO] task 0xc47a68 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading StartupDlls: nivision
[cRIO] * Loading StartupDlls: niserial
[cRIO] * Loading StartupDlls: FRC_FPGA
[cRIO] * Loading StartupDlls: FRC_NetworkCommunication
[cRIO] task 0x1af5680 (t2) deleted: errno=0 (0) status=0 (0)
[cRIO] FRC_NetworkCommunication was compiled from SVN revision 2203
[cRIO]
[cRIO] NI-VISA Server 4.5 started successfully.
[cRIO] task 0xe4abd8 (t1) deleted: errno=1835009 (0x1c0001) status=1 (0x1)
[cRIO] FPGA Hardware GUID: 0x2EAA5E59CAF1A8A966853A011B61CC91
[cRIO] FPGA Software GUID: 0x2EAA5E59CAF1A8A966853A011B61CC91
[cRIO] FPGA Hardware Version: 2011
[cRIO] FPGA Software Version: 2011
[cRIO] FPGA Hardware Revision: 1.5.3
[cRIO] FPGA Software Revision: 1.5.3
[cRIO] * Loading StartupDlls: FRC_BlackJagBridgePlugin
[cRIO] FRC_BlackJagBridgePlugin was compiled from SVN revision 60
[cRIO] * Loading StartupDlls: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2011 FRC, Jan 6 2011, 09:47:42
[cRIO]
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 8.6.1f3
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Jan 6 2011, 09:58:39
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Jan 6 2011, 09:58:39
[cRIO] FPGA Hardware GUID: 0x2eaa5e59caf1a8a966853a011b61cc91
[cRIO] FPGA Software GUID: 0x2eaa5e59caf1a8a966853a011b61cc91
[cRIO] Uncaught exception in Thread.run():
[cRIO] on thread edu.wpi.first.wpilibj.templates.RobotTemplate - main
[cRIO] edu.wpi.first.wpilibj.util.UncleanStatusException: In JaguarCANDriver::receiveMessage, fatal status code detected: -52007
[cRIO] at edu.wpi.first.wpilibj.can.JaguarCANDriver.receiveM essage(JaguarCANDriver.java:59)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.receiveMessage(CAN Jaguar.java:518)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.setTransaction(CAN Jaguar.java:542)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.enableControl(CANJ aguar.java:827)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.enableControl(CANJ aguar.java:809)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.initCANJaguar(CANJ aguar.java:254)
[cRIO] at edu.wpi.first.wpilibj.CANJaguar.<init>(CANJaguar.j ava:271)
[cRIO] at edu.wpi.first.wpilibj.templates.RobotTemplate.<ini t>(RobotTemplate.java:31)
[cRIO] in virtual method #11 of com.sun.squawk.Klass(bci=53)
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(99)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)

Shadow24 15-01-2011 13:52

Re: Updated CAN Jaguar Issue
 
Apparently we would periodically have the same error last year when we were using C++, however it would simply allow us to ignore this error and all of the motors would end up working just fine...


We would attempt to code it in C++ again, but our kit didn't come with a WindRiver disc and I can't for the life of me figure out how else to get it. I tried using last year's disc but the licensing refuses to work...

Mark McLeod 15-01-2011 15:02

Re: Updated CAN Jaguar Issue
 
The Windriver DVD is located inside the scholarship packet oddly enough.

Shadow24 15-01-2011 15:36

Re: Updated CAN Jaguar Issue
 
We figured that out... unfortunately we don't know where that is either... :/ Is there any way to do it without the disk?

(wtf does Windriver have to do with scholarship information?! You would think they could just put all of the discs together into one package...)

drakesword 15-01-2011 15:53

Re: Updated CAN Jaguar Issue
 
ruh roh

Code:

* Loading StartupDlls: FRC_BlackJagBridgePlugin
[cRIO] Warning: module 0xc59640 (FRC_BlackJagBridgePlugin.out) holds reference to undefined symbol _Z58FRC_NetworkCommunication_JaguarCANDriver_registerInterfaceP18CANInterfacePlugin.
[cRIO] (unloading partially loaded module FRC_BlackJagBridgePlugin.out)
[cRIO] ...FRC_BlackJagBridgePlugin failed to load.


LeelandS 15-01-2011 15:54

Re: Updated CAN Jaguar Issue
 
Hi all,

1126 here to add ourselves to the list of teams experiencing this problem.

We had one jaguar using the can/serial interface in 2010. We've updated to the 2011 software and now get the UncleanStatusException(status code -52007) when constructing a CANJaguar object. A step by step playback follows:

1. Verified that our robot was fully functional in the 2010 state.
2. upgraded the driver station to 2011
3. upgraded netbeans to the 2011 plugin
4. flashed the crio with the v25 (2011 image)
5. deployed our code and saw an error message indicating our jaguar should be updated to v92, it was 87 or so.
6. flashed the jaguar to v92 to support 2011
7. Got the UncleanStatusException.

We will try the try block/ loop workaround soon and report any success.

Edit: This is all happening in java

Shadow24 15-01-2011 16:06

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by SparxProgrammer (Post 1000860)
We will try the try block/ loop workaround soon and report any success.

We tried this to the point where it eventually returned an out-of-memory error and it never worked...

Mark McLeod 15-01-2011 16:08

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Shadow24 (Post 1000846)
We figured that out... unfortunately we don't know where that is either... :/ Is there any way to do it without the disk?

How about visiting another Rochester team to borrow their 2011 Windriver long enough to install it?

drakesword 15-01-2011 16:22

Re: Updated CAN Jaguar Issue
 
Fixed my problem but now the code crashes with unclean when setting PID . . . strange. Also we are getting . . .
Code:

[Squawk VM] Version: 2011 FRC, Jan  6 2011, 09:58:39
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Jan  6 2011, 09:58:39

it looks like jvm is loading twice also it listed once in the load method . . .


any idea on the unclean -52007 on setPID?

Adamsmasher 15-01-2011 16:27

Re: Updated CAN Jaguar Issue
 
Team 1646 is also experiencing this problem. We are using java, and although both the 2can and BDC-COMM see our jaguars, we get status code -52007 when we try to initialize the jaguars.

We tried putting the initialization in a loop as suggested, but still got the error.

drakesword 15-01-2011 16:34

Re: Updated CAN Jaguar Issue
 
it appears that the majority of the problems are happening in java. Here is what we did and checked so it can be eliminated from possible problems

Originally crashed when creating the CANJaguar Object.

Checked cable -ok-
Drove with bdc-comm -ok-
Changed load order of plugins -crashed before load-
Placed plugin right before loading java -crash at setPID-
Commented out all setup code after setPID and code ran

Notes: Without setting the PID for the speed control mode the jaguars will not run . . . that is normal

EDIT:
I reported the problem to wpi

Shadow24 15-01-2011 16:44

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Mark McLeod (Post 1000878)
How about visiting another Rochester team to borrow their 2011 Windriver long enough to install it?

SparX wanna help us out perhaps? :D

FRC4ME 16-01-2011 10:30

Re: Updated CAN Jaguar Issue
 
Team 339 is getting 52007 when using CAN as well. During initialization, getFirmwareVersion() returns fine, but enableControl() throws the UncleanStatusException.

If we use a second constructor argument to start in speed mode (therefore avoiding a call to enableControl() right away), we get the same failure whenever we send certain commands to the Jags. setPID() triggers a failure, for example.

We are also using Java.

drakesword 16-01-2011 10:56

Re: Updated CAN Jaguar Issue
 
Just did some coding . . .

Reverted to the old CANJaguar api and still had issues.

drakesword 16-01-2011 11:36

Re: Updated CAN Jaguar Issue
 
Is everyone who is having issues using the serial to can or is there some people with the 2can having the issues as well?

drakesword 16-01-2011 13:06

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Adamsmasher (Post 1000905)
Team 1646 is also experiencing this problem. We are using java, and although both the 2can and BDC-COMM see our jaguars, we get status code -52007 when we try to initialize the jaguars.

We tried putting the initialization in a loop as suggested, but still got the error.

When you used the 2CAN did you load the 2CAN plugin instead of the serial can plugin?

I would like to know if the 2CAN is indeed working. If it is we will switch temporarily

ozrien 16-01-2011 13:23

Re: Updated CAN Jaguar Issue
 
Be sure to use the latest 2CAN plugin from our site....
http://www.crosstheroadelectronics.com/2CAN.htm

The plugin that's installed with the FRC image is very old (early 2010). Requesting firmware version does not work with that plugin.

More info here...
http://forums.usfirst.org/showthread...highlight=2can

drakesword 16-01-2011 13:30

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by ozrien (Post 1001094)
Be sure to use the latest 2CAN plugin from our site....
http://www.crosstheroadelectronics.com/2CAN.htm

The plugin that's installed with the FRC image is very old (early 2010). Requesting firmware version does not work with that plugin.

More info here...
http://forums.usfirst.org/showthread...highlight=2can

Is it possible that the serial plugin is also old? In that event we will try to load the plugin we used in December and report back


]EDIT[
Nope still broken.

Adamsmasher 16-01-2011 13:56

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by drakesword (Post 1001073)
When you used the 2CAN did you load the 2CAN plugin instead of the serial can plugin?

I would like to know if the 2CAN is indeed working. If it is we will switch temporarily

After updating to the latest 2CAN plugin the 2CAN is communicating with the jags and the cRIO fine, but we still get UncleanStatusException when we try to initialize.

jhersh 16-01-2011 18:44

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by drakesword (Post 1001100)
Is it possible that the serial plugin is also old? In that event we will try to load the plugin we used in December and report back

The serial plugin is not old. When the v25 Image was created, I put the wrong 2CAN plugin in the image. That will be fixed in the update.

jhersh 16-01-2011 18:47

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by Adamsmasher (Post 1001123)
After updating to the latest 2CAN plugin the 2CAN is communicating with the jags and the cRIO fine, but we still get UncleanStatusException when we try to initialize.

This is an issue with the Java implementation. The C++ and LabVIEW CANJaguar implementations are not affected.

Please see this tracker: http://firstforge.wpi.edu/sf/go/artf1306

-Joe

drakesword 16-01-2011 19:54

Re: Updated CAN Jaguar Issue
 
Thanks so much for working on this problem over the weekend. Team 346 appreciates it.

JewishDan18 16-01-2011 21:03

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 1001295)
This is an issue with the Java implementation. The C++ and LabVIEW CANJaguar implementations are not affected.

Please see this tracker: http://firstforge.wpi.edu/sf/go/artf1306

-Joe

Glad to read this. Team 20's controls team spent the greater portion of this weekend figuring this out for ourselves. Once we reimaged the CRIO back to last year's image and loaded the old Netbeans plugins and had them work flawlessly, we called it a day. Thanks for your work!

drakesword 17-01-2011 14:17

Re: Updated CAN Jaguar Issue
 
Hey Joe,
when could we expect the update to be pushed through. Our team is eager to run our chassis with can asap so drivers can practice.

vinnie 17-01-2011 17:05

Re: Updated CAN Jaguar Issue
 
We here at team 3309 have created a tutorial for our workaround to get CAN working before the official fix is released. Go to our wiki page http://goo.gl/ytxaL to see the tutorial.

jhersh 17-01-2011 17:42

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by drakesword (Post 1002021)
Hey Joe,
when could we expect the update to be pushed through. Our team is eager to run our chassis with can asap so drivers can practice.

I anticipate it will be out later today or possibly tomorrow.

-Joe

jhersh 17-01-2011 20:11

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by drakesword (Post 1002021)
Hey Joe,
when could we expect the update to be pushed through. Our team is eager to run our chassis with can asap so drivers can practice.

It is posted now! You can download it at FIRST Forge or you can use the automatic update in NetBeans.

-Joe

drakesword 17-01-2011 20:38

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 1002303)
It is posted now! You can download it at FIRST Forge or you can use the automatic update in NetBeans.

-Joe

For those less aware . . .
http://firstforge.wpi.edu/sf/frs/do/viewRelease/projects.wpilib/frs.wpilib_java_update_for_2011_frc.wpilib_java_fr c_2011_update_ve_1

is where the update is. Unload all of the older nbm files and load the 5 new ones.

vinnie 17-01-2011 20:43

Re: Updated CAN Jaguar Issue
 
Thanks for getting it fixed!
But now I am having a new problem.When I tried to call getSpeed(), it would constantly return 0.0. I looked in the javadoc and it said "returns speed of the motor in RPM based on the configured feedback." How do I configure it so I get a real speed value?

Joe Ross 17-01-2011 20:45

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by drakesword (Post 1002341)
For those less aware . . .
http://firstforge.wpi.edu/sf/frs/do/viewRelease/projects.wpilib/frs.wpilib_java_update_for_2011_frc.wpilib_java_fr c_2011_update_ve_1

is where the update is. Unload all of the older nbm files and load the 5 new ones.

Or if you used the installation over the network, just update.

jhersh 17-01-2011 21:04

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by vinnie (Post 1002348)
Thanks for getting it fixed!
But now I am having a new problem.When I tried to call getSpeed(), it would constantly return 0.0. I looked in the javadoc and it said "returns speed of the motor in RPM based on the configured feedback." How do I configure it so I get a real speed value?

Have you configured a reference sensor?

A call like:
Code:

myJag.setSpeedReference(CANJaguar.SpeedReference.kQuadEncoder);
-Joe

vinnie 17-01-2011 21:13

Re: Updated CAN Jaguar Issue
 
Thanks, I set a position reference but I guess I forgot to set a speed reference. This is the first year that we're using CAN so we still have a lot to learn.

jtdowney 18-01-2011 07:27

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 1002303)
It is posted now! You can download it at FIRST Forge or you can use the automatic update in NetBeans.

-Joe

Thanks for fixing this. We have a multi-team design review tonight so we wont get to try this out until tomorrow but I am glad we can finally switch back from PWM control.

Alexander Meyer 18-01-2011 11:51

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 1002303)
It is posted now! You can download it at FIRST Forge or you can use the automatic update in NetBeans.

-Joe

Awesome, thanks! I will definitely try it out today.

Alexander Meyer 20-01-2011 21:52

Re: Updated CAN Jaguar Issue
 
I had a chance to try it out yesterday and today, and it looks like the timeout issue has been fixed! Jag control seems to be rock solid. Thanks guys!

MichaelBeebe 01-02-2011 21:23

Re: Updated CAN Jaguar Issue
 
Quote:

Originally Posted by jhersh (Post 998135)
That's a timeout. It may be that you are trying to talk to a device number that you haven't assigned on the bus or have a problem with the bus termination or there is a bug in the CANJaguar class. Have you tried it in LabVIEW or C++?

-Joe

We tried this with Labview Open 4 motors with Can Jaguar and have the same issue. We may have bitten off more than we can chew with using the Can rather than PWM< but thought it would be the best way to minimize wiring.

We were daisy chaining the Jags, (4) for all motors, and when we enter ID 1, 2, 3, 4, motor 1 passes, but 2 thru 4 return the error. We can communicate to 1 jag with no issues, but the LAbView coed does not allow you to change the address for each individual motor. Always reverts to PWM by default for motor 2, 3, and 4. Maybe I am missing something, but had other eyes looking at it with me, and no joy!

Any experienced Labview folks tried this yet????

wjr1965 01-02-2011 22:03

Re: Updated CAN Jaguar Issue
 
Error -52007 is fixed by adding a 0.050 second (50 millisecond) delay between motor speed commands to the Jaguar. If you Google this, you will find the original post on Chief Delphi (not my fix, but we tested this and it got rid of the -52007 error).

Hope this helps!


All times are GMT -5. The time now is 00:49.

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