|
Nav2 Navigation Stack - lyrical
lyrical
ROS 2 Navigation Stack
|
Plugin-based flexible controller. More...
#include <nav2_dwb_controller/dwb_core/include/dwb_core/dwb_local_planner.hpp>


Public Member Functions | |
| DWBLocalPlanner () | |
| Constructor that brings up pluginlib loaders. | |
| void | configure (const nav2::LifecycleNode::WeakPtr &parent, std::string name, nav2::TransformBuffer::SharedPtr tf, std::shared_ptr< nav2_costmap_2d::Costmap2DROS > costmap_ros) override |
| void | activate () override |
| Activate lifecycle node. | |
| void | deactivate () override |
| Deactivate lifecycle node. | |
| void | cleanup () override |
| Cleanup lifecycle node. | |
| void | newPathReceived (const nav_msgs::msg::Path &raw_global_path) override |
| nav2_core newPathReceived - Receives a new plan from the Planner Server More... | |
| geometry_msgs::msg::TwistStamped | computeVelocityCommands (const geometry_msgs::msg::PoseStamped &pose, const geometry_msgs::msg::Twist &velocity, nav2_core::GoalChecker *, const nav_msgs::msg::Path &transformed_global_plan, const geometry_msgs::msg::PoseStamped &global_goal) override |
| nav2_core computeVelocityCommands - calculates the best command given the current pose and velocity More... | |
| virtual dwb_msgs::msg::TrajectoryScore | scoreTrajectory (const dwb_msgs::msg::Trajectory2D &traj, double best_score=-1) |
| Score a given command. Can be used for testing. More... | |
| virtual nav_2d_msgs::msg::Twist2DStamped | computeVelocityCommands (const geometry_msgs::msg::PoseStamped &pose, const nav_2d_msgs::msg::Twist2D &velocity, std::shared_ptr< dwb_msgs::msg::LocalPlanEvaluation > &results, const nav_msgs::msg::Path &transformed_global_plan, const geometry_msgs::msg::PoseStamped &global_goal) |
| Compute the best command given the current pose and velocity, with possible debug information. More... | |
| void | setSpeedLimit (const double &speed_limit, const bool &percentage) override |
| Limits the maximum linear speed of the robot. More... | |
Public Member Functions inherited from nav2_core::Controller | |
| virtual | ~Controller () |
| Virtual destructor. | |
| virtual bool | cancel () |
| Cancel the current control action. More... | |
| virtual void | reset () |
| Reset the state of the controller if necessary after task is exited. | |
Protected Member Functions | |
| virtual dwb_msgs::msg::TrajectoryScore | coreScoringAlgorithm (const geometry_msgs::msg::Pose &pose, const nav_2d_msgs::msg::Twist2D velocity, std::shared_ptr< dwb_msgs::msg::LocalPlanEvaluation > &results) |
| Iterate through all the twists and find the best one. | |
| std::string | resolveCriticClassName (std::string base_name) |
| try to resolve a possibly shortened critic name with the default namespaces and the suffix "Critic" More... | |
| virtual void | loadCritics () |
| Load the critic parameters from the namespace. More... | |
Protected Attributes | |
| bool | debug_trajectory_details_ |
| nav2::LifecycleNode::WeakPtr | node_ |
| rclcpp::Clock::SharedPtr | clock_ |
| rclcpp::Logger | logger_ {rclcpp::get_logger("DWBLocalPlanner")} |
| nav2::TransformBuffer::SharedPtr | tf_ |
| std::shared_ptr< nav2_costmap_2d::Costmap2DROS > | costmap_ros_ |
| std::unique_ptr< DWBPublisher > | pub_ |
| std::vector< std::string > | default_critic_namespaces_ |
| pluginlib::ClassLoader< TrajectoryGenerator > | traj_gen_loader_ |
| TrajectoryGenerator::Ptr | traj_generator_ |
| pluginlib::ClassLoader< TrajectoryCritic > | critic_loader_ |
| std::vector< TrajectoryCritic::Ptr > | critics_ |
| std::string | dwb_plugin_name_ |
| bool | short_circuit_trajectory_evaluation_ |
Additional Inherited Members | |
Public Types inherited from nav2_core::Controller | |
| using | Ptr = std::shared_ptr< nav2_core::Controller > |
Plugin-based flexible controller.
Definition at line 62 of file dwb_local_planner.hpp.
|
overridevirtual |
nav2_core computeVelocityCommands - calculates the best command given the current pose and velocity
It is presumed that the global plan is already set.
This is mostly a wrapper for the protected computeVelocityCommands function which has additional debugging info.
| pose | Current robot pose |
| velocity | Current robot velocity |
| goal_checker | Ptr to the goal checker for this task in case useful in computing commands |
| transformed_global_plan | The global plan after being processed by the path handler |
| global_goal | The last pose of the global plan |
Implements nav2_core::Controller.
Definition at line 203 of file dwb_local_planner.cpp.
|
virtual |
Compute the best command given the current pose and velocity, with possible debug information.
Same as above computeVelocityCommands, but with debug results. If the results pointer is not null, additional information about the twists evaluated will be in results after the call.
| pose | Current robot pose |
| velocity | Current robot velocity |
| results | Output param, if not NULL, will be filled in with full evaluation results |
| transformed_global_plan | The global plan after being processed by the path handler |
| global_goal | The last pose of the global plan |
Definition at line 239 of file dwb_local_planner.cpp.
References coreScoringAlgorithm().

|
overridevirtual |
| parent | pointer to user's node |
| costmap_ros | A pointer to the costmap |
Implements nav2_core::Controller.
Definition at line 66 of file dwb_local_planner.cpp.
References loadCritics().

|
protectedvirtual |
Load the critic parameters from the namespace.
| name | The namespace of this planner. |
Definition at line 146 of file dwb_local_planner.cpp.
References resolveCriticClassName().
Referenced by configure().


|
overridevirtual |
nav2_core newPathReceived - Receives a new plan from the Planner Server
| raw_global_path | The global plan from the Planner Server |
Implements nav2_core::Controller.
Definition at line 194 of file dwb_local_planner.cpp.
|
protected |
try to resolve a possibly shortened critic name with the default namespaces and the suffix "Critic"
| base_name | The name of the critic as read in from the parameter server |
Definition at line 128 of file dwb_local_planner.cpp.
Referenced by loadCritics().

|
virtual |
Score a given command. Can be used for testing.
Given a trajectory, calculate the score where lower scores are better. If the given (positive) score exceeds the best_score, calculation may be cut short, as the score can only go up from there.
| traj | Trajectory to check |
| best_score | If positive, the threshold for early termination |
Definition at line 367 of file dwb_local_planner.cpp.
Referenced by coreScoringAlgorithm().

|
inlineoverridevirtual |
Limits the maximum linear speed of the robot.
| speed_limit | expressed in absolute value (in m/s) or in percentage from maximum robot speed. |
| percentage | Setting speed limit in percentage if true or in absolute values in false case. |
Implements nav2_core::Controller.
Definition at line 163 of file dwb_local_planner.hpp.