![]() |
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? |
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:
|
Re: Updated CAN Jaguar Issue
Quote:
|
Re: Updated CAN Jaguar Issue
Quote:
|
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 |
Re: Updated CAN Jaguar Issue
Quote:
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 |
Re: Updated CAN Jaguar Issue
Quote:
-Joe |
Re: Updated CAN Jaguar Issue
The status code is -52007.
|
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 |
Re: Updated CAN Jaguar Issue
Quote:
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 |
Re: Updated CAN Jaguar Issue
Quote:
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! |
Re: Updated CAN Jaguar Issue
Quote:
Also, thanks for the hints, drakesword. |
Re: Updated CAN Jaguar Issue
Quote:
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 |
Re: Updated CAN Jaguar Issue
Quote:
- Ron Team #2607 controls mentor |
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.
|
Re: Updated CAN Jaguar Issue
Quote:
Quote:
|
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? |
Re: Updated CAN Jaguar Issue
Quote:
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 |
Re: Updated CAN Jaguar Issue
Quote:
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. |
Re: Updated CAN Jaguar Issue
Please double check your termination and wiring.
|
Re: Updated CAN Jaguar Issue
Quote:
|
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.. |
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. |
Re: Updated CAN Jaguar Issue
Quote:
-Joe |
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.
|
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 |
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....
|
Re: Updated CAN Jaguar Issue
Quote:
|
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) |
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... |
Re: Updated CAN Jaguar Issue
The Windriver DVD is located inside the scholarship packet oddly enough.
|
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...) |
Re: Updated CAN Jaguar Issue
ruh roh
Code:
* Loading StartupDlls: FRC_BlackJagBridgePlugin |
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 |
Re: Updated CAN Jaguar Issue
Quote:
|
Re: Updated CAN Jaguar Issue
Quote:
|
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:39any idea on the unclean -52007 on setPID? |
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. |
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 |
Re: Updated CAN Jaguar Issue
Quote:
|
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. |
Re: Updated CAN Jaguar Issue
Just did some coding . . .
Reverted to the old CANJaguar api and still had issues. |
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?
|
Re: Updated CAN Jaguar Issue
Quote:
I would like to know if the 2CAN is indeed working. If it is we will switch temporarily |
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 |
Re: Updated CAN Jaguar Issue
Quote:
]EDIT[ Nope still broken. |
Re: Updated CAN Jaguar Issue
Quote:
|
Re: Updated CAN Jaguar Issue
Quote:
|
Re: Updated CAN Jaguar Issue
Quote:
Please see this tracker: http://firstforge.wpi.edu/sf/go/artf1306 -Joe |
Re: Updated CAN Jaguar Issue
Thanks so much for working on this problem over the weekend. Team 346 appreciates it.
|
Re: Updated CAN Jaguar Issue
Quote:
|
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. |
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.
|
Re: Updated CAN Jaguar Issue
Quote:
-Joe |
Re: Updated CAN Jaguar Issue
Quote:
-Joe |
Re: Updated CAN Jaguar Issue
Quote:
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. |
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? |
Re: Updated CAN Jaguar Issue
Quote:
|
Re: Updated CAN Jaguar Issue
Quote:
A call like: Code:
myJag.setSpeedReference(CANJaguar.SpeedReference.kQuadEncoder); |
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.
|
Re: Updated CAN Jaguar Issue
Quote:
|
Re: Updated CAN Jaguar Issue
Quote:
|
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!
|
Re: Updated CAN Jaguar Issue
Quote:
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???? |
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