@@ -104,6 +104,7 @@ def __init__(self, port=None, is_radian=False, do_not_open=False, **kwargs):
104
104
'get_ft_senfor_config' : self .get_ft_sensor_config ,
105
105
'shutdown_system' : self .system_control ,
106
106
'set_bio_gripper_position' : self .set_bio_gripper_g2_position ,
107
+ 'get_bio_gripper_position' : self .get_bio_gripper_g2_position ,
107
108
}
108
109
109
110
def __getattr__ (self , item ):
@@ -1821,20 +1822,29 @@ def set_gripper_mode(self, mode, **kwargs):
1821
1822
1822
1823
def get_gripper_position (self , ** kwargs ):
1823
1824
"""
1824
- Get the gripper position
1825
+ Get the gripper position (pulse)
1825
1826
1826
1827
:return: tuple((code, pos)), only when code is 0, the returned result is correct.
1827
1828
code: See the [API Code Documentation](./xarm_api_code.md#api-code) for details.
1828
1829
"""
1829
1830
return self ._arm .get_gripper_position (** kwargs )
1830
1831
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
+
1831
1841
def set_gripper_position (self , pos , wait = False , speed = None , auto_enable = False , timeout = None , ** kwargs ):
1832
1842
"""
1833
1843
Set the gripper position
1834
1844
1835
1845
:param pos: pos
1836
1846
:param wait: wait or not, default is False
1837
- :param speed: speed,unit:r/min
1847
+ :param speed: speed, unit:r/min
1838
1848
:param auto_enable: auto enable or not, default is False
1839
1849
:param timeout: wait time, unit:second, default is 10s
1840
1850
:return: code
@@ -1844,7 +1854,7 @@ def set_gripper_position(self, pos, wait=False, speed=None, auto_enable=False, t
1844
1854
1845
1855
def set_gripper_g2_position (self , pos , speed = 100 , force = 50 , wait = False , timeout = None , ** kwargs ):
1846
1856
"""
1847
- Set the position of xArm Gripper G2
1857
+ Set the position of the xArm Gripper G2
1848
1858
1849
1859
:param pos: gripper pos between 0 and 84, (unit: mm)
1850
1860
: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):
2859
2869
2860
2870
return self ._arm .set_bio_gripper_force (force )
2861
2871
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
+
2862
2881
def set_bio_gripper_g2_position (self , pos , speed = 2000 , force = 100 , wait = True , timeout = 5 , ** kwargs ):
2863
2882
"""
2864
2883
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
2990
3009
:param min_res_len: the minimum length of modbus response data. Used to check the data length, if not specified, no check
2991
3010
:param host_id: host_id, default is 9 (TGPIO_HOST_ID)
2992
3011
9: END RS485
2993
- 10 : CONTROLLER RS485
3012
+ 11 : CONTROLLER RS485
2994
3013
:param is_transparent_transmission: whether to choose transparent transmission, default is False
2995
3014
Note: only available if firmware_version >= 1.11.0
2996
3015
: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):
3054
3073
self.set_collision_tool_model(21, radius=45, height=137)
3055
3074
:param radius: the radius of cylinder, (unit: mm)
3056
3075
: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)
3057
3079
22: Cuboid, need additional parameters x, y, z
3058
3080
self.set_collision_tool_model(22, x=234, y=323, z=23)
3059
3081
:param x: the length of the cuboid in the x coordinate direction, (unit: mm)
3060
3082
:param y: the length of the cuboid in the y coordinate direction, (unit: mm)
3061
3083
: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)
3062
3087
:param args: additional parameters
3063
3088
:param kwargs: additional parameters
3064
3089
:return: code
0 commit comments