Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
LateralController Class Referenceabstract

Base (abstract) class for lateral control solvers (that calculate steering command) More...

#include <base_lateral_controller.hpp>

Inheritance diagram for LateralController:
Inheritance graph
Collaboration diagram for LateralController:
Collaboration graph

Public Member Functions

virtual void path_callback (const custom_interfaces::msg::PathPointArray &msg)=0
 Called when a new path is sent by Path Planning.
 
virtual void vehicle_state_callback (const custom_interfaces::msg::Velocities &msg)=0
 Called when the car state (currently just velocity) is updated.
 
virtual void vehicle_pose_callback (const custom_interfaces::msg::Pose &msg)=0
 Called when the car pose is updated by SLAM.
 
virtual double get_steering_command ()=0
 Returns the steering command calculated by the solver.
 
virtual void publish_solver_data (std::shared_ptr< rclcpp::Node > node, std::map< std::string, std::shared_ptr< rclcpp::PublisherBase > > &publisher_map)=0
 Publishes solver specific data using the provided ControlNode.
 
 LateralController (const ControlParameters &params)
 
virtual ~LateralController ()=default
 

Protected Attributes

std::shared_ptr< ControlParametersparams_
 

Detailed Description

Base (abstract) class for lateral control solvers (that calculate steering command)

Definition at line 13 of file base_lateral_controller.hpp.

Constructor & Destructor Documentation

◆ LateralController()

LateralController::LateralController ( const ControlParameters params)
inline

Definition at line 45 of file base_lateral_controller.hpp.

◆ ~LateralController()

virtual LateralController::~LateralController ( )
virtualdefault

Member Function Documentation

◆ get_steering_command()

virtual double LateralController::get_steering_command ( )
pure virtual

Returns the steering command calculated by the solver.

Implemented in PurePursuit.

◆ path_callback()

virtual void LateralController::path_callback ( const custom_interfaces::msg::PathPointArray &  msg)
pure virtual

Called when a new path is sent by Path Planning.

Implemented in PurePursuit.

◆ publish_solver_data()

virtual void LateralController::publish_solver_data ( std::shared_ptr< rclcpp::Node >  node,
std::map< std::string, std::shared_ptr< rclcpp::PublisherBase > > &  publisher_map 
)
pure virtual

Publishes solver specific data using the provided ControlNode.

Parameters
nodeshared pointer to the ControlNode
publisher_mapmap of topic names to publisher pointers

Implemented in PurePursuit.

◆ vehicle_pose_callback()

virtual void LateralController::vehicle_pose_callback ( const custom_interfaces::msg::Pose &  msg)
pure virtual

Called when the car pose is updated by SLAM.

Implemented in PurePursuit.

◆ vehicle_state_callback()

virtual void LateralController::vehicle_state_callback ( const custom_interfaces::msg::Velocities &  msg)
pure virtual

Called when the car state (currently just velocity) is updated.

Implemented in PurePursuit.

Member Data Documentation

◆ params_

std::shared_ptr<ControlParameters> LateralController::params_
protected

Definition at line 15 of file base_lateral_controller.hpp.


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