Nav2 Navigation Stack - rolling  main
ROS 2 Navigation Stack
Public Member Functions | Public Attributes | List of all members
nav2_simple_commander.robot_navigator.BasicNavigator Class Reference
Inheritance diagram for nav2_simple_commander.robot_navigator.BasicNavigator:
Inheritance graph
[legend]
Collaboration diagram for nav2_simple_commander.robot_navigator.BasicNavigator:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, str node_name='basic_navigator', str namespace='')
 
None destroyNode (self)
 
None destroy_node (self)
 
None setInitialPose (self, PoseStamped initial_pose)
 
Optional[RunningTaskgoThroughPoses (self, Goals poses, str behavior_tree='')
 
Optional[RunningTaskgoToPose (self, PoseStamped pose, str behavior_tree='')
 
Optional[RunningTaskfollowWaypoints (self, list[PoseStamped] poses)
 
Optional[RunningTaskfollowGpsWaypoints (self, list[GeoPose] gps_poses)
 
Optional[RunningTaskspin (self, float spin_dist=1.57, int time_allowance=10, bool disable_collision_checks=False)
 
Optional[RunningTaskbackup (self, float backup_dist=0.15, float backup_speed=0.025, int time_allowance=10, bool disable_collision_checks=False)
 
Optional[RunningTaskdriveOnHeading (self, float dist=0.15, float speed=0.025, int time_allowance=10, bool disable_collision_checks=False)
 
Optional[RunningTaskassistedTeleop (self, int time_allowance=30)
 
Optional[RunningTaskfollowPath (self, Path path, str controller_id='', str goal_checker_id='')
 
Optional[RunningTaskdockRobotByPose (self, PoseStamped dock_pose, str dock_type='', bool nav_to_dock=True)
 
Optional[RunningTaskdockRobotByID (self, str dock_id, bool nav_to_dock=True)
 
Optional[RunningTaskundockRobot (self, str dock_type='')
 
None cancelTask (self)
 
bool isTaskComplete (self, RunningTask task=RunningTask.NONE)
 
Any getFeedback (self, RunningTask task=RunningTask.NONE)
 
TaskResult getResult (self)
 
None clearTaskError (self)
 
None setTaskError (self, int error_code, str error_msg)
 
tuple[int, str] getTaskError (self)
 
None waitUntilNav2Active (self, str navigator='bt_navigator', str localizer='amcl')
 
Path getPath (self, PoseStamped start, PoseStamped goal, str planner_id='', bool use_start=False)
 
Path getPathThroughPoses (self, PoseStamped start, Goals goals, str planner_id='', bool use_start=False)
 
Optional[list[Union[Path, Route]]] getRoute (self, Union[int, PoseStamped] start, Union[int, PoseStamped] goal, bool use_start=False)
 
Optional[RunningTaskgetAndTrackRoute (self, Union[int, PoseStamped] start, Union[int, PoseStamped] goal, bool use_start=False)
 
Path smoothPath (self, Path path, str smoother_id='', float max_duration=2.0, bool check_for_collision=False)
 
bool changeMap (self, str map_filepath)
 
None clearAllCostmaps (self)
 
None clearLocalCostmap (self)
 
None clearGlobalCostmap (self)
 
None clearCostmapExceptRegion (self, float reset_distance)
 
None clearCostmapAroundRobot (self, float reset_distance)
 
None clearLocalCostmapAroundPose (self, PoseStamped pose, float reset_distance)
 
None clearGlobalCostmapAroundPose (self, PoseStamped pose, float reset_distance)
 
OccupancyGrid getGlobalCostmap (self)
 
OccupancyGrid getLocalCostmap (self)
 
None lifecycleStartup (self)
 
None lifecycleShutdown (self)
 
None info (self, str msg)
 
None warn (self, str msg)
 
None error (self, str msg)
 
None debug (self, str msg)
 

Public Attributes

 initial_pose
 
 last_action_error_code
 
 last_action_error_msg
 
 initial_pose_received
 
 localization_pose_sub
 
 initial_pose_pub
 
 goal_handle
 
 result_future
 
 status
 
 route_goal_handle
 
 route_result_future
 
 feedback
 

Detailed Description

Definition at line 74 of file robot_navigator.py.

Member Function Documentation

◆ cancelTask()

None nav2_simple_commander.robot_navigator.BasicNavigator.cancelTask (   self)

◆ changeMap()

bool nav2_simple_commander.robot_navigator.BasicNavigator.changeMap (   self,
str  map_filepath 
)

◆ clearAllCostmaps()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearAllCostmaps (   self)
Clear all costmaps.

Definition at line 1046 of file robot_navigator.py.

References nav2_simple_commander.robot_navigator.BasicNavigator.clearGlobalCostmap(), and nav2_simple_commander.robot_navigator.BasicNavigator.clearLocalCostmap().

Here is the call graph for this function:

◆ clearCostmapAroundRobot()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearCostmapAroundRobot (   self,
float  reset_distance 
)
Clear the costmap around the robot.

Definition at line 1080 of file robot_navigator.py.

References loopback_simulator.LoopbackSimulator.info(), and nav2_simple_commander.robot_navigator.BasicNavigator.info().

Here is the call graph for this function:

◆ clearCostmapExceptRegion()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearCostmapExceptRegion (   self,
float  reset_distance 
)
Clear the costmap except for a specified region.

Definition at line 1070 of file robot_navigator.py.

References loopback_simulator.LoopbackSimulator.info(), and nav2_simple_commander.robot_navigator.BasicNavigator.info().

Here is the call graph for this function:

◆ clearGlobalCostmap()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearGlobalCostmap (   self)
Clear global costmap.

Definition at line 1061 of file robot_navigator.py.

References loopback_simulator.LoopbackSimulator.info(), and nav2_simple_commander.robot_navigator.BasicNavigator.info().

Referenced by nav2_simple_commander.robot_navigator.BasicNavigator.clearAllCostmaps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearGlobalCostmapAroundPose()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearGlobalCostmapAroundPose (   self,
PoseStamped  pose,
float  reset_distance 
)
Clear the global costmap around a given pose.

Definition at line 1101 of file robot_navigator.py.

References loopback_simulator.LoopbackSimulator.info(), and nav2_simple_commander.robot_navigator.BasicNavigator.info().

Here is the call graph for this function:

◆ clearLocalCostmap()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearLocalCostmap (   self)
Clear local costmap.

Definition at line 1052 of file robot_navigator.py.

References loopback_simulator.LoopbackSimulator.info(), and nav2_simple_commander.robot_navigator.BasicNavigator.info().

Referenced by nav2_simple_commander.robot_navigator.BasicNavigator.clearAllCostmaps().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearLocalCostmapAroundPose()

None nav2_simple_commander.robot_navigator.BasicNavigator.clearLocalCostmapAroundPose (   self,
PoseStamped  pose,
float  reset_distance 
)
Clear the costmap around a given pose.

Definition at line 1090 of file robot_navigator.py.

References loopback_simulator.LoopbackSimulator.info(), and nav2_simple_commander.robot_navigator.BasicNavigator.info().

Here is the call graph for this function:

◆ dockRobotByID()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.dockRobotByID (   self,
str  dock_id,
bool   nav_to_dock = True 
)

◆ followGpsWaypoints()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.followGpsWaypoints (   self,
list[GeoPose]  gps_poses 
)

◆ followWaypoints()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.followWaypoints (   self,
list[PoseStamped]  poses 
)

◆ getAndTrackRoute()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.getAndTrackRoute (   self,
Union[int, PoseStamped]  start,
Union[int, PoseStamped]  goal,
bool   use_start = False 
)

◆ getFeedback()

Any nav2_simple_commander.robot_navigator.BasicNavigator.getFeedback (   self,
RunningTask   task = RunningTask.NONE 
)
Get the pending action feedback message.

Definition at line 690 of file robot_navigator.py.

References nav2_simple_commander.robot_navigator.BasicNavigator.feedback.

◆ getGlobalCostmap()

OccupancyGrid nav2_simple_commander.robot_navigator.BasicNavigator.getGlobalCostmap (   self)

◆ getLocalCostmap()

OccupancyGrid nav2_simple_commander.robot_navigator.BasicNavigator.getLocalCostmap (   self)

◆ getPath()

Path nav2_simple_commander.robot_navigator.BasicNavigator.getPath (   self,
PoseStamped  start,
PoseStamped  goal,
str   planner_id = '',
bool   use_start = False 
)

◆ getPathThroughPoses()

Path nav2_simple_commander.robot_navigator.BasicNavigator.getPathThroughPoses (   self,
PoseStamped  start,
Goals  goals,
str   planner_id = '',
bool   use_start = False 
)

◆ getResult()

TaskResult nav2_simple_commander.robot_navigator.BasicNavigator.getResult (   self)

◆ getRoute()

Optional[list[Union[Path, Route]]] nav2_simple_commander.robot_navigator.BasicNavigator.getRoute (   self,
Union[int, PoseStamped]  start,
Union[int, PoseStamped]  goal,
bool   use_start = False 
)

◆ goThroughPoses()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.goThroughPoses (   self,
Goals  poses,
str   behavior_tree = '' 
)

◆ goToPose()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.goToPose (   self,
PoseStamped  pose,
str   behavior_tree = '' 
)

◆ isTaskComplete()

bool nav2_simple_commander.robot_navigator.BasicNavigator.isTaskComplete (   self,
RunningTask   task = RunningTask.NONE 
)

◆ lifecycleShutdown()

None nav2_simple_commander.robot_navigator.BasicNavigator.lifecycleShutdown (   self)
Shutdown nav2 lifecycle system.

Definition at line 1168 of file robot_navigator.py.

References nav2_simple_commander.robot_navigator.BasicNavigator._setInitialPose(), nav2::LifecycleNode.create_client(), nav2_constrained_smoother::OptimizerParams.debug, loopback_simulator.LoopbackSimulator.debug(), nav2_simple_commander.robot_navigator.BasicNavigator.debug(), nav2_simple_commander.robot_navigator.BasicNavigator.feedback, loopback_simulator.LoopbackSimulator.info(), nav2_simple_commander.robot_navigator.BasicNavigator.info(), loopback_simulator.LoopbackSimulator.initial_pose, nav2_simple_commander.robot_navigator.BasicNavigator.initial_pose, tester_node.NavTester.initial_pose, tester_node.RouteTester.initial_pose, nav_through_poses_tester_error_msg_node.NavTester.initial_pose, nav_through_poses_tester_node.NavTester.initial_pose, nav_to_pose_tester_node.NavTester.initial_pose, nav2_simple_commander.robot_navigator.BasicNavigator.initial_pose_pub, tester_node.NavTester.initial_pose_pub, tester_node.RouteTester.initial_pose_pub, nav_through_poses_tester_error_msg_node.NavTester.initial_pose_pub, nav_through_poses_tester_node.NavTester.initial_pose_pub, nav_to_pose_tester_node.NavTester.initial_pose_pub, tester.WaypointFollowerTest.initial_pose_pub, nav2_simple_commander.robot_navigator.BasicNavigator.initial_pose_received, tester_node.NavTester.initial_pose_received, tester_node.RouteTester.initial_pose_received, nav_through_poses_tester_error_msg_node.NavTester.initial_pose_received, nav_through_poses_tester_node.NavTester.initial_pose_received, nav_to_pose_tester_node.NavTester.initial_pose_received, and tester.WaypointFollowerTest.initial_pose_received.

Here is the call graph for this function:

◆ lifecycleStartup()

None nav2_simple_commander.robot_navigator.BasicNavigator.lifecycleStartup (   self)

◆ setInitialPose()

None nav2_simple_commander.robot_navigator.BasicNavigator.setInitialPose (   self,
PoseStamped  initial_pose 
)

◆ smoothPath()

Path nav2_simple_commander.robot_navigator.BasicNavigator.smoothPath (   self,
Path  path,
str   smoother_id = '',
float   max_duration = 2.0,
bool   check_for_collision = False 
)

◆ undockRobot()

Optional[RunningTask] nav2_simple_commander.robot_navigator.BasicNavigator.undockRobot (   self,
str   dock_type = '' 
)

◆ waitUntilNav2Active()

None nav2_simple_commander.robot_navigator.BasicNavigator.waitUntilNav2Active (   self,
str   navigator = 'bt_navigator',
str   localizer = 'amcl' 
)

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