diff --git a/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.cpp b/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.cpp index 3ca368a3..e6036672 100644 --- a/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.cpp +++ b/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.cpp @@ -97,6 +97,7 @@ void AutowareAutomaticGoalSender::onOperationMode(const OperationModeState::Cons state_ = State::STOPPED; else if (msg->mode == OperationModeState::AUTONOMOUS && state_ == State::STARTING) state_ = State::STARTED; + is_autonomous_mode_available_ = msg->is_autonomous_mode_available; onOperationModeUpdated(msg); } @@ -131,7 +132,8 @@ void AutowareAutomaticGoalSender::updateAutoExecutionTimerTick() RCLCPP_INFO_STREAM(get_logger(), goal << ": Goal set as the next. Planning in progress..."); if (callPlanToGoalIndex(cli_set_route_, current_goal_)) state_ = State::PLANNING; - } else if (state_ == State::PLANNED) { // start plan to next goal + } else if (state_ == State::PLANNED && is_autonomous_mode_available_) { // start plan to next + // goal RCLCPP_INFO_STREAM(get_logger(), goal << ": Route has been planned. Route starting..."); if (callService(cli_change_to_autonomous_)) state_ = State::STARTING; diff --git a/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.hpp b/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.hpp index 88b7b5e7..f21db670 100644 --- a/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.hpp +++ b/common/tier4_automatic_goal_rviz_plugin/src/automatic_goal_sender.hpp @@ -168,6 +168,7 @@ class AutowareAutomaticGoalSender : public rclcpp::Node std::vector goals_list_{}; std::map> goals_achieved_{}; std::string goals_achieved_file_path_{}; + bool is_autonomous_mode_available_{false}; private: void loadParams(rclcpp::Node * node);