File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -551,6 +551,23 @@ def set_goal_tolerance(self, tol_list:list) -> None:
551551 :type tol_list: list
552552 """
553553 self .move_group .set_goal_tolerance (tol_list )
554+
555+ # set the move group end effector link
556+ def set_end_effector_link (self , new_link :str = None ):
557+ if new_link is None :
558+ rospy .logwarn (f"Provided link is NONE. Exiting unchanged" )
559+ return
560+
561+ # Debugging output for current end-effector
562+ rospy .loginfo (f"Current end effector configured: { self .move_group .get_end_effector_link ()} " )
563+
564+ # Set the new link (if valid)
565+ # NOTE: error's out if link is invalid
566+ # TODO: update to check a list of valid links prior to updating
567+ self .move_group .set_end_effector_link (new_link )
568+ self .END_EFFECTOR_LINK = self .move_group .get_end_effector_link ()
569+
570+ rospy .loginfo (f"Updated end-effector link is: { self .END_EFFECTOR_LINK } " )
554571
555572 # return a list of current joint, position and orientation goal tolerances
556573 def get_goal_tolerance (self ) -> list :
You can’t perform that action at this time.
0 commit comments