Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
locomotor::Locomotor Class Reference

an extensible path planning coordination engine More...

#include <locomotor.h>

Public Member Functions

nav_core2::GlobalPlannergetCurrentGlobalPlanner ()
 
std::string getCurrentGlobalPlannerName () const
 
nav_core2::LocalPlannergetCurrentLocalPlanner ()
 
std::string getCurrentLocalPlannerName () const
 
nav_core2::Costmap::Ptr getGlobalCostmap () const
 
std::vector< std::string > getGlobalPlannerNames () const
 
nav_2d_msgs::Pose2DStamped getGlobalRobotPose () const
 
nav_core2::Costmap::Ptr getLocalCostmap () const
 
std::vector< std::string > getLocalPlannerNames () const
 
nav_2d_msgs::Pose2DStamped getLocalRobotPose () const
 
const locomotor_msgs::NavigationState & getNavigationState () const
 
TFListenerPtr getTFListener () const
 
void initializeGlobalCostmap (Executor &ex)
 
void initializeGlobalPlanners (Executor &ex)
 
void initializeLocalCostmap (Executor &ex)
 
void initializeLocalPlanners (Executor &ex)
 
 Locomotor (const ros::NodeHandle &private_nh)
 Base Constructor. More...
 
void publishPath (const nav_2d_msgs::Path2D &global_plan)
 
void publishTwist (const nav_2d_msgs::Twist2DStamped &command)
 
void requestGlobalCostmapUpdate (Executor &work_ex, Executor &result_ex, CostmapUpdateCallback cb=nullptr, CostmapUpdateExceptionCallback fail_cb=nullptr)
 Request the global costmap get updated as a new callback. More...
 
void requestGlobalPlan (Executor &work_ex, Executor &result_ex, GlobalPlanCallback cb=nullptr, PlannerExceptionCallback fail_cb=nullptr)
 Request the global planner get run as a new callback. More...
 
void requestLocalCostmapUpdate (Executor &work_ex, Executor &result_ex, CostmapUpdateCallback cb=nullptr, CostmapUpdateExceptionCallback fail_cb=nullptr)
 Request the local costmap get updated as a new callback. More...
 
void requestLocalPlan (Executor &work_ex, Executor &result_ex, LocalPlanCallback cb=nullptr, PlannerExceptionCallback fail_cb=nullptr, NavigationCompleteCallback complete_cb=nullptr)
 Request the local planner get run as a new callback. More...
 
void requestNavigationFailure (Executor &result_ex, const locomotor_msgs::ResultCode &result, NavigationFailureCallback cb=nullptr)
 Request that a onNavigationFailure event be added as a new callback. More...
 
virtual void setGoal (nav_2d_msgs::Pose2DStamped goal)
 Starts a new navigation to the given goal. More...
 
bool useGlobalPlanner (const std::string &name)
 
bool useLocalPlanner (const std::string &name)
 

Protected Member Functions

void doCostmapUpdate (nav_core2::Costmap &costmap, Executor &result_ex, CostmapUpdateCallback cb, CostmapUpdateExceptionCallback fail_cb)
 
nav_2d_msgs::Pose2DStamped getRobotPose (const std::string &target_frame) const
 
void makeGlobalPlan (Executor &result_ex, GlobalPlanCallback cb, PlannerExceptionCallback fail_cb)
 
void makeLocalPlan (Executor &result_ex, LocalPlanCallback cb, PlannerExceptionCallback fail_cb, NavigationCompleteCallback complete_cb)
 
virtual void switchLocalPlannerCallback (const std::string &old_planner, const std::string &new_planner)
 Callback for when the local planner switches to ensure the new planner has up to date information. More...
 

Protected Attributes

pluginlib::ClassLoader< nav_core2::Costmapcostmap_loader_
 
nav_core2::Costmap::Ptr global_costmap_
 
nav_2d_utils::PluginMux< nav_core2::GlobalPlannerglobal_planner_mux_
 
nav_core2::Costmap::Ptr local_costmap_
 
nav_2d_utils::PluginMux< nav_core2::LocalPlannerlocal_planner_mux_
 
std::shared_ptr< nav_2d_utils::OdomSubscriberodom_sub_
 
PathPublisher path_pub_
 
ros::NodeHandle private_nh_
 
std::string robot_base_frame_
 
locomotor_msgs::NavigationState state_
 
std::shared_ptr< tf2_ros::TransformListenertf2_listener_
 
TFListenerPtr tf_
 
TwistPublisher twist_pub_
 
bool use_latest_pose_
 

Detailed Description

an extensible path planning coordination engine

Definition at line 81 of file locomotor.h.

Constructor & Destructor Documentation

◆ Locomotor()

locomotor::Locomotor::Locomotor ( const ros::NodeHandle private_nh)
explicit

Base Constructor.

Definition at line 49 of file locomotor.cpp.

Member Function Documentation

◆ getCurrentGlobalPlanner()

nav_core2::GlobalPlanner& locomotor::Locomotor::getCurrentGlobalPlanner ( )
inline

Definition at line 172 of file locomotor.h.

◆ getCurrentGlobalPlannerName()

std::string locomotor::Locomotor::getCurrentGlobalPlannerName ( ) const
inline

Definition at line 171 of file locomotor.h.

◆ getCurrentLocalPlanner()

nav_core2::LocalPlanner& locomotor::Locomotor::getCurrentLocalPlanner ( )
inline

Definition at line 177 of file locomotor.h.

◆ getCurrentLocalPlannerName()

