From 9ce0f1d5cbea781c42586f6a0fd219d21b48cb96 Mon Sep 17 00:00:00 2001 From: Zarnack <56802851+Zarnack@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:17:44 +0000 Subject: [PATCH 1/2] added re-use of max_velocity_scaling_factor and max_acceleration_scaling_factor from move_action goal to cartesian_path_request --- pymoveit2/moveit2.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pymoveit2/moveit2.py b/pymoveit2/moveit2.py index 6d7684e..927d44a 100644 --- a/pymoveit2/moveit2.py +++ b/pymoveit2/moveit2.py @@ -1739,6 +1739,15 @@ def _plan_cartesian_path( self.__cartesian_path_request.start_state = ( self.__move_action_goal.request.start_state ) + + self.__cartesian_path_request.max_velocity_scaling_factor = ( + self.__move_action_goal.request.max_velocity_scaling_factor + ) + + self.__cartesian_path_request.max_acceleration_scaling_factor = ( + self.__move_action_goal.request.max_acceleration_scaling_factor + ) + self.__cartesian_path_request.group_name = ( self.__move_action_goal.request.group_name ) From b71913be0beac5c6ec624bb53781fb0ff83f0c49 Mon Sep 17 00:00:00 2001 From: Zarnack <56802851+Zarnack@users.noreply.github.com> Date: Wed, 3 Apr 2024 16:36:02 +0000 Subject: [PATCH 2/2] Removed getter and setter of 'max_cartesian_speed' to avoid confusion as the corresponding value of the MotionPlanRequest.msg (respectively the self.__move_action_goal.request object) is currently not used in moveit2. --> The 'max_cartesian_speed' variable requires the 'default_planner_request_adapters/SetMaxCartesianEndEffectorSpeed' which currently only exists in moveit1. --- pymoveit2/moveit2.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pymoveit2/moveit2.py b/pymoveit2/moveit2.py index 927d44a..7bca993 100644 --- a/pymoveit2/moveit2.py +++ b/pymoveit2/moveit2.py @@ -2041,14 +2041,6 @@ def max_acceleration(self) -> float: def max_acceleration(self, value: float): self.__move_action_goal.request.max_acceleration_scaling_factor = value - @property - def max_cartesian_speed(self) -> float: - return self.__move_action_goal.request.max_cartesian_speed - - @max_cartesian_speed.setter - def max_cartesian_speed(self, value: float): - self.__move_action_goal.request.max_cartesian_speed = value - @property def num_planning_attempts(self) -> int: return self.__move_action_goal.request.num_planning_attempts