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

Base class for control solvers, that calculate both lateral and longitudinal control commands. More...

#include <base_control_solver.hpp>

Inheritance diagram for ControlSolver:
Inheritance graph
Collaboration diagram for ControlSolver:
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 common_lib::structures::ControlCommand get_control_command ()=0
 Returns the control 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.
 
 ControlSolver (const ControlParameters &params)
 
virtual ~ControlSolver ()=default
 

Protected Attributes

std::shared_ptr< ControlParametersparams_
 

Detailed Description

Base class for control solvers, that calculate both lateral and longitudinal control commands.

Definition at line 13 of file base_control_solver.hpp.

Constructor & Destructor Documentation

◆ ControlSolver()

ControlSolver::ControlSolver ( const ControlParameters params)
inline

Definition at line 45 of file base_control_solver.hpp.

◆ ~ControlSolver()

virtual ControlSolver::~ControlSolver ( )
virtualdefault

Member Function Documentation

◆ get_control_command()

virtual common_lib::structures::ControlCommand ControlSolver::get_control_command ( )
pure virtual

Returns the control command calculated by the solver.

Implemented in DecoupledController.

◆ path_callback()

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

Called when a new path is sent by Path Planning.

Implemented in DecoupledController.

Here is the caller graph for this function:

◆ publish_solver_data()

virtual void ControlSolver::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 DecoupledController.

◆ vehicle_pose_callback()

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

Called when the car pose is updated by SLAM.

Implemented in DecoupledController.

◆ vehicle_state_callback()

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

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

Implemented in DecoupledController.

Member Data Documentation

◆ params_

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

Definition at line 15 of file base_control_solver.hpp.


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