Skip to content

Commit 0db8492

Browse files
author
jschlind411
committed
fixed value in LogicController to allow values for obstacle detection
1 parent 1e968a9 commit 0db8492

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/abridge/src/abridge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void driveCommandHandler(const geometry_msgs::Twist::ConstPtr& message) {
163163

164164
// Cap motor commands at 120. Experimentally determined that high values (tested 180 and 255) can cause
165165
// the hardware to fail when the robot moves itself too violently.
166-
int max_motor_cmd = 255;
166+
int max_motor_cmd = 180;
167167

168168
if (currentMode == 1)
169169
{

src/behaviours/src/LogicController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void LogicController::ProcessData() {
191191
if (processState == PROCCESS_STATE_SEARCHING) {
192192
prioritizedControllers = {
193193
PrioritizedController{0, (Controller*)(&searchController)},
194-
PrioritizedController{-1, (Controller*)(&obstacleController)},
194+
PrioritizedController{10, (Controller*)(&obstacleController)},
195195
PrioritizedController{15, (Controller*)(&pickUpController)},
196196
PrioritizedController{5, (Controller*)(&range_controller)},
197197
PrioritizedController{-1, (Controller*)(&dropOffController)}

src/behaviours/src/SearchController.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ Result SearchController::DoWork() {
3939
}
4040
return result;
4141
}
42-
else if (attemptCount >= 5 || attemptCount == 0) {
42+
else if (attemptCount >= 5 || attemptCount == 0)
43+
{
4344
attemptCount = 1;
4445

4546

@@ -66,7 +67,7 @@ Result SearchController::DoWork() {
6667
result.wpts.waypoints.insert(result.wpts.waypoints.begin(), searchLocation);
6768

6869
return result;
69-
//}
70+
}
7071

7172
}
7273

0 commit comments

Comments
 (0)