Skip to content

Commit b6c37aa

Browse files
committedFeb 20, 2024
fix initializing state handling
Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>
1 parent 781b63a commit b6c37aa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎system/default_ad_api/src/routing.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@ void RoutingNode::on_operation_mode(const OperationModeState::Message::ConstShar
8989

9090
void RoutingNode::on_state(const State::Message::ConstSharedPtr msg)
9191
{
92-
state_ = *msg;
93-
9492
// TODO(Takagi, Isamu): Add adapi initializing state.
95-
if (State::Message::INITIALIZING) {
96-
pub_state_->publish(conversion::convert_state(*msg));
93+
// Represent initializing state by not publishing the topic for now.
94+
if (msg->state == State::Message::INITIALIZING) {
95+
return;
9796
}
9897

98+
state_ = *msg;
99+
pub_state_->publish(conversion::convert_state(*msg));
100+
99101
// Change operation mode to stop when the vehicle arrives.
100102
if (msg->state == State::Message::ARRIVED) {
101103
change_stop_mode();

0 commit comments

Comments
 (0)