Skip to content

Commit

Permalink
Added setting of cartesian speed and acceleration (#53)
Browse files Browse the repository at this point in the history
* added re-use of max_velocity_scaling_factor and max_acceleration_scaling_factor from move_action goal to cartesian_path_request

* 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.
  • Loading branch information
Zarnack authored and AndrejOrsula committed May 10, 2024
1 parent d168d4c commit 316a433
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pymoveit2/moveit2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,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
)
Expand Down Expand Up @@ -2152,14 +2161,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
Expand Down

0 comments on commit 316a433

Please sign in to comment.