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

#include <base_decoupled_controller.hpp>

Inheritance diagram for DecoupledController:
Inheritance graph
Collaboration diagram for DecoupledController:
Collaboration graph

Public Member Functions

void path_callback (const custom_interfaces::msg::PathPointArray &msg) override
 Called when a new path is sent by Path Planning.
 
void vehicle_state_callback (const custom_interfaces::msg::Velocities &msg) override
 Called when the car state (currently just velocity) is updated.
 
void vehicle_pose_callback (const custom_interfaces::msg::Pose &msg) override
 Called when the car pose is updated by SLAM.
 
common_lib::structures::ControlCommand get_control_command () override
 Returns the control command calculated by the solver.
 
void publish_solver_data (std::shared_ptr< rclcpp::Node > node, std::map< std::string, std::shared_ptr< rclcpp::PublisherBase > > &publisher_map) override
 Publishes solver specific data using the provided ControlNode.
 
 DecoupledController (const ControlParameters &params)
 
virtual ~DecoupledController ()=default
 
- Public Member Functions inherited from ControlSolver
 ControlSolver (const ControlParameters &params)
 
virtual ~ControlSolver ()=default
 

Private Attributes

std::shared_ptr< LateralControllerlateral_controller_
 
std::shared_ptr< LongitudinalControllerlongitudinal_controller_
 

Additional Inherited Members

- Protected Attributes inherited from ControlSolver
std::shared_ptr< ControlParametersparams_
 

Detailed Description

Definition at line 7 of file base_decoupled_controller.hpp.

Constructor & Destructor Documentation

◆ DecoupledController()

DecoupledController::DecoupledController ( const ControlParameters params)

Definition at line 3 of file base_decoupled_controller.cpp.

◆ ~DecoupledController()

virtual DecoupledController::~DecoupledController ( )
virtualdefault

Member Function Documentation

◆ get_control_command()

common_lib::structures::ControlCommand DecoupledController::get_control_command ( )
overridevirtual

Returns the control command calculated by the solver.

Implements ControlSolver.

Definition at line 22 of file base_decoupled_controller.cpp.

◆ path_callback()

void DecoupledController::path_callback ( const custom_interfaces::msg::PathPointArray &  msg)
overridevirtual

Called when a new path is sent by Path Planning.

Implements ControlSolver.

Definition at line 7 of file base_decoupled_controller.cpp.

Here is the call graph for this function:

◆ publish_solver_data()

void DecoupledController::publish_solver_data ( std::shared_ptr< rclcpp::Node >  node,
std::map< std::string, std::shared_ptr< rclcpp::PublisherBase > > &  publisher_map 
)
overridevirtual

Publishes solver specific data using the provided ControlNode.

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

Implements ControlSolver.

Definition at line 28 of file base_decoupled_controller.cpp.

◆ vehicle_pose_callback()

void DecoupledController::vehicle_pose_callback ( const custom_interfaces::msg::Pose &  msg)
overridevirtual

Called when the car pose is updated by SLAM.

Implements ControlSolver.

Definition at line 17 of file base_decoupled_controller.cpp.

◆ vehicle_state_callback()

void DecoupledController::vehicle_state_callback ( const custom_interfaces::msg::Velocities &  msg)
overridevirtual

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

Implements ControlSolver.

Definition at line 12 of file base_decoupled_controller.cpp.

Member Data Documentation

◆ lateral_controller_

std::shared_ptr<LateralController> DecoupledController::lateral_controller_
private

Definition at line 9 of file base_decoupled_controller.hpp.

◆ longitudinal_controller_

std::shared_ptr<LongitudinalController> DecoupledController::longitudinal_controller_
private

Definition at line 11 of file base_decoupled_controller.hpp.


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