@@ -104,6 +104,7 @@ def __init__(self, port=None, is_radian=False, do_not_open=False, **kwargs):
104104 'get_ft_senfor_config' : self .get_ft_sensor_config ,
105105 'shutdown_system' : self .system_control ,
106106 'set_bio_gripper_position' : self .set_bio_gripper_g2_position ,
107+ 'get_bio_gripper_position' : self .get_bio_gripper_g2_position ,
107108 }
108109
109110 def __getattr__ (self , item ):
@@ -1821,20 +1822,29 @@ def set_gripper_mode(self, mode, **kwargs):
18211822
18221823 def get_gripper_position (self , ** kwargs ):
18231824 """
1824- Get the gripper position
1825+ Get the gripper position (pulse)
18251826
18261827 :return: tuple((code, pos)), only when code is 0, the returned result is correct.
18271828 code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
18281829 """
18291830 return self ._arm .get_gripper_position (** kwargs )
18301831
1832+ def get_gripper_g2_position (self , ** kwargs ):
1833+ """
1834+ Get the position (mm) of the xArm Gripper G2
1835+
1836+ :return: tuple((code, pos)), only when code is 0, the returned result is correct.
1837+ code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
1838+ """
1839+ return self ._arm .get_gripper_g2_position (** kwargs )
1840+
18311841 def set_gripper_position (self , pos , wait = False , speed = None , auto_enable = False , timeout = None , ** kwargs ):
18321842 """
18331843 Set the gripper position
18341844
18351845 :param pos: pos
18361846 :param wait: wait or not, default is False
1837- :param speed: speed,unit:r/min
1847+ :param speed: speed, unit:r/min
18381848 :param auto_enable: auto enable or not, default is False
18391849 :param timeout: wait time, unit:second, default is 10s
18401850 :return: code
@@ -1844,7 +1854,7 @@ def set_gripper_position(self, pos, wait=False, speed=None, auto_enable=False, t
18441854
18451855 def set_gripper_g2_position (self , pos , speed = 100 , force = 50 , wait = False , timeout = None , ** kwargs ):
18461856 """
1847- Set the position of xArm Gripper G2
1857+ Set the position of the xArm Gripper G2
18481858
18491859 :param pos: gripper pos between 0 and 84, (unit: mm)
18501860 :param speed: gripper speed between 15 and 225, default is 100, (unit: mm/s)
@@ -2859,6 +2869,15 @@ def set_bio_gripper_force(self, force):
28592869
28602870 return self ._arm .set_bio_gripper_force (force )
28612871
2872+ def get_bio_gripper_g2_position (self , ** kwargs ):
2873+ """
2874+ Get the position (mm) of the BIO Gripper G2
2875+
2876+ :return: tuple((code, pos)), only when code is 0, the returned result is correct.
2877+ code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
2878+ """
2879+ return self ._arm .get_bio_gripper_g2_position (** kwargs )
2880+
28622881 def set_bio_gripper_g2_position (self , pos , speed = 2000 , force = 100 , wait = True , timeout = 5 , ** kwargs ):
28632882 """
28642883 Set the position of BIO Gripper G2
@@ -2990,7 +3009,7 @@ def getset_tgpio_modbus_data(self, datas, min_res_len=0, host_id=9, is_transpare
29903009 :param min_res_len: the minimum length of modbus response data. Used to check the data length, if not specified, no check
29913010 :param host_id: host_id, default is 9 (TGPIO_HOST_ID)
29923011 9: END RS485
2993- 10 : CONTROLLER RS485
3012+ 11 : CONTROLLER RS485
29943013 :param is_transparent_transmission: whether to choose transparent transmission, default is False
29953014 Note: only available if firmware_version >= 1.11.0
29963015 :param use_503_port: whether to use port 503 for communication, default is False
@@ -3054,11 +3073,17 @@ def set_collision_tool_model(self, tool_type, *args, **kwargs):
30543073 self.set_collision_tool_model(21, radius=45, height=137)
30553074 :param radius: the radius of cylinder, (unit: mm)
30563075 :param height: the height of cylinder, (unit: mm)
3076+ :param x_offset: offset in the x direction, (unit: mm)
3077+ :param y_offset: offset in the y direction, (unit: mm)
3078+ :param z_offset: offset in the z direction, (unit: mm)
30573079 22: Cuboid, need additional parameters x, y, z
30583080 self.set_collision_tool_model(22, x=234, y=323, z=23)
30593081 :param x: the length of the cuboid in the x coordinate direction, (unit: mm)
30603082 :param y: the length of the cuboid in the y coordinate direction, (unit: mm)
30613083 :param z: the length of the cuboid in the z coordinate direction, (unit: mm)
3084+ :param x_offset: offset in the x direction, (unit: mm)
3085+ :param y_offset: offset in the y direction, (unit: mm)
3086+ :param z_offset: offset in the z direction, (unit: mm)
30623087 :param args: additional parameters
30633088 :param kwargs: additional parameters
30643089 :return: code
0 commit comments