Class CriticManager

Class Documentation

class CriticManager

Manager of objective function plugins for scoring trajectories.

Public 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.

Parameters:
  • parent – WeakPtr to node

  • name – Name of plugin

  • costmap_ros – Costmap2DROS object of environment

  • dynamic_parameter_handlerParameter handler object

void evalTrajectoriesScores(CriticData &data) const

Score trajectories by the set of loaded critic functions.

Parameters:

CriticData – Struct of necessary information to pass to the critic functions

Protected 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::Costmap2DROS> costmap_ros_
std::string name_
ParametersHandler *parameters_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")}