Skip to content

Commit 12bf192

Browse files
rej55shmpwk
authored andcommitted
feat(behavior_path_planner_common): update RTC state to SUCCEEDED (autowarefoundation#7119)
Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com>
1 parent 4ecfb64 commit 12bf192

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

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

+16
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
#include <algorithm>
4848
#include <any>
49+
#include <limits>
4950
#include <memory>
5051
#include <string>
5152
#include <unordered_map>
@@ -184,6 +185,10 @@ class SceneModuleInterface
184185
{
185186
RCLCPP_DEBUG(getLogger(), "%s %s", name_.c_str(), __func__);
186187

188+
if (getCurrentStatus() == ModuleStatus::SUCCESS) {
189+
updateRTCStatusForSuccess();
190+
}
191+
187192
clearWaitingApproval();
188193
removeRTCStatus();
189194
publishRTCStatus();
@@ -510,6 +515,17 @@ class SceneModuleInterface
510515
}
511516
}
512517

518+
void updateRTCStatusForSuccess()
519+
{
520+
for (const auto & [module_name, ptr] : rtc_interface_ptr_map_) {
521+
if (ptr) {
522+
ptr->updateCooperateStatus(
523+
uuid_map_.at(module_name), true, State::SUCCEEDED, std::numeric_limits<double>::lowest(),
524+
std::numeric_limits<double>::lowest(), clock_->now());
525+
}
526+
}
527+
}
528+
513529
void setObjectsOfInterestData(
514530
const geometry_msgs::msg::Pose & obj_pose,
515531
const autoware_auto_perception_msgs::msg::Shape & obj_shape, const ColorName & color_name)

0 commit comments

Comments
 (0)