Go to Post What can you do? The more time you waste here speculating the less time you have to work on the robot. Go! Build Robots! Now! - Jessica Boucher [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 22 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 22-02-2011, 07:38
ksanger's Avatar
ksanger ksanger is offline
Registered User
FRC #0211 (MaK)
 
Join Date: Mar 2010
Rookie Year: 2010
Location: Rochester NY
Posts: 62
ksanger is on a distinguished road
Java CANJaguar PID Issues

We are trying to do position control with a CANJaguar and a potentiometer. If we enable the motor with PID control, and try to set the PIDs to 0.0, 0.0, 0.0, they don't change. A .getP() returns the last higher value etc.

More problematic, if we setup and enable the PID loop in init(), then select teleop or autonomous and enable then the motor will move. Always. If we do not enable the motor in init(), don't define it yet, but do so in teleop, then the motor does not move the first time. But if we disable, then reenable teleop the motor moves. Similarly if we then go to auto the motor moves. Since we want to enable and use the position control in auto, we run the risk of the motors moving when we go from auto to teleop.

We have not found a method to disable the motor once initialized such that we may go into teleop or autonomous without the motor moving. Its as if enabling teleop or auto gives the motor an enable which starts it moving prior to the PID loop taking over.

Disabling (.disable() ) the motor doesn't work as the motor moves when we enable. We have also tried .enable(initialPosition).

Setting the PID values to 0.0, 0.0, 0.0, doesn't take. We print them out and they didn't change. No error generated. The CANJaguar appears to like our initial settings so much it won't let us overwrite them with zeros. Must think we don't know what we're doing.

Any help or ideas would be appreciated. Thanks.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi