Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: CANJaguar class causing FRC_RobotTask to crash

  1. #1
    Join Date
    Feb 2010
    Posts
    3

    Default CANJaguar class causing FRC_RobotTask to crash

    We're trying to use the 2CAN to do simple speed control with a Black Jaguar with this year's library. The jaguar runs when we use PWM mode, but if we use the CANJaguar class and enable the robot, it crashes immediately. Before we enable the robot, we have a flashing green light on the 2CAN's status light. The light on the Jaguar always flashes orange, and never becomes steady.

    This is what we see when we run the program, but despite the message, we have updated the firmware to version 92, which BDC-COMM confirms. Oddly, when we debug the program by printing out the jaguar's temperature to test communication, it does so correctly exactly once before the crash.

    Has anybody else run into this?

    Code:
    >>>>ERROR: status == -52007 (0xFFFF34D9) in getTransaction() in C:/windriver/workspace/WPILib/CANJaguar.cpp at line 402
    
    fwVersion[5]: 0
    ERROR: Jaguar 5 must be updated to at least version 92 of the FIRST approved firmware!
    
    
    >>>>ERROR: status == -63194 (0xFFFF0926) in InitCANJaguar() in C:/windriver/workspace/WPILib/CANJaguar.cpp at line 40
    
    
    alignment
    Exception current instruction address: 0x02162ed4
    Machine Status Register: 0x0000b032
    Data Access Register: 0x5a545331
    Condition Register: 0x28000088
    Data storage interrupt Register: 0x00002c09
    Task: 0x21c0078 "FRC_RobotTask"
    0x21c0078 (FRC_RobotTask): task 0x21c0078 has had a failure and has been stopped.
    0x21c0078 (FRC_RobotTask): fatal kernel task-level exception!
    
    Welcome to LabVIEW Real-Time 8.6.1f3

  2. #2
    Join Date
    Sep 2008
    Location
    National Instruments: Austin, TX
    Posts
    445

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Quote Originally Posted by CodeToaster View Post
    We're trying to use the 2CAN to do simple speed control with a Black Jaguar with this year's library. The jaguar runs when we use PWM mode, but if we use the CANJaguar class and enable the robot, it crashes immediately. Before we enable the robot, we have a flashing green light on the 2CAN's status light. The light on the Jaguar always flashes orange, and never becomes steady.

    This is what we see when we run the program, but despite the message, we have updated the firmware to version 92, which BDC-COMM confirms. Oddly, when we debug the program by printing out the jaguar's temperature to test communication, it does so correctly exactly once before the crash.

    Has anybody else run into this?

    Code:
    >>>>ERROR: status == -52007 (0xFFFF34D9) in getTransaction() in C:/windriver/workspace/WPILib/CANJaguar.cpp at line 402
    
    fwVersion[5]: 0
    ERROR: Jaguar 5 must be updated to at least version 92 of the FIRST approved firmware!
    
    
    >>>>ERROR: status == -63194 (0xFFFF0926) in InitCANJaguar() in C:/windriver/workspace/WPILib/CANJaguar.cpp at line 40
    
    
    alignment
    Exception current instruction address: 0x02162ed4
    Machine Status Register: 0x0000b032
    Data Access Register: 0x5a545331
    Condition Register: 0x28000088
    Data storage interrupt Register: 0x00002c09
    Task: 0x21c0078 "FRC_RobotTask"
    0x21c0078 (FRC_RobotTask): task 0x21c0078 has had a failure and has been stopped.
    0x21c0078 (FRC_RobotTask): fatal kernel task-level exception!
    
    Welcome to LabVIEW Real-Time 8.6.1f3
    I'm guessing you are using C++. The reason it's failing is that the getFirmwareVersion call is timing out, the library thinks the version is 0, and then something crashes as a result of the object not being initialized.

    What version of the 2CAN firmware are you using? Perhaps it's not compatible with the 2CAN driver plugin? Have you tried it with the Black Jag serial port bridge?

    -Joe

  3. #3
    Join Date
    Feb 2010
    Posts
    3

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Thanks for the quick response! We checked our 2CAN firmware, which was already updated to version 1.6. However, once we switched to the serial connector, everything worked great!

    Naturally, though, we'd still prefer to use the 2CAN connector. We have a couple of extras, so I could plug in another one to see if it works any better. Is there a good way to test a 2CAN independently of the robot?

  4. #4
    Join Date
    Sep 2008
    Location
    National Instruments: Austin, TX
    Posts
    445

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Quote Originally Posted by CodeToaster View Post
    Thanks for the quick response! We checked our 2CAN firmware, which was already updated to version 1.6. However, once we switched to the serial connector, everything worked great!

    Naturally, though, we'd still prefer to use the 2CAN connector. We have a couple of extras, so I could plug in another one to see if it works any better. Is there a good way to test a 2CAN independently of the robot?
    I've seen the issue with the 2CAN reading the firmware version of the Jags as well. Hopefully we can track the issue down soon. I guess you can start your testing with the serial connection until then.

    -Joe

  5. #5
    Join Date
    Sep 2010
    Posts
    1

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Just went to the 2CAN website and found there is a firmware update for the 2CAN.

    http://www.crosstheroadelectronics.com/2CAN.htm

  6. #6
    Join Date
    Dec 2009
    Posts
    6

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Quote Originally Posted by CodeToaster View Post
    Thanks for the quick response! We checked our 2CAN firmware, which was already updated to version 1.6. However, once we switched to the serial connector, everything worked great!
    Quote Originally Posted by sam_who View Post
    Just went to the 2CAN website and found there is a firmware update for the 2CAN.

    http://www.crosstheroadelectronics.com/2CAN.htm
    Yes, I think the 2CAN needs to have at least firmware version 2.1 in order to work with the Jaguar FRC firmware 92 and later. Also make sure that you are using the latest version of the 2CAN plugin - the cRIO imaging tool should take care of that but it can't hurt to double-check.

    Quote Originally Posted by CodeToaster View Post
    Is there a good way to test a 2CAN independently of the robot?
    Aside from using the internal web dashboard, you can send it CAN frames directly - for example from a Windows program running on a laptop. We used the plugin source as a basis and developed a "driver" from that. CTRE also has source for a 2CAN comm DLL posted as part of the CANipede/RCS tools.

    However, you can't have the FRC-specific firmware loaded on the Jags if you're controlling the 2CAN without the cRIO. So the amount of "testing" you can do of the competition-legal configuration is limited without the cRIO.

    - Ron
    Team #2607 controls mentor

  7. #7
    Join Date
    Nov 2009
    Location
    Sterling Heights, MI
    Posts
    5

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Looks like the 2CAN plugin that the FRC cRIO Imaging Tool installs was from very early in the 2010 season (v1.1.0.0). This was well before we added support for remote CAN frames (a necessary type of frame for requesting firmware version from a Jaguar).

    Inside CANJaguar::InitCANJaguar if the version is not right we print the error strings and return without instantiating m_safetyHelper (MotorSafetyHelper *). From then on we dereference this uninitialized pointer in several places, causing all sorts of crashes and debugger messages.

    Latest firmware and plugin can be downloaded at...
    http://www.crosstheroadelectronics.com/2CAN.htm
    I tested today's update with the 2011 image and fixed a couple bugs...
    Bug Fix - sometimes first requested transmit CAN frame would be dropped as we attempt to find and connect to 2CAN.
    Bug Fix - regression bug from 12/11/2010's plugin update where cRIO's FTP server would stop working after installing 2CAN plugin.
    Feature - plugin works with new 2can firmware >= 2.1 or last season's firmware 1.6.

    With this updated plugin negotiating firmware version will definitely work. However the bug in CANJaguar will mean that having incorrect Jag firmware may crash your cRIO. Also not having your Jag powered when you boot the cRIO or deploy your code will also crash the cRIO. I'm sure this will be fixed later but in the meantime you can modify the code yourself and rebuild WPILIB's library.

    I also tested using our 2011 plugin with last season's 2can firmware 1.6, it should work fine. However the LEDs states are different (see latest user manual).

    The web dash is definitely neat. We will be providing another 2can firmware update shortly to match the settings and options available in BDC-COMM utility.
    Omar Zrien - Cross The Road Electronics - Chief Software
    CTR Documentation and Updates
    FRC2015 Programming Help
    WPILIB Source Documentation

  8. #8
    Join Date
    Jan 2011
    Posts
    1

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Gentlemen, we too have encountered the "version 92" bug. Unfortunately, when we install the latest 2can firmware and 2can driver plugin, it causes the crio to completely wedge when it attempts to load that plugin. We are running the latest (2011) crio firmware. Please tell us how to proceed. Thank you.

  9. #9
    Join Date
    Feb 2010
    Posts
    3

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    To correct Martin's post, we used the updated plugin and firmware as of this past Saturday. Today I used the updated plugin, and after a bit of tinkering with the code, the jaguars were responding to voltage commands.

    The plugin that was roughly 100kb would cause the robot to halt its boot sequence and just hang. The newer one (SVN rev 64) was the working one.

    I have no idea why, but 5 out of the 6 jaguars reset to bootloader and required a reflash of their firmware.

  10. #10
    Join Date
    Nov 2009
    Location
    Sterling Heights, MI
    Posts
    5

    Default Re: CANJaguar class causing FRC_RobotTask to crash

    Yep, that's one of the bugs mentioned...
    Bug Fix - regression bug from 12/11/2010's plugin update where cRIO's FTP server would stop working after installing 2CAN plugin.

    That plugin was built Dec 11,2010 and was tested against 2010 cRIO image. The symptom of wedging the cRIO wasn't observed until the 2011 release, which prompted the update (1/15/2011).
    Omar Zrien - Cross The Road Electronics - Chief Software
    CTR Documentation and Updates
    FRC2015 Programming Help
    WPILIB Source Documentation

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •