Skip to content

Commit

Permalink
feat(behavior_path_planner_common): update RTC state to SUCCEEDED (#7119
Browse files Browse the repository at this point in the history
)

Signed-off-by: Fumiya Watanabe <[email protected]>
  • Loading branch information
rej55 authored May 27, 2024
1 parent 49f91a2 commit 92b5114
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

#include <algorithm>
#include <any>
#include <limits>
#include <memory>
#include <string>
#include <unordered_map>
Expand Down Expand Up @@ -186,6 +187,10 @@ class SceneModuleInterface
{
RCLCPP_DEBUG(getLogger(), "%s %s", name_.c_str(), __func__);

if (getCurrentStatus() == ModuleStatus::SUCCESS) {
updateRTCStatusForSuccess();
}

clearWaitingApproval();
unlockNewModuleLaunch();
unlockOutputPath();
Expand Down Expand Up @@ -499,6 +504,17 @@ class SceneModuleInterface
}
}

void updateRTCStatusForSuccess()
{
for (const auto & [module_name, ptr] : rtc_interface_ptr_map_) {
if (ptr) {
ptr->updateCooperateStatus(
uuid_map_.at(module_name), true, State::SUCCEEDED, std::numeric_limits<double>::lowest(),
std::numeric_limits<double>::lowest(), clock_->now());
}
}
}

void setObjectsOfInterestData(
const geometry_msgs::msg::Pose & obj_pose,
const autoware_auto_perception_msgs::msg::Shape & obj_shape, const ColorName & color_name)
Expand Down

0 comments on commit 92b5114

Please sign in to comment.