Skip to content

Commit 0ea19d9

Browse files
authored
fix(bpp): keep publishing rtc cooperate status (autowarefoundation#6953)
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent de66bf6 commit 0ea19d9

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

planning/behavior_path_planner_common/include/behavior_path_planner_common/interface/scene_module_interface.hpp

-13
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ class SceneModuleInterface
186186

187187
clearWaitingApproval();
188188
removeRTCStatus();
189-
publishRTCStatus();
190189
unlockNewModuleLaunch();
191190
unlockOutputPath();
192191
steering_factor_interface_ptr_->clearSteeringFactors();
@@ -196,18 +195,6 @@ class SceneModuleInterface
196195
processOnExit();
197196
}
198197

199-
/**
200-
* @brief Publish status if the module is requested to run
201-
*/
202-
void publishRTCStatus()
203-
{
204-
for (const auto & [module_name, ptr] : rtc_interface_ptr_map_) {
205-
if (ptr) {
206-
ptr->publishCooperateStatus(clock_->now());
207-
}
208-
}
209-
}
210-
211198
void publishObjectsOfInterestMarker()
212199
{
213200
for (const auto & [module_name, ptr] : objects_of_interest_marker_interface_ptr_map_) {

planning/behavior_path_planner_common/include/behavior_path_planner_common/interface/scene_module_manager_interface.hpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ class SceneModuleManagerInterface
9999
observers_.erase(itr, observers_.end());
100100
}
101101

102+
void publishRTCStatus()
103+
{
104+
for (const auto & [module_name, ptr] : rtc_interface_ptr_map_) {
105+
if (ptr) {
106+
ptr->publishCooperateStatus(rclcpp::Clock(RCL_ROS_TIME).now());
107+
}
108+
}
109+
}
110+
102111
void publishVirtualWall() const
103112
{
104113
using tier4_autoware_utils::appendMarkerArray;
@@ -235,15 +244,13 @@ class SceneModuleManagerInterface
235244
std::for_each(observers_.begin(), observers_.end(), [](const auto & observer) {
236245
if (!observer.expired()) {
237246
observer.lock()->onExit();
238-
observer.lock()->publishRTCStatus();
239247
}
240248
});
241249

242250
observers_.clear();
243251

244252
if (idle_module_ptr_ != nullptr) {
245253
idle_module_ptr_->onExit();
246-
idle_module_ptr_->publishRTCStatus();
247254
idle_module_ptr_.reset();
248255
}
249256

0 commit comments

Comments
 (0)