Skip to content

Commit 1e968a9

Browse files
author
jschlind411
committed
removed tuning code and cout statements from master code
1 parent 37043b3 commit 1e968a9

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

src/behaviours/src/DriveController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void DriveController::ProcessData()
220220

221221
void DriveController::fastPID(float errorVel, float errorYaw , float setPointVel, float setPointYaw) {
222222

223-
float velOut = 0;//fastVelPID.PIDOut(errorVel, setPointVel);
223+
float velOut = fastVelPID.PIDOut(errorVel, setPointVel);
224224
float yawOut = fastYawPID.PIDOut(errorYaw, setPointYaw);
225225

226226
int left = velOut - yawOut;
@@ -238,7 +238,7 @@ void DriveController::fastPID(float errorVel, float errorYaw , float setPointVel
238238

239239
void DriveController::slowPID(float errorVel,float errorYaw, float setPointVel, float setPointYaw) {
240240

241-
float velOut = 0;//slowVelPID.PIDOut(errorVel, setPointVel);
241+
float velOut = slowVelPID.PIDOut(errorVel, setPointVel);
242242
float yawOut = slowYawPID.PIDOut(errorYaw, setPointYaw);
243243

244244
int left = velOut - yawOut;

src/behaviours/src/LogicController.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,10 @@ Result LogicController::DoWork() {
154154
//used for precision driving pass through
155155
case LOGIC_STATE_PRECISION_COMMAND: {
156156

157-
// cout << "I MADE IT HERE!" << endl;
158-
159157
//unlike waypoints precision commands change every update tick so we ask the
160158
//controller for new commands on every update tick.
161159
result = control_queue.top().controller->DoWork();
162160

163-
// cout << result.pd.cmdAngularError;
164-
165161
//pass the driving commands to the drive controller so it can interpret them
166162
driveController.SetResultData(result);
167163

src/behaviours/src/PID.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ float PID::PIDOut(float calculatedError, float setPoint) {
123123

124124
float PIDOut = P + I + D + FF;
125125

126-
cout << "PID: " << "P:" << P << " I:" << I << " D:" << D << endl;
127126
if (PIDOut > config.satUpper) //cap vel command
128127
{
129128
PIDOut = config.satUpper;

src/behaviours/src/SearchController.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ void SearchController::Reset() {
2525
*/
2626
Result SearchController::DoWork() {
2727

28-
result.type = precisionDriving;
29-
result.pd.cmdAngularError = angles::shortest_angular_distance(currentLocation.theta, 0);
30-
result.pd.cmdVel = 0;
31-
result.PIDMode = SLOW_PID;
32-
33-
cout << "PID: " << result.pd.cmdAngularError << endl;
34-
35-
/* if (!result.wpts.waypoints.empty()) {
28+
if (!result.wpts.waypoints.empty()) {
3629
if (hypot(result.wpts.waypoints[0].x-currentLocation.x, result.wpts.waypoints[0].y-currentLocation.y) < 0.10) {
3730
attemptCount = 0;
3831
}
@@ -71,7 +64,7 @@ Result SearchController::DoWork() {
7164

7265
result.wpts.waypoints.clear();
7366
result.wpts.waypoints.insert(result.wpts.waypoints.begin(), searchLocation);
74-
*/
67+
7568
return result;
7669
//}
7770

0 commit comments

Comments
 (0)