Skip to content

Commit f2a163c

Browse files
jwallace42redvinaa
authored andcommitted
added planner_id (ros-navigation#2806)
1 parent 0c47bb9 commit f2a163c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎nav2_simple_commander/nav2_simple_commander/robot_navigator.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def waitUntilNav2Active(self):
273273
self.info('Nav2 is ready for use!')
274274
return
275275

276-
def getPath(self, start, goal):
276+
def getPath(self, start, goal, planner_id=None):
277277
"""Send a `ComputePathToPose` action request."""
278278
self.debug("Waiting for 'ComputePathToPose' action server")
279279
while not self.compute_path_to_pose_client.wait_for_server(timeout_sec=1.0):
@@ -282,6 +282,8 @@ def getPath(self, start, goal):
282282
goal_msg = ComputePathToPose.Goal()
283283
goal_msg.goal = goal
284284
goal_msg.start = start
285+
if planner_id is not None:
286+
goal_msg.planner_id = planner_id
285287

286288
self.info('Getting path...')
287289
send_goal_future = self.compute_path_to_pose_client.send_goal_async(goal_msg)

0 commit comments

Comments
 (0)