Autoware.Auto
autoware::drivers::vehicle_interface::VehicleInterfaceNode Class Reference

#include <vehicle_interface_node.hpp>

Inheritance diagram for autoware::drivers::vehicle_interface::VehicleInterfaceNode:
Collaboration diagram for autoware::drivers::vehicle_interface::VehicleInterfaceNode:

Classes

struct  VehicleFilter
 

Public Member Functions

 VehicleInterfaceNode (const std::string &node_name, const std::unordered_set< ViFeature > &features, const rclcpp::NodeOptions &options)
 
template<>
void on_command_message (const autoware_auto_vehicle_msgs::msg::RawControlCommand &msg)
 
template<>
void on_command_message (const autoware_auto_control_msgs::msg::AckermannControlCommand &msg)
 
template<>
void on_command_message (const autoware_auto_vehicle_msgs::msg::VehicleControlCommand &msg)
 
template<>
void on_command_message (const autoware_auto_control_msgs::msg::HighLevelControlCommand &msg)
 

Protected Types

using ControllerBasePtr = std::unique_ptr< common::reference_tracking_controller::ReferenceTrackerBase< Real > >
 
using FilterBasePtr = std::unique_ptr< common::signal_filters::FilterBase< Real > >
 
using ModeChangeRequest = autoware_auto_vehicle_msgs::srv::AutonomyModeChange_Request
 
using ModeChangeResponse = autoware_auto_vehicle_msgs::srv::AutonomyModeChange_Response
 

Protected Member Functions

void set_filter (VehicleFilter &&filter) noexcept
 Set the low pass filter. More...
 
void set_reference_tracker (ControllerBasePtr &&controller) noexcept
 Set the reference tracker (controller) More...
 
void set_interface (std::unique_ptr< PlatformInterface > &&interface) noexcept
 Set the vehicle-specific PlatformInterface. More...
 
rclcpp::Logger logger () const noexcept
 Get access to logger. More...
 
const SafetyStateMachine get_state_machine () const noexcept
 Get access to Safety State Machine. More...
 
virtual void on_control_send_failure ()
 
virtual void on_state_send_failure ()
 
virtual void on_mode_change_failure ()
 
virtual void on_read_timeout ()
 
virtual void on_error (std::exception_ptr eptr)
 Handle exception thrown in main loop. Default behavior is to set NodeState to ERROR. More...
 

Detailed Description

A node which receives commands and sends them to the vehicle platform, and publishes reports from the vehicle platform

Member Typedef Documentation

◆ ControllerBasePtr

◆ FilterBasePtr

◆ ModeChangeRequest

using autoware::drivers::vehicle_interface::VehicleInterfaceNode::ModeChangeRequest = autoware_auto_vehicle_msgs::srv::AutonomyModeChange_Request
protected

◆ ModeChangeResponse

using autoware::drivers::vehicle_interface::VehicleInterfaceNode::ModeChangeResponse = autoware_auto_vehicle_msgs::srv::AutonomyModeChange_Response
protected

Constructor & Destructor Documentation

◆ VehicleInterfaceNode()

autoware::drivers::vehicle_interface::VehicleInterfaceNode::VehicleInterfaceNode ( const std::string &  node_name,
const std::unordered_set< ViFeature > &  features,
const rclcpp::NodeOptions &  options 
)

ROS 2 parameter constructor

Parameters
[in]node_nameThe name for the node
[in]featuresVector of features supported by this vehicle interface
[in]optionsAn rclcpp::NodeOptions object

Member Function Documentation

◆ get_state_machine()

const SafetyStateMachine autoware::drivers::vehicle_interface::VehicleInterfaceNode::get_state_machine ( ) const
protectednoexcept

Get access to Safety State Machine.

◆ logger()

rclcpp::Logger autoware::drivers::vehicle_interface::VehicleInterfaceNode::logger ( ) const
protectednoexcept

Get access to logger.

◆ on_command_message() [1/4]

template<>
void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_command_message ( const autoware_auto_control_msgs::msg::AckermannControlCommand &  msg)

◆ on_command_message() [2/4]

template<>
void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_command_message ( const autoware_auto_control_msgs::msg::HighLevelControlCommand &  msg)

◆ on_command_message() [3/4]

template<>
void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_command_message ( const autoware_auto_vehicle_msgs::msg::RawControlCommand &  msg)

◆ on_command_message() [4/4]

template<>
void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_command_message ( const autoware_auto_vehicle_msgs::msg::VehicleControlCommand &  msg)

◆ on_control_send_failure()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_control_send_failure ( )
protectedvirtual

Error handling behavior for when sending a control command has failed, default is throwing an exception, which is caught and turned into a change in the NodeState to ERROR TODO(c.ho) add command which failed to send as an argument

◆ on_error()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_error ( std::exception_ptr  eptr)
protectedvirtual

Handle exception thrown in main loop. Default behavior is to set NodeState to ERROR.

◆ on_mode_change_failure()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_mode_change_failure ( )
protectedvirtual

Error handling behavior for when changing the autonomy mode has failed. Default is throwing an exception

◆ on_read_timeout()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_read_timeout ( )
protectedvirtual

Error handling behavior for when receiving data from the vehicle platform has timed out, default is throwing an exception, which is caught and turned into a change in the NodeState to ERROR

◆ on_state_send_failure()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::on_state_send_failure ( )
protectedvirtual

Error handling behavior for when sending a state command has failed, default is throwing an exception, which is caught and turned into a change in the NodeState to ERROR TODO(c.ho) add command which failed to send as an argument

◆ set_filter()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::set_filter ( VehicleFilter &&  filter)
protectednoexcept

Set the low pass filter.

◆ set_interface()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::set_interface ( std::unique_ptr< PlatformInterface > &&  interface)
protectednoexcept

Set the vehicle-specific PlatformInterface.

◆ set_reference_tracker()

void autoware::drivers::vehicle_interface::VehicleInterfaceNode::set_reference_tracker ( ControllerBasePtr &&  controller)
protectednoexcept

Set the reference tracker (controller)


The documentation for this class was generated from the following files: