34 if(signal == Signal::INITIALIZED) {
38 case State::DRIVERS_READY:
39 if(signal == Signal::ACTIVATED)
45 if(signal == Signal::ENGAGE)
57 }
else if(signal == Signal::OVERRIDE)
60 }
else if(signal == Signal::PARK)
66 if(signal == Signal::ACTIVATED)
69 }
else if(signal == Signal::INITIALIZED){
73 case State::ENTER_PARK:
74 if(signal == Signal::OVERRIDE)
94 if(msg->current_gear.gear== autoware_msgs::msg::Gear::PARK)
143 if(msg->event == carma_planning_msgs::msg::RouteEvent::ROUTE_DEPARTED ||
144 msg->event == carma_planning_msgs::msg::RouteEvent::ROUTE_ABORTED) {
147 else if(msg->event == carma_planning_msgs::msg::RouteEvent::ROUTE_COMPLETED){
151 RCLCPP_WARN_STREAM(
logger_->get_logger(),
"Vehicle failed to park on route completion because current velocity was " <<
current_velocity_);
void onGuidanceShutdown()
Updates Guidance State Machine with SHUTDOWN signal.
void onRoboticStatus(carma_driver_msgs::msg::RobotEnabled::UniquePtr msg)
Handle robotic_status message from ROS network.
uint8_t getCurrentState()
Get current state machine status.
void onVehicleStatus(autoware_msgs::msg::VehicleStatus::UniquePtr msg)
Handle vehicle status message from ROS network.
bool robotic_active_status_
void onRouteEvent(carma_planning_msgs::msg::RouteEvent::UniquePtr msg)
Handle route event message.
bool called_robotic_engage_in_active_
void onGuidanceInitialized()
Updates Guidance State Machine with INITIALIZED signal.
bool shouldCallSetEnableRobotic()
Indicate if SetEnableRobotic needs to be called in ACTIVE state.
State current_guidance_state_
void onGuidanceSignal(Signal signal)
Actual state machine logic driven by signal enum.
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger_
GuidanceStateMachine(rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger)
constructor for GuidanceStateMachine
void onSetGuidanceActive(bool msg)
Handle set_guidance_active service call from ROS network.