std::string locomotor::Locomotor::getCurrentLocalPlannerName ( ) const
inline

Definition at line 176 of file locomotor.h.

◆ getGlobalCostmap()

nav_core2::Costmap::Ptr locomotor::Locomotor::getGlobalCostmap ( ) const
inline

Definition at line 181 of file locomotor.h.

◆ getGlobalPlannerNames()

std::vector<std::string> locomotor::Locomotor::getGlobalPlannerNames ( ) const
inline

Definition at line 170 of file locomotor.h.

◆ getGlobalRobotPose()

nav_2d_msgs::Pose2DStamped locomotor::Locomotor::getGlobalRobotPose ( ) const
inline

Definition at line 186 of file locomotor.h.

◆ getLocalCostmap()

nav_core2::Costmap::Ptr locomotor::Locomotor::getLocalCostmap ( ) const
inline

Definition at line 182 of file locomotor.h.

◆ getLocalPlannerNames()

std::vector<std::string> locomotor::Locomotor::getLocalPlannerNames ( ) const
inline

Definition at line 175 of file locomotor.h.

◆ getLocalRobotPose()

nav_2d_msgs::Pose2DStamped locomotor::Locomotor::getLocalRobotPose ( ) const
inline

Definition at line 187 of file locomotor.h.

◆ getNavigationState()

const locomotor_msgs::NavigationState& locomotor::Locomotor::getNavigationState ( ) const
inline

Definition at line 167 of file locomotor.h.

◆ getRobotPose()

nav_2d_msgs::Pose2DStamped locomotor::Locomotor::getRobotPose ( const std::string &  target_frame) const
protected

Definition at line 234 of file locomotor.cpp.

◆ getTFListener()

TFListenerPtr locomotor::Locomotor::getTFListener ( ) const
inline

Definition at line 185 of file locomotor.h.

◆ publishPath()

void locomotor::Locomotor::publishPath ( const nav_2d_msgs::Path2D &  global_plan)
inline

Definition at line 190 of file locomotor.h.

◆ publishTwist()

void locomotor::Locomotor::publishTwist ( const nav_2d_msgs::Twist2DStamped &  command)
inline

Definition at line 191 of file locomotor.h.

◆ setGoal()

void locomotor::Locomotor::setGoal ( nav_2d_msgs::Pose2DStamped  goal)
virtual

Starts a new navigation to the given goal.

Parameters
goalThe goal to navigate to

Definition at line 112 of file locomotor.cpp.

◆ switchLocalPlannerCallback()

void locomotor::Locomotor::switchLocalPlannerCallback ( const std::string &  old_planner,
const std::string &  new_planner 
)
protectedvirtual

Callback for when the local planner switches to ensure the new planner has up to date information.

Parameters
old_plannerName used on local_planner_mux of the old planner
new_plannerName used on local_planner_mux of the new planner

Definition at line 119 of file locomotor.cpp.

◆ useGlobalPlanner()

bool locomotor::Locomotor::useGlobalPlanner ( const std::string &  name)
inline

Definition at line 173 of file locomotor.h.

◆ useLocalPlanner()

bool locomotor::Locomotor::useLocalPlanner ( const std::string &  name)
inline

Definition at line 178 of file locomotor.h.

Member Data Documentation

◆ costmap_loader_

pluginlib::ClassLoader<nav_core2::Costmap> locomotor::Locomotor::costmap_loader_
protected

Definition at line 213 of file locomotor.h.

◆ global_costmap_

nav_core2::Costmap::Ptr locomotor::Locomotor::global_costmap_
protected

Definition at line 217 of file locomotor.h.

◆ global_planner_mux_

nav_2d_utils::PluginMux<nav_core2::GlobalPlanner> locomotor::Locomotor::global_planner_mux_
protected

Definition at line 216 of file locomotor.h.

◆ local_costmap_

nav_core2::Costmap::Ptr locomotor::Locomotor::local_costmap_
protected

Definition at line 221 of file locomotor.h.

◆ local_planner_mux_

nav_2d_utils::PluginMux<nav_core2::LocalPlanner> locomotor::Locomotor::local_planner_mux_
protected

Definition at line 220 of file locomotor.h.

◆ odom_sub_

std::shared_ptr<nav_2d_utils::OdomSubscriber> locomotor::Locomotor::odom_sub_
protected

Definition at line 228 of file locomotor.h.

◆ path_pub_

PathPublisher locomotor::Locomotor::path_pub_
protected

Definition at line 236 of file locomotor.h.

◆ private_nh_

ros::NodeHandle locomotor::Locomotor::private_nh_
protected

Definition at line 231 of file locomotor.h.

◆ robot_base_frame_

std::string locomotor::Locomotor::robot_base_frame_
protected

Definition at line 233 of file locomotor.h.

◆ state_

locomotor_msgs::NavigationState locomotor::Locomotor::state_
protected

Definition at line 232 of file locomotor.h.

◆ tf2_listener_

std::shared_ptr<tf2_ros::TransformListener> locomotor::Locomotor::tf2_listener_
protected

Definition at line 226 of file locomotor.h.

◆ tf_

TFListenerPtr locomotor::Locomotor::tf_
protected

Definition at line 225 of file locomotor.h.

◆ twist_pub_

TwistPublisher locomotor::Locomotor::twist_pub_
protected

Definition at line 237 of file locomotor.h.

◆ use_latest_pose_

bool locomotor::Locomotor::use_latest_pose_
protected

Definition at line 227 of file locomotor.h.


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


locomotor
Author(s):
autogenerated on Sun May 18 2025 02:47:30