Skip to content

Commit

Permalink
fix initializing state handling
Browse files Browse the repository at this point in the history
Signed-off-by: Takagi, Isamu <[email protected]>
  • Loading branch information
isamu-takagi committed Feb 20, 2024
1 parent 781b63a commit b6c37aa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions system/default_ad_api/src/routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ void RoutingNode::on_operation_mode(const OperationModeState::Message::ConstShar

void RoutingNode::on_state(const State::Message::ConstSharedPtr msg)
{
state_ = *msg;

// TODO(Takagi, Isamu): Add adapi initializing state.
if (State::Message::INITIALIZING) {
pub_state_->publish(conversion::convert_state(*msg));
// Represent initializing state by not publishing the topic for now.
if (msg->state == State::Message::INITIALIZING) {
return;
}

state_ = *msg;
pub_state_->publish(conversion::convert_state(*msg));

// Change operation mode to stop when the vehicle arrives.
if (msg->state == State::Message::ARRIVED) {
change_stop_mode();
Expand Down

0 comments on commit b6c37aa

Please sign in to comment.