Skip to content

Commit a99f6e1

Browse files
authored
Merge pull request #3 from REF-RAS/release-0.1.x
Latest moveit commander has changed the parameters list for the funct…
2 parents d854ec5 + b083ce0 commit a99f6e1

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

arm_commander/commander_moveit.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,6 @@ def invoke_service(self, ns: str, cls, **kwargs) -> None:
616616
else:
617617
rospy.loginfo(f"[GeneralCommander::invoke_service][Service invoked successfully]")
618618

619-
620619
def controller_select(self, controller_type: ControllerState = ControllerState.TRAJECTORY) -> bool:
621620
"""Attempts to select a given controller via controller manager
622621
@@ -706,7 +705,8 @@ def move_displacement(self, dx=0.0, dy=0.0, dz=0.0, accept_fraction=0.9999, wait
706705
target_pose.pose.position.y += dy
707706
target_pose.pose.position.z += dz
708707
waypoints = [current_pose.pose, target_pose.pose]
709-
(plan, fraction) = self.move_group.compute_cartesian_path(waypoints, self.CARTE_PLANNING_STEP_SIZE, 0.00)
708+
# changed for new moveit version
709+
(plan, fraction) = self.move_group.compute_cartesian_path(waypoints, self.CARTE_PLANNING_STEP_SIZE)
710710
if fraction < accept_fraction:
711711
rospy.logerr(f'Planning failed')
712712
self.commander_state = GeneralCommanderStates.ABORTED
@@ -766,7 +766,8 @@ def move_to_position(self, x:float=None, y:float=None, z:float=None, accept_frac
766766
target_in_world_frame:PoseStamped = self.transform_pose(target_pose, self.WORLD_REFERENCE_LINK)
767767
waypoints = [current_in_world_frame.pose, target_in_world_frame.pose]
768768
self.commander_state = GeneralCommanderStates.BUSY
769-
(plan, fraction) = self.move_group.compute_cartesian_path(waypoints, self.CARTE_PLANNING_STEP_SIZE, 0.00)
769+
# changed for new moveit version
770+
(plan, fraction) = self.move_group.compute_cartesian_path(waypoints, self.CARTE_PLANNING_STEP_SIZE)
770771
if fraction < accept_fraction:
771772
rospy.logerr(f'The commander (move_to_position): planning failed due to collision ({fraction})')
772773
self.commander_state, self.commander_state.message = GeneralCommanderStates.ABORTED, 'PLANNING_FAILED_DUE_TO_COLLISION'
@@ -826,7 +827,8 @@ def move_to_multi_positions(self, xyz_list, reference_frame:str=None, wait=True)
826827
waypoints_list.append(waypoint_in_world_frame.pose)
827828

828829
self.commander_state = GeneralCommanderStates.BUSY
829-
(plan, fraction) = self.move_group.compute_cartesian_path(waypoints_list, self.CARTE_PLANNING_STEP_SIZE, 0.00)
830+
# changed for new moveit version
831+
(plan, fraction) = self.move_group.compute_cartesian_path(waypoints_list, self.CARTE_PLANNING_STEP_SIZE)
830832
if fraction < 0.999:
831833
rospy.logerr(f'The commander (move_to_multi_positions): planning failed due to collision ({fraction})')
832834
self.commander_state, self.commander_state.message = GeneralCommanderStates.ABORTED, 'PLANNING_FAILED_DUE_TO_COLLISION'
@@ -1008,7 +1010,8 @@ def move_to_multi_poses(self, waypoints_list, reference_frame:str=None, wait=Tru
10081010
processed_waypoints_list.append(waypoint_in_world_frame.pose)
10091011

10101012
self.commander_state = GeneralCommanderStates.BUSY
1011-
(plan, fraction) = self.move_group.compute_cartesian_path(processed_waypoints_list, self.CARTE_PLANNING_STEP_SIZE, 0.00)
1013+
# changed for new moveit version
1014+
(plan, fraction) = self.move_group.compute_cartesian_path(processed_waypoints_list, self.CARTE_PLANNING_STEP_SIZE)
10121015
if fraction < 0.999:
10131016
rospy.logerr(f'The commander (move_to_multi_poses): planning failed due to collision ({fraction})')
10141017
self.commander_state, self.commander_state.message = GeneralCommanderStates.ABORTED, 'PLANNING_FAILED_DUE_TO_COLLISION'

0 commit comments

Comments
 (0)