a240
09-02-2012, 22:44
Hello,
I've been trying to use the CANJaguar class with PID control, but due to a lack of examples and documentation it has been a lot of guess and check work. I have successfully created a CANJaguar object and correctly configured it to the point where I could get encoder feed back. However I have run into a bit of trouble trying to use PID Control with the robot.
Here is some sample test code I created for a CANJaguar based driveTrain: http://code.google.com/p/iraiders-frc-2713/source/browse/trunk/2012/test/CANTest/src/com/iraiders/subsystems/CANDriveTrain.java
My problem is that even after setting a setpoint value using setX(x), the driveTrain wheel fail to move. Testing shows that the method getX() returns a value of zero. What's wrong? If anyone knows anything about the topic any information would be very helpful.
I've been trying to use the CANJaguar class with PID control, but due to a lack of examples and documentation it has been a lot of guess and check work. I have successfully created a CANJaguar object and correctly configured it to the point where I could get encoder feed back. However I have run into a bit of trouble trying to use PID Control with the robot.
Here is some sample test code I created for a CANJaguar based driveTrain: http://code.google.com/p/iraiders-frc-2713/source/browse/trunk/2012/test/CANTest/src/com/iraiders/subsystems/CANDriveTrain.java
My problem is that even after setting a setpoint value using setX(x), the driveTrain wheel fail to move. Testing shows that the method getX() returns a value of zero. What's wrong? If anyone knows anything about the topic any information would be very helpful.