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

Critic objective function for enforcing feasible constraints. More...

#include <nav2_mppi_controller/include/nav2_mppi_controller/critics/constraint_critic.hpp>

Inheritance diagram for mppi::critics::ConstraintCritic:
Inheritance graph
[legend]
Collaboration diagram for mppi::critics::ConstraintCritic:
Collaboration graph
[legend]

Public Member Functions

void initialize () override
 Initialize critic.
 
void score (CriticData &data) override
 Evaluate cost related to goal following. More...
 
float getMaxVelConstraint ()
 
float getMinVelConstraint ()
 
- Public Member Functions inherited from mppi::critics::CriticFunction
 CriticFunction ()=default
 Constructor for mppi::critics::CriticFunction.
 
virtual ~CriticFunction ()=default
 Destructor for mppi::critics::CriticFunction.
 
void on_configure (rclcpp_lifecycle::LifecycleNode::WeakPtr parent, const std::string &parent_name, const std::string &name, std::shared_ptr< nav2_costmap_2d::Costmap2DROS > costmap_ros, ParametersHandler *param_handler)
 Configure critic on bringup. More...
 
std::string getName ()
 Get name of critic.
 

Protected Attributes

unsigned int power_ {0}
 
float weight_ {0}
 
float min_vel_
 
float max_vel_
 
- Protected Attributes inherited from mppi::critics::CriticFunction
bool enabled_
 
std::string name_
 
std::string parent_name_
 
rclcpp_lifecycle::LifecycleNode::WeakPtr parent_
 
std::shared_ptr< nav2_costmap_2d::Costmap2DROScostmap_ros_
 
nav2_costmap_2d::Costmap2Dcostmap_ {nullptr}
 
ParametersHandlerparameters_handler_
 
rclcpp::Logger logger_ {rclcpp::get_logger("MPPIController")}
 

Detailed Description

Critic objective function for enforcing feasible constraints.

Critic objective function for penalizing wiggling/twirling.

Critic objective function for preferring forward motion.

Critic objective function for following the path approximately To allow for deviation from path in case of dynamic obstacles. Path Align is what aligns the trajectories to the path more or less precisely, if desireable. A higher weight here with an offset > 1 will accelerate the samples to full speed faster and push the follow point further ahead, creating some shortcutting.

Critic objective function for aligning to path in cases of extreme misalignment or turning.

Critic objective function for aligning to the path. Note: High settings of this will follow the path more precisely, but also makes it difficult (or impossible) to deviate in the presence of dynamic obstacles. This is an important critic to tune and consider in tandem with Obstacle.

Critic objective function for avoiding obstacles, allowing it to deviate off the planned path. This is important to tune in tandem with PathAlign to make a balance between path-tracking and dynamic obstacle avoidance capabilities as desirable for a particular application.

Critic objective function for driving towards goal.

Critic objective function for driving towards goal orientation.

Definition at line 29 of file constraint_critic.hpp.

Member Function Documentation

◆ score()

void mppi::critics::ConstraintCritic::score ( CriticData data)
overridevirtual

Evaluate cost related to goal following.

Parameters
costs[out] add reference cost values to this tensor

Implements mppi::critics::CriticFunction.

Definition at line 41 of file constraint_critic.cpp.


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