@@ -807,7 +807,7 @@ def set_position(self, x=None, y=None, z=None, roll=None, pitch=None, yaw=None,
807807
808808 def set_tool_position (self , x = 0 , y = 0 , z = 0 , roll = 0 , pitch = 0 , yaw = 0 ,
809809 speed = None , mvacc = None , mvtime = None , is_radian = None ,
810- wait = False , timeout = None , ** kwargs ):
810+ wait = False , timeout = None , radius = None , ** kwargs ):
811811 """
812812 Movement relative to the tool coordinate system
813813 Note:
@@ -828,6 +828,13 @@ def set_tool_position(self, x=0, y=0, z=0, roll=0, pitch=0, yaw=0,
828828 :param is_radian: the roll/pitch/yaw in radians or not, default is self.default_is_radian
829829 :param wait: whether to wait for the arm to complete, default is False
830830 :param timeout: maximum waiting time(unit: second), default is None(no timeout), only valid if wait is True
831+ :param radius: move radius, if radius is None or radius less than 0, will MoveToolLine, else MoveToolArcLine
832+ only available if firmware_version >= 1.10.110
833+ MoveToolLine: Linear motion
834+ ex: code = arm.set_tool_position(..., radius=None)
835+ MoveToolArcLine: Linear arc motion with interpolation
836+ ex: code = arm.set_tool_position(..., radius=0)
837+ Note: Need to set radius>=0
831838 :param kwargs: reserved
832839 :return: code
833840 code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
@@ -836,9 +843,9 @@ def set_tool_position(self, x=0, y=0, z=0, roll=0, pitch=0, yaw=0,
836843 """
837844 return self ._arm .set_tool_position (x = x , y = y , z = z , roll = roll , pitch = pitch , yaw = yaw ,
838845 speed = speed , mvacc = mvacc , mvtime = mvtime ,
839- is_radian = is_radian , wait = wait , timeout = timeout , ** kwargs )
846+ is_radian = is_radian , wait = wait , timeout = timeout , radius = radius , ** kwargs )
840847
841- def get_servo_angle (self , servo_id = None , is_radian = None ):
848+ def get_servo_angle (self , servo_id = None , is_radian = None , is_real = False ):
842849 """
843850 Get the servo angle
844851 Note:
@@ -853,7 +860,7 @@ def get_servo_angle(self, servo_id=None, is_radian=None):
853860 :return: tuple((code, angle list if servo_id is None or 8 else angle)), only when code is 0, the returned result is correct.
854861 code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
855862 """
856- return self ._arm .get_servo_angle (servo_id = servo_id , is_radian = is_radian )
863+ return self ._arm .get_servo_angle (servo_id = servo_id , is_radian = is_radian , is_real = is_real )
857864
858865 def set_servo_angle (self , servo_id = None , angle = None , speed = None , mvacc = None , mvtime = None ,
859866 relative = False , is_radian = None , wait = False , timeout = None , radius = None , ** kwargs ):
@@ -936,7 +943,8 @@ def set_servo_cartesian(self, mvpose, speed=None, mvacc=None, mvtime=0, is_radia
936943 return self ._arm .set_servo_cartesian (mvpose , speed = speed , mvacc = mvacc , mvtime = mvtime , is_radian = is_radian ,
937944 is_tool_coord = is_tool_coord , ** kwargs )
938945
939- def move_circle (self , pose1 , pose2 , percent , speed = None , mvacc = None , mvtime = None , is_radian = None , wait = False , timeout = None , ** kwargs ):
946+ def move_circle (self , pose1 , pose2 , percent , speed = None , mvacc = None , mvtime = None , is_radian = None ,
947+ wait = False , timeout = None , is_tool_coord = False , is_axis_angle = False , ** kwargs ):
940948 """
941949 The motion calculates the trajectory of the space circle according to the three-point coordinates.
942950 The three-point coordinates are (current starting point, pose1, pose2).
@@ -950,13 +958,17 @@ def move_circle(self, pose1, pose2, percent, speed=None, mvacc=None, mvtime=None
950958 :param is_radian: roll/pitch/yaw value is radians or not, default is self.default_is_radian
951959 :param wait: whether to wait for the arm to complete, default is False
952960 :param timeout: maximum waiting time(unit: second), default is None(no timeout), only valid if wait is True
961+ :param is_tool_coord: is tool coord or not, default is False, only available if firmware_version >= 1.10.110
962+ :param is_axis_angle: is axis angle or not, default is False, only available if firmware_version >= 1.10.110
953963 :param kwargs: reserved
954964 :return: code
955965 code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
956966 code < 0: the last_used_tcp_speed/last_used_tcp_acc will not be modified
957967 code >= 0: the last_used_tcp_speed/last_used_tcp_acc will be modified
958968 """
959- return self ._arm .move_circle (pose1 , pose2 , percent , speed = speed , mvacc = mvacc , mvtime = mvtime , is_radian = is_radian , wait = wait , timeout = timeout , ** kwargs )
969+ return self ._arm .move_circle (pose1 , pose2 , percent , speed = speed , mvacc = mvacc , mvtime = mvtime ,
970+ is_radian = is_radian , wait = wait , timeout = timeout ,
971+ is_tool_coord = is_tool_coord , is_axis_angle = is_axis_angle , ** kwargs )
960972
961973 def move_gohome (self , speed = None , mvacc = None , mvtime = None , is_radian = None , wait = False , timeout = None , ** kwargs ):
962974 """
@@ -2395,7 +2407,7 @@ def config_cgpio_reset_when_stop(self, on_off):
23952407 return self ._arm .config_io_reset_when_stop (0 , on_off )
23962408
23972409 def set_position_aa (self , axis_angle_pose , speed = None , mvacc = None , mvtime = None ,
2398- is_radian = None , is_tool_coord = False , relative = False , wait = False , timeout = None , ** kwargs ):
2410+ is_radian = None , is_tool_coord = False , relative = False , wait = False , timeout = None , radius = None , ** kwargs ):
23992411 """
24002412 Set the pose represented by the axis angle pose
24012413
@@ -2408,12 +2420,19 @@ def set_position_aa(self, axis_angle_pose, speed=None, mvacc=None, mvtime=None,
24082420 :param relative: relative move or not
24092421 :param wait: whether to wait for the arm to complete, default is False
24102422 :param timeout: maximum waiting time(unit: second), default is None(no timeout), only valid if wait is True
2423+ :param radius: move radius, if radius is None or radius less than 0, will MoveLineAA, else MoveArcLineAA
2424+ only available if firmware_version >= 1.10.110
2425+ MoveLineAA: Linear motion
2426+ ex: code = arm.set_position_aa(..., radius=None)
2427+ MoveArcLineAA: Linear arc motion with interpolation
2428+ ex: code = arm.set_position_aa(..., radius=0)
2429+ Note: Need to set radius>=0
24112430 :return: code
24122431 code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
24132432 """
24142433 return self ._arm .set_position_aa (axis_angle_pose , speed = speed , mvacc = mvacc , mvtime = mvtime ,
24152434 is_radian = is_radian , is_tool_coord = is_tool_coord , relative = relative ,
2416- wait = wait , timeout = timeout , ** kwargs )
2435+ wait = wait , timeout = timeout , radius = radius , ** kwargs )
24172436
24182437 def set_servo_cartesian_aa (self , axis_angle_pose , speed = None , mvacc = None , is_radian = None , is_tool_coord = False , relative = False , ** kwargs ):
24192438 """
@@ -3501,7 +3520,7 @@ def set_allow_approx_motion(self, on_off):
35013520 """
35023521 return self ._arm .set_allow_approx_motion (on_off )
35033522
3504- def get_joint_states (self , is_radian = None ):
3523+ def get_joint_states (self , is_radian = None , num = 3 ):
35053524 """
35063525 Get the joint states
35073526 Note:
@@ -3514,7 +3533,7 @@ def get_joint_states(self, is_radian=None):
35143533 velocity: the velocities of joints, like [velo-1, ..., velo-7]
35153534 effort: the efforts of joints, like [effort-1, ..., effort-7]
35163535 """
3517- return self ._arm .get_joint_states (is_radian = is_radian )
3536+ return self ._arm .get_joint_states (is_radian = is_radian , num = num )
35183537
35193538 def iden_joint_friction (self , sn = None ):
35203539 """
0 commit comments