- Robotiq 2F-140
- Robotiq Hand-E
Voltage Input: 24V
Current Input: 1A
details see in 3.2 Required Tools and Equipment
USB to RS-485
Then connect the USB to the computer and control it directly through the serial port. After the power is connected, the indicator light is red, and then after connecting to the computer, the indicator light is blue when working. If the indicator light turns purple, there is a problem with the system and it needs to be restarted.
Download Robotiq Gripper.pdf
git clone https://github.com/ChangerC77/Robotiq-Gripper.git
- conda
conda install pyserial
- pip
pip install pyserial # python2
pip3 install pyserial # python3
ls -l /dev/ttyUSB0
output
crw-rw---- 1 root dialout 188, 0 3月 9 11:50 /dev/ttyUSB0
sudo chmod 777 /dev/ttyUSB0
ls -l /dev/ttyUSB0
output
crwxrwxrwx 1 root dialout 188, 0 3月 9 11:50 /dev/ttyUSB0
python gripper_activate.py
output
b'\t\x10\x03\xe8\x00\x03\x010'
activate response b'091003e800030130'
python gripper_open.py
output
opening the gripper
open gripper respons应 b'091003e800030130'
python gripper_close.py
output
closing the gripper
close response b'091003e800030130'
python gripper_move.py
python gripper_info.py
output
gOBJ_desc 的值是: Fingers have stopped due to a contact while closing before requested position. Object detected closing
物体检测状态 (gOBJ): 2
当前电流 (mA): 40 mA
当前夹爪位置: 168
python gripper_tele.py
python gripper_keyboard.py
python gripper_force_control.py
python gripper_force_control_node.py
python tactile_pub.py
python tactile_sub.py
python windows.py
range: 0 - 255 -> 0 - FF
255, FF: Full closed, velocity, force
python protocol.py
09 10 03 E8 00 03 06 00 00 00 00 00 00 73 30
The following 4229 is the check code, which needs to be calculated based on the previous HEX representation. The calculation format is hexadecimal (CRC16)(MODBUS RTU communication)
Official Reference: https://blog.robotiq.com/controlling-the-robotiq-2f-gripper-with-modbus-commands-in-python
09 10 03 E8 00 03 06 09 00 00 FF FF FF 42 29
09 10 03 E8 00 03 06 09 00 00 FF FF 80 03 C9
2. The maximum position is 255. When judging the opening position, the larger the value, the smaller the opening position.
There are some examples
# 50 / 255
self.ser.write(b'\x09\x10\x03\xE8\x00\x03\x06\x09\x00\x00\x32\xFF\xFF\xD3\xD6')
# 70 / 255
self.ser.write(b'\x09\x10\x03\xE8\x00\x03\x06\x09\x00\x00\x46\xFF\xFF\x93\xCC')
# 100 / 255
self.ser.write(b'\x09\x10\x03\xE8\x00\x03\x06\x09\x00\x00\x64\xFF\xFF\x33\xC6')
# 150 / 255
self.ser.write(b'\x09\x10\x03\xE8\x00\x03\x06\x09\x00\x00\x96\xFF\xFF\x92\x35')






