Generally, you don't want to communicate with your coprocessor via CAN, for a few reasons.
The Raspberry Pi doesn't natively support CAN, in fact, most processors don't. CAN is generally a pain to bit-bang, so you're going to want to use some extra circuitry to control and communicate with the CAN bus. This, combined with the lower speed and lower bandwidth, makes CAN less desirable over something more like ethernet.
If, however, you still want to pursue the project, you will have to use "HAL/CAN.h" header, or the "CANJNI.java" file. These contain the message sending, receiving and (for c++) the packing / unpacking of data.
CAN.h
https://github.com/wpilibsuite/allwp...lude/HAL/CAN.h
CANJNI.java
https://github.com/wpilibsuite/allwp...an/CANJNI.java