@@ -137,10 +137,21 @@ class AvoidanceModule : public SceneModuleInterface
137
137
*/
138
138
void removeCandidateRTCStatus ()
139
139
{
140
+ // 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_);
144
+ // }
140
145
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_);
146
+ rtc_interface_ptr_map_.at (" left" )->updateCooperateStatus (
147
+ candidate_uuid_, true , State::FAILED, std::numeric_limits<double >::min (),
148
+ std::numeric_limits<double >::max (), clock_->now ());
149
+ }
150
+
151
+ if (rtc_interface_ptr_map_.at (" right" )->isRegistered (candidate_uuid_)) {
152
+ rtc_interface_ptr_map_.at (" right" )->updateCooperateStatus (
153
+ candidate_uuid_, true , State::FAILED, std::numeric_limits<double >::min (),
154
+ std::numeric_limits<double >::max (), clock_->now ());
144
155
}
145
156
}
146
157
@@ -362,6 +373,18 @@ class AvoidanceModule : public SceneModuleInterface
362
373
363
374
unlockNewModuleLaunch ();
364
375
376
+ for (const auto & left_shift : left_shift_array_) {
377
+ rtc_interface_ptr_map_.at (" left" )->updateCooperateStatus (
378
+ left_shift.uuid , true , State::FAILED, std::numeric_limits<double >::min (),
379
+ std::numeric_limits<double >::max (), clock_->now ());
380
+ }
381
+
382
+ for (const auto & right_shift : right_shift_array_) {
383
+ rtc_interface_ptr_map_.at (" right" )->updateCooperateStatus (
384
+ right_shift.uuid , true , State::FAILED, std::numeric_limits<double >::min (),
385
+ std::numeric_limits<double >::max (), clock_->now ());
386
+ }
387
+
365
388
if (!path_shifter_.getShiftLines ().empty ()) {
366
389
left_shift_array_.clear ();
367
390
right_shift_array_.clear ();
0 commit comments