Our Logomotion robot's drivetrain is controlled by four Jaguars - two master Jaguars and two slave Jaguars on each side. They are Black Jaguars connected by CAN, with speed PID control. We had synchronized the masters and slaves with voltage mode in the past, but we read somewhere that using current mode shares the work load more efficiently. So while using that robot to test some new code, we tried using current mode and found problems with both the getter and setter current methods.
Code:
...
jagLeftMaster.changeControlMode(CANJaguar.ControlMode.kPercentVBus);
jagRightMaster.changeControlMode(CANJaguar.ControlMode.kPercentVBus);
jagLeftMaster.changeControlMode(CANJaguar.ControlMode.kCurrent);
jagRightMaster.changeControlMode(CANJaguar.ControlMode.kCurrent);
...
jagLeftMaster.getOutputCurrent(); //both of these only return the absolute value of the current
jagRightMaster.getOutputCurrent();
...
jagLeftSlave.setX(jagLeftMaster.getOutputCurrent());
jagRightSlave.setX(jagRightMaster.getOutputCurrent()); //these don't appear to do anything at all
The getOutputCurrent method only returns the absolute value. The number itself looks accurate but is only ever positive.
The setX() method while in Current mode isn't appearing to do anything. The LED on the Jaguar is solid amber - it is communicating via CAN but is not receiving instructions.
Has anybody had these problems before and/or know what the problem is?
Thanks in advance.