Skip to content

Commit de718c7

Browse files
authored
Merge pull request #141 from BCLab-UNM/hotfix-reset-manual-waypoints
Hotfix reset manual waypoints
2 parents 91d1cd6 + 35e5548 commit de718c7

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

src/behaviours/src/LogicController.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ void LogicController::SetModeAuto() {
374374
if(processState == PROCESS_STATE_MANUAL) {
375375
// only do something if we are in manual mode
376376
this->Reset();
377+
manualWaypointController.Reset();
377378
}
378379
}
379380
void LogicController::SetModeManual()

src/behaviours/src/ManualWaypointController.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ManualWaypointController::~ManualWaypointController() {}
99

1010
void ManualWaypointController::Reset() {
1111
waypoints.clear();
12+
num_waypoints = 0;
13+
cleared_waypoints.clear();
1214
}
1315

1416
bool ManualWaypointController::HasWork() {

src/rqt_rover_gui/src/MapData.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ void MapData::setAutonomousMode(string rover_name)
422422
{
423423
update_mutex.lock();
424424
rover_mode[rover_name] = 1;
425+
resetWaypointPathForSelectedRover(rover_name);
425426
update_mutex.unlock();
426427
}
427428

0 commit comments

Comments
 (0)