From ed6f867020a0c557abbac6c33f5ef70e9cd36112 Mon Sep 17 00:00:00 2001 From: Andrej Orsula Date: Sat, 30 Mar 2024 13:47:41 +0100 Subject: [PATCH] Use `cartesian_speed_limited_link` instead of `cartesian_speed_end_effector_link` when available (#56) * Update msg * Use `cartesian_speed_limited_link` instead of `cartesian_speed_end_effector_link` when available Signed-off-by: Andrej Orsula --------- Signed-off-by: Andrej Orsula Co-authored-by: Apurv Saha --- pymoveit2/moveit2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pymoveit2/moveit2.py b/pymoveit2/moveit2.py index 38566cd..ef2ca26 100644 --- a/pymoveit2/moveit2.py +++ b/pymoveit2/moveit2.py @@ -2056,7 +2056,11 @@ def __init_move_action_goal( move_action_goal.request.allowed_planning_time = 0.5 move_action_goal.request.max_velocity_scaling_factor = 0.0 move_action_goal.request.max_acceleration_scaling_factor = 0.0 - move_action_goal.request.cartesian_speed_end_effector_link = end_effector + # Note: Attribute was renamed in Iron (https://github.com/ros-planning/moveit_msgs/pull/130) + if hasattr(move_action_goal.request, "cartesian_speed_limited_link"): + move_action_goal.request.cartesian_speed_limited_link = end_effector + else: + move_action_goal.request.cartesian_speed_end_effector_link = end_effector move_action_goal.request.max_cartesian_speed = 0.0 # move_action_goal.planning_options.planning_scene_diff = "Ignored"