Autoware.Auto
ssc_interface::SscInterface Class Reference

Class for interfacing with AS SSC. More...

#include <ssc_interface.hpp>

Inheritance diagram for ssc_interface::SscInterface:
Collaboration diagram for ssc_interface::SscInterface:

Public Member Functions

 SscInterface (rclcpp::Node &node, float32_t front_axle_to_cog, float32_t rear_axle_to_cog, float32_t max_accel_mps2, float32_t max_decel_mps2, float32_t max_yaw_rate_rad)
 Default constructor. More...
 
 ~SscInterface () noexcept override=default
 Default destructor. More...
 
bool8_t update (std::chrono::nanoseconds timeout) override
 Try to receive data from the vehicle platform, and update StateReport and Odometry. Exceptions may be thrown on errors. More...
 
bool8_t send_state_command (const VehicleStateCommand &msg) override
 Send the state command to the vehicle platform. Exceptions may be thrown on errors. More...
 
bool8_t send_control_command (const HighLevelControlCommand &msg)
 Send the control command to the vehicle platform. Exceptions may be thrown on errors. More...
 
bool8_t send_control_command (const RawControlCommand &msg) override
 Send the control command to the vehicle platform. Exceptions may be thrown on errors. More...
 
bool8_t send_control_command (const VehicleControlCommand &msg) override
 Send the control command to the vehicle platform. Exceptions may be thrown on errors. More...
 
bool8_t handle_mode_change_request (ModeChangeRequest::SharedPtr request) override
 Handle a request from the user to enable or disable the DBW system. Exceptions may be thrown on errors. More...
 
- Public Member Functions inherited from autoware::drivers::vehicle_interface::PlatformInterface
 PlatformInterface ()=default
 Constructor. More...
 
virtual ~PlatformInterface ()=default
 Destructor. More...
 
const VehicleStateReport & get_state_report () const noexcept
 
const VehicleOdometry & get_odometry () const noexcept
 

Static Public Member Functions

static void kinematic_bicycle_model (float32_t dt, float32_t l_r, float32_t l_f, VehicleKinematicState *vks)
 

Additional Inherited Members

- Protected Member Functions inherited from autoware::drivers::vehicle_interface::PlatformInterface
VehicleStateReport & state_report () noexcept
 Get the underlying state report for modification. More...
 
VehicleOdometry & odometry () noexcept
 Get the underlying odometry for modification. More...
 

Detailed Description

Class for interfacing with AS SSC.

Constructor & Destructor Documentation

◆ SscInterface()

ssc_interface::SscInterface::SscInterface ( rclcpp::Node &  node,
float32_t  front_axle_to_cog,
float32_t  rear_axle_to_cog,
float32_t  max_accel_mps2,
float32_t  max_decel_mps2,
float32_t  max_yaw_rate_rad 
)
explicit

Default constructor.

Parameters
[in]nodeReference to node
[in]front_axle_to_cogDistance from front axle to center-of-gravity in meters
[in]rear_axle_to_cogDistance from rear axle to center-of-gravity in meters
[in]max_accel_mps2Maximum acceleration in m/s^2
[in]max_decel_mps2Maximum deceleration in m/s^2
[in]max_yaw_rate_radMaximum rate of change of heading in radians/sec

◆ ~SscInterface()

ssc_interface::SscInterface::~SscInterface ( )
overridedefaultnoexcept

Default destructor.

Member Function Documentation

◆ handle_mode_change_request()

bool8_t ssc_interface::SscInterface::handle_mode_change_request ( ModeChangeRequest::SharedPtr  request)
overridevirtual

Handle a request from the user to enable or disable the DBW system. Exceptions may be thrown on errors.

Parameters
[in]requestThe requested autonomy mode
Returns
false only if enabling the DBW system actually failed, true otherwise

Implements autoware::drivers::vehicle_interface::PlatformInterface.

◆ kinematic_bicycle_model()

void ssc_interface::SscInterface::kinematic_bicycle_model ( float32_t  dt,
float32_t  l_r,
float32_t  l_f,
VehicleKinematicState *  vks 
)
static

◆ send_control_command() [1/3]

bool8_t ssc_interface::SscInterface::send_control_command ( const HighLevelControlCommand &  msg)

Send the control command to the vehicle platform. Exceptions may be thrown on errors.

Parameters
[in]msgThe control command to send to the vehicle
Returns
false if sending failed in some way, true otherwise

◆ send_control_command() [2/3]

bool8_t ssc_interface::SscInterface::send_control_command ( const RawControlCommand &  msg)
overridevirtual

Send the control command to the vehicle platform. Exceptions may be thrown on errors.

Parameters
[in]msgThe control command to send to the vehicle
Returns
false if sending failed in some way, true otherwise

Implements autoware::drivers::vehicle_interface::PlatformInterface.

◆ send_control_command() [3/3]

bool8_t ssc_interface::SscInterface::send_control_command ( const VehicleControlCommand &  msg)
overridevirtual

Send the control command to the vehicle platform. Exceptions may be thrown on errors.

Parameters
[in]msgThe control command to send to the vehicle
Returns
false if sending failed in some way, true otherwise

Implements autoware::drivers::vehicle_interface::PlatformInterface.

◆ send_state_command()

bool8_t ssc_interface::SscInterface::send_state_command ( const VehicleStateCommand &  msg)
overridevirtual

Send the state command to the vehicle platform. Exceptions may be thrown on errors.

Parameters
[in]msgThe state command to send to the vehicle
Returns
false if sending failed in some way, true otherwise

Implements autoware::drivers::vehicle_interface::PlatformInterface.

◆ update()

bool8_t ssc_interface::SscInterface::update ( std::chrono::nanoseconds  timeout)
overridevirtual

Try to receive data from the vehicle platform, and update StateReport and Odometry. Exceptions may be thrown on errors.

Parameters
[in]timeoutThe maximum amount of time to check/receive data
Returns
True if data was received before the timeout, false otherwise

Implements autoware::drivers::vehicle_interface::PlatformInterface.


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