Skip to content

Commit

Permalink
Add planner_id param to example files
Browse files Browse the repository at this point in the history
  • Loading branch information
amalnanavati committed Feb 20, 2024
1 parent c460d9c commit 7a4a225
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/ex_joint_goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def main():
node.declare_parameter("synchronous", True)
# If non-positive, don't cancel. Only used if synchronous is False
node.declare_parameter("cancel_after_secs", 0.0)
# Planner ID
node.declare_parameter("planner_id", "RRTConnectkConfigDefault")

# Create callback group that allows execution of callbacks in parallel without restrictions
callback_group = ReentrantCallbackGroup()
Expand All @@ -51,6 +53,7 @@ def main():
group_name=panda.MOVE_GROUP_ARM,
callback_group=callback_group,
)
moveit2.planner_id = node.get_parameter("planner_id").get_parameter_value().string_value

# Spin the node in background thread(s) and wait a bit for initialization
executor = rclpy.executors.MultiThreadedExecutor(2)
Expand Down
3 changes: 3 additions & 0 deletions examples/ex_pose_goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def main():
node.declare_parameter("synchronous", True)
# If non-positive, don't cancel. Only used if synchronous is False
node.declare_parameter("cancel_after_secs", 0.0)
# Planner ID
node.declare_parameter("planner_id", "RRTConnectkConfigDefault")

# Create callback group that allows execution of callbacks in parallel without restrictions
callback_group = ReentrantCallbackGroup()
Expand All @@ -42,6 +44,7 @@ def main():
group_name=panda.MOVE_GROUP_ARM,
callback_group=callback_group,
)
moveit2.planner_id = node.get_parameter("planner_id").get_parameter_value().string_value

# Spin the node in background thread(s) and wait a bit for initialization
executor = rclpy.executors.MultiThreadedExecutor(2)
Expand Down

0 comments on commit 7a4a225

Please sign in to comment.