Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   RobotDrive + PIDController = possible? (http://www.chiefdelphi.com/forums/showthread.php?t=80033)

oddjob 12-01-2010 16:38

RobotDrive + PIDController = possible?
 
Is it possible to use the RobotDrive class and the PIDController class together so that each drive wheel has PID control?

Phoenix Spud 13-01-2010 04:15

Re: RobotDrive + PIDController = possible?
 
Last year, my team (2342) used a PID controller to control the steering of our wheels. From my knowledge of a PID controller, I imagine you could, but I am not sure why you would want to. Can you please explain? Have you considered an Alpha-Beta filter?

oddjob 13-01-2010 12:08

Re: RobotDrive + PIDController = possible?
 
PID's are a great way to exert control over motors. The drive wheels are driven by motors. Put the two together.....

Specifically, with friction losses and gearbox/pwm/motor variability, low speed robot movement could be enhanced if the drive wheel motors have software PID control. We usually do that by writing our own drive software, but if it can be done with existing libraries, why reinvent the wheel (ha ha).

BradAMiller 14-01-2010 16:26

Re: RobotDrive + PIDController = possible?
 
Quote:

Originally Posted by oddjob (Post 897606)
Is it possible to use the RobotDrive class and the PIDController class together so that each drive wheel has PID control?

The PID class requires you to supply a PIDOutput object that actually sets the values. By default the standard motor objects like Jaguar and Victor are already PIDOutput objects. But you can create your own PIDOutput object that works with the PID class and control either the turn rate or the forward speed.

You can see an example of how to do that by looking at the 2010 Image Demo in the list of example programs with the 2010 update. Look at the MyRobot.cpp file and find the SamplePIDOutput class. It's pretty easy to do. The sample program uses the output of the PID loop to control the turn direction of the robot to keep the target centered in the camera field of view.

oddjob 14-01-2010 23:33

Re: RobotDrive + PIDController = possible?
 
Thanks. I'll give it a try.


Quote:

Originally Posted by BradAMiller (Post 899138)
Look at the MyRobot.cpp file and find the SamplePIDOutput class. It's pretty easy to do.



All times are GMT -5. The time now is 11:59.

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