|
26 | 26 | #include <rclcpp/node.hpp>
|
27 | 27 | #include <rclcpp/time.hpp>
|
28 | 28 |
|
| 29 | +#include <limits> |
29 | 30 | #include <memory>
|
30 | 31 | #include <string>
|
31 | 32 | #include <unordered_map>
|
@@ -136,9 +137,15 @@ class AvoidanceModule : public SceneModuleInterface
|
136 | 137 | void removeCandidateRTCStatus()
|
137 | 138 | {
|
138 | 139 | if (rtc_interface_ptr_map_.at("left")->isRegistered(candidate_uuid_)) {
|
139 |
| - rtc_interface_ptr_map_.at("left")->removeCooperateStatus(candidate_uuid_); |
140 |
| - } else if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) { |
141 |
| - rtc_interface_ptr_map_.at("right")->removeCooperateStatus(candidate_uuid_); |
| 140 | + rtc_interface_ptr_map_.at("left")->updateCooperateStatus( |
| 141 | + candidate_uuid_, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 142 | + std::numeric_limits<double>::lowest(), clock_->now()); |
| 143 | + } |
| 144 | + |
| 145 | + if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) { |
| 146 | + rtc_interface_ptr_map_.at("right")->updateCooperateStatus( |
| 147 | + candidate_uuid_, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 148 | + std::numeric_limits<double>::lowest(), clock_->now()); |
142 | 149 | }
|
143 | 150 | }
|
144 | 151 |
|
@@ -360,10 +367,21 @@ class AvoidanceModule : public SceneModuleInterface
|
360 | 367 |
|
361 | 368 | unlockNewModuleLaunch();
|
362 | 369 |
|
| 370 | + for (const auto & left_shift : left_shift_array_) { |
| 371 | + rtc_interface_ptr_map_.at("left")->updateCooperateStatus( |
| 372 | + left_shift.uuid, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 373 | + std::numeric_limits<double>::lowest(), clock_->now()); |
| 374 | + } |
| 375 | + |
| 376 | + for (const auto & right_shift : right_shift_array_) { |
| 377 | + rtc_interface_ptr_map_.at("right")->updateCooperateStatus( |
| 378 | + right_shift.uuid, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 379 | + std::numeric_limits<double>::lowest(), clock_->now()); |
| 380 | + } |
| 381 | + |
363 | 382 | if (!path_shifter_.getShiftLines().empty()) {
|
364 | 383 | left_shift_array_.clear();
|
365 | 384 | right_shift_array_.clear();
|
366 |
| - removeRTCStatus(); |
367 | 385 | }
|
368 | 386 |
|
369 | 387 | generator_.reset();
|
|
0 commit comments