Run Jaguar's through PC

Hello, I got 2 Black Jags for Christmas for my personal robot project, is there any code out there to run the Jags via CAN Bust hat will run on the PC?

There’s a BDC-COMM program that you can download from TI and run on the PC to talk via CAN to the Jags.

Are you using the factory default firmware for the FIRST firmware? I guess the former otherwise you might already know about bdc-comm.

The CD with software for the Jaguar (non FIRST) can be downloaded here:

http://www.ti.com/tool/rdk-bdc24-cd

On it should be the stock version of bdc-comm which is a Windows application that lets you communicate over a serial connector to the Net/Serial connector of a Black Jaguar via adaptor. See the Getting Started Guide for more info.

is there a way to import these libraries into LabVIEW? What I’m going for is to make my laptop into a robot controller.

Can the WPIlib MotorControl functions in the FRC LabVIEW support the PC as a target?

*

MotorControl.png


MotorControl.png

I tried it but the C library it needs to run is missing, I don’t think my labview is installed correctly on this computer anyway

I highly doubt it. Those will very likely interact with libraries on the cRIO and/or the FPGA, making them impossible to run on a PC.

Worst case, the serial protocol and CAN protocol should be documented, so with some work you should be able to make your own library for it or find someone else’s.

As mentioned, the WPILib CAN VIs are customized for FRC and so is the Jag firmware. These customizations are largely for a safety heartbeat mechanism, but also take care of bridging the CAN traffic over either enet or serial.

Perhaps http://www.ti.com/lit/ug/spmu065b/spmu065b.pdf or www.luminarymicro.com/jaguar will be useful.

Greg McKaskle

While that is true, most of the code is reusable. If you use the non-first specific firmware, then all you need to do is change the “token” enable and set commands into the non-token ones, and then at the lowest level of the Jaguar API (which calls into FRC_NetworkCommunication_JaguarCANDriver_sendMessage and FRC_NetworkCommunication_JaguarCANDriver_receiveMessage), reimplement those with VISA serial VIs instead of calling into the library. The Black Jag serial bridge plugin will show you how to turn CAN frames into serial traffic that the black jag can understand.

It’s not exactly trivial, but it shouldn’t take much effort. All the needed info is available.

Good luck!
-Joe

I was wondering if I could just swap the can just swap that code with the VISA serial, I was afraid there was more to that C-RIO code then just sending serial data. I will go try this. I will let you know of any breakthroughs.

Also keep in mind that the PHYSICAL layer of a CAN Bus cannot be produced by a PC without some additional hardware. USB, Serial, Parallel, FireWire, etc all use different voltages from the Jaguar’s CAN implementation.

While that is true, the Black Jaguar also implements a standard RS-232 interface on the left RJ port. It can then be used to bridge to any other Jaguar on the CAN interface. This means with nothing more than a serial adapter cable (described in the Getting Started Guide), your PC can control Jaguars (from an electrical stand-point).

-Joe

There is more to it, but the differences are either described in my post above or are specific to the FIRST version of the firmware, which you should not use if controlling the Jags from your PC.

If you are using the 2CAN the Jaguars may be run using the Cross-link Control Software for Windows or uCANdrive for Android. Both are available as a free download, the RCS is open source. uCANDrive is also available on the Android Market.

The RCS installer is located under Downloads:

http://www.crosstheroadelectronics.com/Cross_link.html
http://www.crosstheroadelectronics.com/uCANDrive.html

… and CAN requires dominant logical 0 for collision detection and arbitration.

Oh. :o

do you know where i can get the documentation on how the data is sent to the Jag by RS232, i need to know things like how the data is organized. for example, in the LabVIEW code there is a input into the “FRC_Communication” that is the data size, is that sent over or is is used just for that program. If I can get that information I just might get that old wheelchair running autonomously

I wish I had much to add, but my guess would be to somehow reverse engineer the serial can structure in the FRC code.

either that, or PWM it. PWM control with boe bots was easy, (driving PWM wheel servos) as all you did was send pulse rates to a digital output (in hz IIRC), ranging from 6500 (full reverse) to 8500 (full forward), with 7500 being neutral (stop).

In fact, IIRC, the original IFI controllers used the same BASIC STAMP controller as boe bots…

for that matter, if you knew C (like I will after the next few months), you could obtain a second hand later generation IFI controller and drive them that way.

From my previous work with networking, the easiest way for me would just be just to use wireshark and reverse engineer the packets being sent. Since CAN is just networking it should be pretty simple. The only thing I could for-see holding you back would be the packets being encrypted.

Try looking at the source to the black jag bridge plugin like I originally suggested.

http://firstforge.wpi.edu/integration/viewcvs/viewcvs.cgi/Driver%20Plugins/BlackJagBridgePlugin/?root=canjaguar&system=exsy1002

It implements the serial protocol you need.

Joe