@@ -148,10 +148,21 @@ class AvoidanceModule : public SceneModuleInterface
148
148
*/
149
149
void removeCandidateRTCStatus ()
150
150
{
151
+ // if (rtc_interface_ptr_map_.at("left")->isRegistered(candidate_uuid_)) {
152
+ // rtc_interface_ptr_map_.at("left")->removeCooperateStatus(candidate_uuid_);
153
+ // } else if (rtc_interface_ptr_map_.at("right")->isRegistered(candidate_uuid_)) {
154
+ // rtc_interface_ptr_map_.at("right")->removeCooperateStatus(candidate_uuid_);
155
+ // }
151
156
if (rtc_interface_ptr_map_.at (" left" )->isRegistered (candidate_uuid_)) {
152
- rtc_interface_ptr_map_.at (" left" )->removeCooperateStatus (candidate_uuid_);
153
- } else if (rtc_interface_ptr_map_.at (" right" )->isRegistered (candidate_uuid_)) {
154
- rtc_interface_ptr_map_.at (" right" )->removeCooperateStatus (candidate_uuid_);
157
+ rtc_interface_ptr_map_.at (" left" )->updateCooperateStatus (
158
+ candidate_uuid_, true , State::FAILED, std::numeric_limits<double >::min (),
159
+ std::numeric_limits<double >::max (), clock_->now ());
160
+ }
161
+
162
+ if (rtc_interface_ptr_map_.at (" right" )->isRegistered (candidate_uuid_)) {
163
+ rtc_interface_ptr_map_.at (" right" )->updateCooperateStatus (
164
+ candidate_uuid_, true , State::FAILED, std::numeric_limits<double >::min (),
165
+ std::numeric_limits<double >::max (), clock_->now ());
155
166
}
156
167
}
157
168
@@ -373,6 +384,18 @@ class AvoidanceModule : public SceneModuleInterface
373
384
374
385
unlockNewModuleLaunch ();
375
386
387
+ for (const auto & left_shift : left_shift_array_) {
388
+ rtc_interface_ptr_map_.at (" left" )->updateCooperateStatus (
389
+ left_shift.uuid , true , State::FAILED, std::numeric_limits<double >::min (),
390
+ std::numeric_limits<double >::max (), clock_->now ());
391
+ }
392
+
393
+ for (const auto & right_shift : right_shift_array_) {
394
+ rtc_interface_ptr_map_.at (" right" )->updateCooperateStatus (
395
+ right_shift.uuid , true , State::FAILED, std::numeric_limits<double >::min (),
396
+ std::numeric_limits<double >::max (), clock_->now ());
397
+ }
398
+
376
399
if (!path_shifter_.getShiftLines ().empty ()) {
377
400
left_shift_array_.clear ();
378
401
right_shift_array_.clear ();
0 commit comments