|
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>
|
@@ -138,9 +139,15 @@ class AvoidanceModule : public SceneModuleInterface
|
138 | 139 | void removeCandidateRTCStatus()
|
139 | 140 | {
|
140 | 141 | if (rtc_interface_ptr_map_.at("left")->isRegistered(candidate_uuid_)) {
|
141 |
| - rtc_interface_ptr_map_.at("left")->removeCooperateStatus(candidate_uuid_); |
142 |
| - } else if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) { |
143 |
| - rtc_interface_ptr_map_.at("right")->removeCooperateStatus(candidate_uuid_); |
| 142 | + rtc_interface_ptr_map_.at("left")->updateCooperateStatus( |
| 143 | + candidate_uuid_, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 144 | + std::numeric_limits<double>::lowest(), clock_->now()); |
| 145 | + } |
| 146 | + |
| 147 | + if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) { |
| 148 | + rtc_interface_ptr_map_.at("right")->updateCooperateStatus( |
| 149 | + candidate_uuid_, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 150 | + std::numeric_limits<double>::lowest(), clock_->now()); |
144 | 151 | }
|
145 | 152 | }
|
146 | 153 |
|
@@ -362,10 +369,21 @@ class AvoidanceModule : public SceneModuleInterface
|
362 | 369 |
|
363 | 370 | unlockNewModuleLaunch();
|
364 | 371 |
|
| 372 | + for (const auto & left_shift : left_shift_array_) { |
| 373 | + rtc_interface_ptr_map_.at("left")->updateCooperateStatus( |
| 374 | + left_shift.uuid, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 375 | + std::numeric_limits<double>::lowest(), clock_->now()); |
| 376 | + } |
| 377 | + |
| 378 | + for (const auto & right_shift : right_shift_array_) { |
| 379 | + rtc_interface_ptr_map_.at("right")->updateCooperateStatus( |
| 380 | + right_shift.uuid, true, State::FAILED, std::numeric_limits<double>::lowest(), |
| 381 | + std::numeric_limits<double>::lowest(), clock_->now()); |
| 382 | + } |
| 383 | + |
365 | 384 | if (!path_shifter_.getShiftLines().empty()) {
|
366 | 385 | left_shift_array_.clear();
|
367 | 386 | right_shift_array_.clear();
|
368 |
| - removeRTCStatus(); |
369 | 387 | }
|
370 | 388 |
|
371 | 389 | generator_.reset();
|
|
0 commit comments