View Single Post
  #1   Spotlight this post!  
Unread 27-01-2017, 19:19
thecoopster20 thecoopster20 is offline
4th Year Programmer - Java
FRC #3602 (Robomos)
Team Role: Programmer
 
Join Date: Mar 2016
Rookie Year: 2014
Location: Escanaba, MI
Posts: 27
thecoopster20 is an unknown quantity at this point
Multiple Sensor PID Loops

I'm relatively new to programming robots in Java and am looking for some pointers on how to accomplish the following.

Our team wants to be able to do a few PID controlled tasks, mostly with the drive system. We are using a command based structure for our code. Essentially we want to be able to use a few different sensors for a few different tasks, they are as follows:

-Average encoders to drive straight and drive for a certain distance
-Use two ultrasonic sensors to turn the robot until its relatively parallel to a surface as well as drive until we are a certain distance away from a surface
-Utilize vision to turn towards a target

Now, the solutions I've seen so far here on CD are varied. One idea I saw was to create multiple PID loops within the drive subsystem. Another idea was to create separate dummy subsystems specifically for each PID task. I'm not quite sure what the best way to approach this problem is.
Reply With Quote