Jaguar Non-FRC Firmware

So we have been messing arround with the jags outside of a competition environment. We had some code running where we could control voltage and position from an attached encoder. We couldnt get speed or current to work so we decided to update the firmware and hope that was the problem.

Firmware was at version 5### we updated to FRC 91 before we realised we couldn’t use it with a 2CAN sending raw frames.

We downloaded the firmware development kit which had 5 different versions of the firmware in it (6288). Each one supported the Voltage control but none of the other functions. Also when we stopped sending data the controller continued with its previously set output (EVEN DISCONNECTED FROM 2CAN!)

So what version of the non-frc firmware are we supposed to use to have all of the closed loop functions running correctly?

Since the release of Jaguar, all control modes (voltage, speed, current, and position) have been functional. During the course of the build season earlier this year some teams helped us determine that there was a bug in the PID routine that made it more difficult to tune your PID constants. We released firmware versions up to 91 to fix the PID bug as well as some other minor bugs.

Note: for the 2010 season, FRC firmware versions 87 through 91 were all legal for competition.

If you are using a FIRST cRIO as the controller, you must use FRC legal firmware on the Jaguars. The cRIO uses the trusted protocol that is not present in the non FRC versions of Jaguar firmware.

If you are using some other controller with 2CAN or the Black Jag (as a serial bridge) you must use non FRC firmware. Otherwise you will not be able to communicate with the Jaguars because of the trusted protocol.

The exception to this statement is if you are running an FRC version of BDC-COMM on your computer which is serially connected to a Black Jaguar. The FRC version of BDC-COMM has both trusted and untrusted support.

In summary, these are the combinations that will work:

Controller - Bridge - Required Jaguar Firmware

cRIO - 2CAN - FRC legal
cRIO - Black Jag - FRC legal

PC (FRC BDC-COMM) - Black Jag - FRC legal/non FRC

PC (BDC-COMM)- Black Jag - non FRC
Other - Black Jag/2CAN - non FRC

What is your setup; how are you connecting to and sending the Jaguars commands?

-David

My setup is Laptop -> 2CAN -> Jaguar.

Problem is I updated the firmware to the one included in the rdk and only voltage mode is working.

What are you using to talk to the Jaguar through the 2CAN? Are you using a custom program? What do you mean by “only voltage mode is working”? Please describe your steps that lead you to the non-working modes.

I believe Cross the Road Electronics has an example application on their 2CAN website. My understanding is it only handles voltage mode. I imagine that it would be possible to modify this example to run different Jaguar modes.

Perhaps someone from Cross the Road can offer their advice.

-David

Useing the source of the FRC 2CAN plugin I send data over a UDP socket to the 2CAN. The origional firmware on the Jaguar (verson 5422) only seemed to only work properly with voltage and position mode.
No changes were made to the software but the firmware was updated to the most current version in the RDK. Then tested voltage mode and it appeared to work. Tested current speed and position and none worked.

Tested voltage mode but unplugged the Ethernet cable when I got frustrated to see that the jaguar kept running. I think I just have a bad firmware version.

Is there any place that has the older versions available?

I added the underlining and footnote markers] to the above quote to facilitate the following questions.

I want to make sure I understand clearly what you are saying:

  • who does the pronoun “We” [1] refer to? TI or FRC?

  • do [2] and [3] refer to the same firmware? If not, can you please post a link to the “FRC” firmware?

  • where can the “FRC version” of BDC-COMM [4] be downloaded ?

Thanks.

**

Are you configuring the PID constants? By default they are all 0, so no matter what speed, position, or current you tell the Jaguar to hold, it will not move with P, I, and D set to 0. Are you wiring up the appropriate sensors for position and speed modes? Are you configuring those sensors properly (number of encoder ticks, turns of the pot, etc.)?

Do you have a Black Jaguar? I would recommend trying to control the Jaguar with BDC-COMM first. You will have to make your own serial adapter, but the instructions and part numbers are available in the MDL-BDC24 Getting Started Guide.

This way you can get the various modes working and then troubleshoot your own method of connecting to the Jaguar. BDC-COMM offers an easy way to see what parameters need to be set to get the modes to run correctly.

Without more detail on what you’re doing, I can’t help troubleshoot the problem.

We only have the latest firmware versions on the web.

-David

TI

Yes, they refer to the same firmware. The FRC firmware and the FRC BDC-COMM can be downloaded at www.luminarymicro.com/jaguar. You will download a zip file that has firmware for Gray Jag and Black Jag and the BDC-COMM executable.

Yes as I said there was NO change to the software I was using. The software worked for voltage and position control. PID was 10, 0.02, 0.02. Encoders were read and Jags reported position and speed.

If I had a serial port I would. But cant until I have access to one.

Like I said the jaguar can protocol is being used just its being sent to the 2CAN as raw can frames. Here is a sample piece of code that should work.

CANJaguar canJaguar = new CANJaguar(2, CANJaguar.ControlMode.kSpeed);
        canJaguar.setSpeedReference( CANJaguar.SpeedReference.kEncoder);
        
        canJaguar.configEncoderCodesPerRev((short)20);
        canJaguar.setPID(10, 0.02, 0.02);

        canJaguar.enableControl(0);

        while(true)
        {
            canJaguar.set(100);
            
            try
            {
                Thread.sleep(10);
            }
            catch(InterruptedException excep)
            {}
        }

This is the very reason, for FRC, you have to use the specified code. WE want all robots to stop at the end of a match or when disabled by the field controller.

In that case is there a way I can use the FRC firmware not on the cRio?

There appears to be a set of commands with trust appended to them. I tried useing these commands with FRC firmware 91 but no luck. Do I need to send the trusted heartbeat?

Bryant,
I would defer to David for any advice on those issues. Clearly, the Jag series of products is intended to have a wider customer base than FIRST.

You can only use FRC firmware with the cRIO and/or the FRC version of BDC-COMM.

Yes, a trusted heartbeat is necessary to keep Jags with FRC Firmware alive.

If this project isn’t intended for an FRC robot, I would recommend not using the FRC firmware. The source code for regular BDC-COMM and the non-FRC Jag firmware is in the firmware development package you have downloaded. Looking at the BDC-COMM source will help you understand what frames need to go out in order to control the Jaguar in various modes.

I am not sure what is going wrong when you switch to firmware version 91. More details would be nice. What does the Jaguar do when it works? What does it do when it doesn’t work? What do you expect it to do and how does it differ? Take note of LED states, motor actions, values read off of the Jaguar, etc.

I have tested version 91 myself using BDC-COMM and I have had no trouble setting up and using the various modes. Since you are using the 2CAN adapter I would try contacting someone from Cross the Road, they might be able to help with their own hardware.

USB to serial adapters are cheap and they work with BDC-COMM. If you happen to have a Vex programming cable laying around, the USB to serial cable works great. You just need to make sure you select the appropriate COM port (other than COM1) when using them.

-David

I figured out what the problem was.

The firmware I was loading wasn’t the proper one. sure it was in the directory but it didn’t function. Recompiled but first running the make clean then make and the firmware works properly