I am trying to make a Robot Operating System (ROS) node for controlling a Talon SRX.
My plan is to take the CanTalonSRX code from wpilib and write a custom CAN driver to replace the CAN driver the roborio uses. I will be using an Arduino with a CAN shield as a serial to CAN bridge.
Currently, I have debugging code in the CAN driver that prints out what the CanTalonSRX driver is trying to send over the CAN bus.
When I run:
CanTalonSRX motor(0);
motor.Set(.1);
it tries to send the following to the CAN bus:
33816576 0 0 0 0 0 0 0 0
33816576 0 0 0 0 102 32 0 0
The first digit is the ID field of the frame and the next 8 numbers are in the data field.
The first line is sent when the CanTalonSRX object is constructed and the second line is sent by motor.Set(.1).
I used the arduino to send [0 0 0 0 102 32 0 0] continuously as a test to see if I could get the motor spinning.
Needless to say, it did not spin. The lights on the Talon SRX are alternating flashing orange though.
Does anyone know the exact CAN frames a Talon SRX is looking for? The user manual and the software reference manual have no documentation of the exact bytes that are being sent in the CAN frames.