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.
57
+
## Connection modes
58
+
59
+
You can run the gripper in three ways.
60
+
61
+
### Without the physical hardware
62
+
63
+
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.
69
+
70
+
### Modbus RTU
71
+
72
+
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:
73
+
74
+
Computer → USB adapter ↔ RS485 ↔ Hand-E gripper
75
+
76
+
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:
93
+
```bash
94
+
sudo usermod -a -G dialout $USER
95
+
```
96
+
97
+
### Modbus RTU tunneled over TCP via UR Tool Communication
98
+
99
+
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:
100
+
101
+
UR controller RS-485 tool port ↔ URCap forwarder ↔ TCP socket ↔ Computer
102
+
103
+
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`.
104
+
105
+
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**!
126
+
> Both options will invoke the `socat` command to create the `/tmp/ttyUR` virtual serial port.
127
+
> However, the initialization of the Hand-E driver may suffer from a race condition: **the tty link must exist before initialization**.
128
+
> It is recommended to use the provided `create_socat_tty` option.
129
+
130
+
## Integration with (other) robots
131
+
132
+
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.
133
+
134
+
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.
135
+
136
+
Next, include this Xacro file in your main robot description tree at the appropriate tool link.
137
+
138
+
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).
139
+
140
+
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.
141
+
142
+
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)
143
+
144
+
> [!IMPORTANT]
145
+
> The `robotiq_hande_driver` currently provides only a **hardware component** (i.e. _hardware interface_) to control the fingers' joints.
146
+
147
+
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.
68
148
69
149
---
70
150
## Development notes
@@ -88,4 +168,5 @@ cd ~/ceai/ros_ws/build/robotiq_hande_driver
88
168
89
169
---
90
170
## License
171
+
91
172
This repository is licensed under the Apache 2.0, see LICENSE for details.
*`SocatManager` for managing the external `socat` process.
14
16
* Added colored logging.
@@ -20,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
22
### Changed
21
23
22
24
*[PR-26](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/26) - Migration from ROS 2 Humble to ROS 2 Jazzy.
25
+
*[PR-27](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/27) - Renamed `ip_adress` to `socat_ip_address` and `port` to `socat_port`.
23
26
*[PR-21](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/21) - Refactored the modbus communication to use multithreads:
24
27
* Renamed `application.hpp/cpp` to `hande_gripper.hpp/cpp`.
25
28
* Changed plain arrays `uint8_t bytes_[]` into `std::array<uint8_t, *>`.
@@ -37,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
37
40
38
41
### Fixed
39
42
43
+
*[PR-25](https://github.com/AGH-CEAI/robotiq_hande_driver/pull/25) - Fixed wrong type for the force command interface (from `HW_IF_POSITION` to `HW_IF_EFFORT`).
0 commit comments