|
Nav2 Navigation Stack - kilted
kilted
ROS 2 Navigation Stack
|
Manager of incoming reference paths for transformation and processing. More...
#include <nav2_mppi_controller/include/nav2_mppi_controller/tools/path_handler.hpp>

Public Member Functions | |
| PathHandler ()=default | |
| Constructor for mppi::PathHandler. | |
| ~PathHandler ()=default | |
| Destructor for mppi::PathHandler. | |
| void | initialize (rclcpp_lifecycle::LifecycleNode::WeakPtr parent, const std::string &name, std::shared_ptr< nav2_costmap_2d::Costmap2DROS >, std::shared_ptr< tf2_ros::Buffer >, ParametersHandler *) |
| Initialize path handler on bringup. More... | |
| void | setPath (const nav_msgs::msg::Path &plan) |
| Set new reference path. More... | |
| nav_msgs::msg::Path & | getPath () |
| Get reference path. More... | |
| nav_msgs::msg::Path | transformPath (const geometry_msgs::msg::PoseStamped &robot_pose) |
| transform global plan to local applying constraints, then prune global plan More... | |
| geometry_msgs::msg::PoseStamped | getTransformedGoal (const builtin_interfaces::msg::Time &stamp) |
| Get the global goal pose transformed to the local frame. More... | |
Protected Member Functions | |
| bool | transformPose (const std::string &frame, const geometry_msgs::msg::PoseStamped &in_pose, geometry_msgs::msg::PoseStamped &out_pose) const |
| Transform a pose to another frame. More... | |
| double | getMaxCostmapDist () |
| Get largest dimension of costmap (radially) More... | |
| geometry_msgs::msg::PoseStamped | transformToGlobalPlanFrame (const geometry_msgs::msg::PoseStamped &pose) |
| Transform a pose to the global reference frame. More... | |
| std::pair< nav_msgs::msg::Path, PathIterator > | getGlobalPlanConsideringBoundsInCostmapFrame (const geometry_msgs::msg::PoseStamped &global_pose) |
| Get global plan within window of the local costmap size. More... | |
| void | prunePlan (nav_msgs::msg::Path &plan, const PathIterator end) |
| Prune a path to only interesting portions. More... | |
| bool | isWithinInversionTolerances (const geometry_msgs::msg::PoseStamped &robot_pose) |
| Check if the robot pose is within the set inversion tolerances. More... | |
Protected Attributes | |
| std::string | name_ |
| std::shared_ptr< nav2_costmap_2d::Costmap2DROS > | costmap_ |
| std::shared_ptr< tf2_ros::Buffer > | tf_buffer_ |
| ParametersHandler * | parameters_handler_ |
| nav_msgs::msg::Path | global_plan_ |
| nav_msgs::msg::Path | global_plan_up_to_inversion_ |
| rclcpp::Logger | logger_ {rclcpp::get_logger("MPPIController")} |
| double | max_robot_pose_search_dist_ {0} |
| double | prune_distance_ {0} |
| double | transform_tolerance_ {0} |
| float | inversion_xy_tolerance_ {0.2} |
| float | inversion_yaw_tolerance {0.4} |
| bool | enforce_path_inversion_ {false} |
| unsigned int | inversion_locale_ {0u} |
Manager of incoming reference paths for transformation and processing.
Definition at line 47 of file path_handler.hpp.
|
protected |
Get global plan within window of the local costmap size.
| global_pose | Robot pose |
Definition at line 49 of file path_handler.cpp.
References transformPose().
Referenced by transformPath().


|
protected |
Get largest dimension of costmap (radially)
Definition at line 166 of file path_handler.cpp.
Referenced by initialize().

| nav_msgs::msg::Path & mppi::PathHandler::getPath | ( | ) |
| geometry_msgs::msg::PoseStamped mppi::PathHandler::getTransformedGoal | ( | const builtin_interfaces::msg::Time & | stamp | ) |
Get the global goal pose transformed to the local frame.
| stamp | Time to get the goal pose at |
Definition at line 189 of file path_handler.cpp.
References transformPose().
Referenced by nav2_mppi_controller::MPPIController::computeVelocityCommands().


| void mppi::PathHandler::initialize | ( | rclcpp_lifecycle::LifecycleNode::WeakPtr | parent, |
| const std::string & | name, | ||
| std::shared_ptr< nav2_costmap_2d::Costmap2DROS > | costmap, | ||
| std::shared_ptr< tf2_ros::Buffer > | buffer, | ||
| ParametersHandler * | param_handler | ||
| ) |
Initialize path handler on bringup.
| parent | WeakPtr to node |
| name | Name of plugin |
| costmap_ros | Costmap2DROS object of environment |
| tf | TF buffer for transformations |
| dynamic_parameter_handler | Parameter handler object |
Definition at line 24 of file path_handler.cpp.
References getMaxCostmapDist(), and mppi::ParametersHandler::getParamGetter().
Referenced by nav2_mppi_controller::MPPIController::configure().


|
protected |
Check if the robot pose is within the set inversion tolerances.
| robot_pose | Robot's current pose to check |
Definition at line 205 of file path_handler.cpp.
Referenced by transformPath().

|
protected |
Prune a path to only interesting portions.
| plan | Plan to prune |
| end | Final path iterator |
Definition at line 184 of file path_handler.cpp.
Referenced by transformPath().

| void mppi::PathHandler::setPath | ( | const nav_msgs::msg::Path & | plan | ) |
Set new reference path.
| Plan | Path to use |
Definition at line 173 of file path_handler.cpp.
Referenced by nav2_mppi_controller::MPPIController::setPlan().

| nav_msgs::msg::Path mppi::PathHandler::transformPath | ( | const geometry_msgs::msg::PoseStamped & | robot_pose | ) |
transform global plan to local applying constraints, then prune global plan
| robot_pose | Pose of robot |
Definition at line 120 of file path_handler.cpp.
References getGlobalPlanConsideringBoundsInCostmapFrame(), isWithinInversionTolerances(), prunePlan(), and transformToGlobalPlanFrame().
Referenced by nav2_mppi_controller::MPPIController::computeVelocityCommands().


|
protected |
Transform a pose to another frame.
| frame | Frame to transform to |
| in_pose | Input pose |
| out_pose | Output pose |
Definition at line 145 of file path_handler.cpp.
Referenced by getGlobalPlanConsideringBoundsInCostmapFrame(), getTransformedGoal(), and transformToGlobalPlanFrame().

|
protected |
Transform a pose to the global reference frame.
| pose | Current pose |
Definition at line 104 of file path_handler.cpp.
References transformPose().
Referenced by transformPath().

