Nav2 Navigation Stack - humble  humble
ROS 2 Navigation Stack
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mppi::CriticManager Class Reference

Manager of objective function plugins for scoring trajectories. More...

#include <nav2_mppi_controller/include/nav2_mppi_controller/critic_manager.hpp>

Collaboration diagram for mppi::CriticManager:
Collaboration graph
[legend]

Public Member Functions

 CriticManager ()=default
 Constructor for mppi::CriticManager.
 
virtual ~CriticManager ()=default
 Virtual Destructor for mppi::CriticManager.
 
void on_configure (rclcpp_lifecycle::LifecycleNode::WeakPtr parent, const std::string &name, std::shared_ptr< nav2_costmap_2d::Costmap2DROS >, ParametersHandler *)
 Configure critic manager on bringup and load plugins. More...
 
void evalTrajectoriesScores (CriticData &data) const
 Score trajectories by the set of loaded critic functions. More...
 

Protected Member Functions

void getParams ()
 Get parameters (critics to load)
 
virtual void loadCritics ()
 Load the critic plugins.
 
std::string getFullName (const std::string &name)
 Get full-name namespaced critic IDs.
 

Protected Attributes

rclcpp_lifecycle::LifecycleNode::WeakPtr parent_
 
std::shared_ptr< nav2_costmap_2d::Costmap2DROScostmap_ros_
 
std::string name_
 
ParametersHandlerparameters_handler_
 
std::vector< std::string > critic_names_
 
std::unique_ptr< pluginlib::ClassLoader< critics::CriticFunction > > loader_
 
std::vector< std::unique_ptr< critics::CriticFunction > > critics_
 
rclcpp::Logger logger_ {rclcpp::get_logger("MPPIController")}
 

Detailed Description

Manager of objective function plugins for scoring trajectories.

Definition at line 42 of file critic_manager.hpp.

Member Function Documentation

◆ evalTrajectoriesScores()

void mppi::CriticManager::evalTrajectoriesScores ( CriticData data) const

Score trajectories by the set of loaded critic functions.

Parameters
CriticDataStruct of necessary information to pass to the critic functions

Definition at line 67 of file critic_manager.cpp.

◆ on_configure()

void mppi::CriticManager::on_configure ( rclcpp_lifecycle::LifecycleNode::WeakPtr  parent,
const std::string &  name,
std::shared_ptr< nav2_costmap_2d::Costmap2DROS costmap_ros,
ParametersHandler param_handler 
)

Configure critic manager on bringup and load plugins.

Parameters
parentWeakPtr to node
nameName of plugin
costmap_rosCostmap2DROS object of environment
dynamic_parameter_handlerParameter handler object

Definition at line 20 of file critic_manager.cpp.

References getParams(), and loadCritics().

Here is the call graph for this function:

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