- This is a c++ driver for Robotiq 2-finger 850 gripper under Linux.
- For Windows user, just modify the COM port.
- This package requried 3rd party library, Boost. Be sure your Boost was well installed before building the package.
- The following contains some basic control using modbus RTU communication instructions to control robotiq 2-finger 850 gripper.
Howard Chen, howardchen.ece04g@g2.nctu.edu.tw, National Chaio Tung University, Taiwan.
- Just create
/build
andcmake..
, thenmake
- [Note] Be sure to check your port
/dev/ttyUSB0
or/dev/ttyUSB1
orCOM3
etc. - The program will activate and open with full speed&force. Then press
enter
to close and open the gripper,q
to quit program. - Because this program will access hardware device
/dev/ttyUSBx
,which belongs to thedialout
group. Therefore, run withsudo
or if you are non root user, be sure to contact your root user to add you into thedialout group
.
- Serial port terminal > Cannot open /dev/ttyS0: Permission denied
- How to allow a non-default user to use serial device ttyUSB0
The following table describes the connection requirements for controlling the Gripper using the Modbus RTU protocol.
PROPERTY | VALUE |
---|---|
Physical Interface | RS-485 |
Baud Rate | 115,200 bps |
Data Bits | 8 |
Stop Bits | 1 |
Parity | None |
Supported Functions | Read Holding Register(FC03) Press Single Register(FC06) Preset Multiple Register(FC16) Master read & write multiple registers (FC23) |
Exception Response | Not Supported |
Slave ID | 0x0009 |
Robot output / Gripper input First Register | 0x03E8(1000) |
Robot input / Gripper output First Register | 0x07D0(2000) |
1. Activation
- Request :
09 10 03 E8 00 03 06 00 00 00 00 00 00 73 30
- Response :
09 10 03 E8 00 03 01 30
2. Read Gripper status until the activation is completed
- Request :
09 03 07 D0 00 01 85 CF
- Response :
09 03 02 11 00 55 D5
(The activation is not completed)09 03 02 31 00 4C 15
(The activation is completed)
3. Close with full speed&force
- Request :
09 10 03 E8 00 03 06 09 00 00 FF FF FF 42 29
- Response :
09 10 03 E8 00 03 01 30
4. Read status until closing is complete
- Request :
09 03 07 D0 00 03 04 0E
- Response :
09 03 06 39 00 00 FF 0E 0A F7 8B
(Closing is not completed)09 03 06 B9 00 00 FF BD 00 1D 7C
(Closing is completed)
- Request :
09 10 03 E8 00 03 06 09 00 00 00 FF FF 72 19
- Response:
09 10 03 E8 00 03 01 30
6. Read status until opening is complete
- Request:
09 03 07 D0 00 03 04 0E
- Response:
09 03 06 39 00 00 00 BB 10 30 E0
(Opening is not completed)09 03 06 F9 00 00 00 0D 00 56 4C
(Opening is completed)
- For more details, please check Robotiq Official Website