You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,28 +13,14 @@ Package for controlling the [Robotiq Hand-E gripper](https://robotiq.com/product
13
13
14
14
## Quick Start
15
15
16
-
### Connection Setup
16
+
### Workspace setup
17
17
18
-
#### Without Physical Hardware
19
-
* You are ready to go - just remember to pass the `use_fake_hardware:=true` argument.
20
-
21
-
#### Modbus RTU
22
-
* Connect the serial port to your system and locate the TTY device (typically `/dev/ttyX`).
23
-
* You will need to configure the serial connection in your `.xacro.urdf` file ([example](https://github.com/AGH-CEAI/robotiq_hande_description/blob/humble/urdf/robotiq_hande_gripper.urdf.xacro) in `robotiq_hande_description`).
24
-
25
-
#### Modbus TCP
26
-
* You can create a local `TCP` <-> `Virtual Serial Port` server with the `socat` command.
27
-
* An example usage (in the form of a Python ROS 2 wrapper) can be found in `ur_robot_driver`'s [scripts/tool_communication.py](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/blob/204e215c8a7371f6357e6a09f7e106364e566931/ur_robot_driver/scripts/tool_communication.py#L64).
**An example integration usage can be find** in the [AGH-CEAI/aegis_ros](https://github.com/AGH-CEAI/aegis_ros) repository.
48
+
## Connection modes
49
+
50
+
You can run the gripper in three ways.
51
+
52
+
### Without the physical hardware
53
+
54
+
If you only want to test the gripper behavior or visualize it in RViz without connecting to the actual device, you can use the fake hardware mode. In this case, simply pass the `use_fake_hardware:=true` argument:
All other connection options will be ignored; this mode does not communicate with any physical port or network but simulates responses and allows the controller to run.
60
+
61
+
### Modbus RTU
62
+
63
+
If you want to work with the real gripper via direct serial communication, the computer connects to the gripper through a USB-to-RS485 adapter. The wiring is represented as:
64
+
65
+
Computer → USB adapter ↔ RS485 ↔ Hand-E gripper
66
+
67
+
In this case, you need to set `use_fake_hardware:=false` and provide serial port to establish connection using `tty_port`:
Make sure your user has permissions to access the serial port:
84
+
```bash
85
+
sudo usermod -a -G dialout $USER
86
+
```
87
+
88
+
### Modbus RTU tunneled over TCP via UR Tool Communication
89
+
90
+
If your setup involves a UR robot, its controller can expose the RS-485 tool port over TCP using the pTool Communication URCap](https://docs.universal-robots.com/Universal_Robots_ROS2_Documentation/doc/ur_robot_driver/ur_robot_driver/doc/setup_tool_communication.html). The wiring is represented as:
91
+
92
+
UR controller RS-485 tool port ↔ URCap forwarder ↔ TCP socket ↔ Computer
93
+
94
+
Although this is a TCP connection, the driver uses a pseudo-TTY to translate TCP packets into RTU frames. Typically, the virtual serial port is `/tmp/ttyUR`.
95
+
96
+
To enable this mode, set `use_fake_hardware:=false`, `create_socat_tty:=true`, and specify the `socat_ip_address` and `socat_port` of the UR forwarder:
> Do not use both the `use_tool_communication:=true` flag for the **ur_driver** and the `create_socat_tty:=true` flag for the **robotiq_hande_driver**!
117
+
> Both options will invoke the `socat` command to create the `/tmp/ttyUR` virtual serial port.
118
+
> However, the initialization of the Hand-E driver may suffer from a race condition: **the tty link must exist before initialization**.
119
+
> It is recommended to use the provided `create_socat_tty` option.
120
+
121
+
## Integration with (other) robots
122
+
123
+
To integrate the Robotiq Hand-E gripper into your existing robot, you first need to create a [Xacro (URDF) file](https://docs.ros.org/en/humble/Tutorials/Intermediate/URDF/URDF-Main.html) that includes the Hand-E macros and defines all necessary parameters.
124
+
125
+
A working example of such a file can be found [here](https://github.com/AGH-CEAI/aegis_ros/blob/humble-devel/aegis_description/urdf/modules/robotiq_hande_gripper.xacro). You can use this file as a starting point for your own integration.
126
+
127
+
Next, include this Xacro file in your main robot description tree at the appropriate tool link.
128
+
129
+
An example of including it in a robot Xacro can be found [here](https://github.com/AGH-CEAI/aegis_ros/blob/humble-devel/aegis_description/urdf/aegis.xacro).
130
+
131
+
The included robotiq_hande_gripper macro automatically sets up the `<ros2_control>` block pointing to the Robotiq Hand-E driver plugin. This ensures that your robot can control the gripper via the standard ROS 2 control interfaces.
132
+
133
+
You can easliy dig into the `ros2_control` concepts with [its documentation](https://control.ros.org/rolling/doc/ros2_control/doc/index.html#concepts). There is also a [plenty of examples](https://control.ros.org/humble/doc/ros2_control_demos/doc/index.html#examples)
134
+
135
+
> [!IMPORTANT]
136
+
> The `robotiq_hande_driver` currently provides only a **hardware component** (i.e. _hardware interface_) to control the fingers' joints.
137
+
138
+
The included `robotiq_hande_gripper` macro automatically sets up the `<ros2_control>` block pointing to the Robotiq Hand-E driver plugin. This ensures that your robot can control the gripper via the standard ROS 2 control interfaces, including the gripper action controller and joint state broadcaster, without additional manual plugin configuration.
59
139
60
140
---
61
141
## Development notes
@@ -79,4 +159,5 @@ cd ~/ceai/ros_ws/build/robotiq_hande_driver
79
159
80
160
---
81
161
## License
162
+
82
163
This repository is licensed under the Apache 2.0, see LICENSE for details.
0 commit comments