delto_tcp_comm¶
Unified TCP communication library for all Delto grippers.
Note
For most users: You do not need to interact with this package directly. It is used internally by the delto_hardware package to communicate with the gripper firmware. This page is provided for developers who want to understand how the communication layer works.
Overview¶
The delto_tcp_comm package provides the DeltoTCP::Communication class, which handles all TCP communication between your computer and the Delto gripper firmware. It uses POSIX sockets (standard Linux system calls) for networking – no external libraries like Boost are required.
How It Works¶
When the gripper driver starts, the hardware interface creates a DeltoTCP::Communication instance and calls Connect() to establish a TCP connection to the gripper. Once connected, the communication loop works like this:
Read cycle:
GetData()sends a data request to the gripper and receives a response containing joint positions, velocities, currents, temperatures, sensor data, and GPIO states.Write cycle:
SendDuty()sends motor duty (current) commands to the gripper.
This cycle repeats at the controller manager’s update rate (typically 100-300 Hz).
Network Configuration¶
Setting |
Value |
Description |
|---|---|---|
Socket type |
POSIX (no Boost) |
Uses direct Linux system calls ( |
Receive timeout |
500ms ( |
Maximum wait time for a response from the gripper |
TCP Keepalive |
1s idle, 1s interval, 3 probes |
Detects cable disconnection within approximately 4 seconds |
TCP_NODELAY |
Enabled |
Disables Nagle’s algorithm for lower latency |
Note
What is TCP_NODELAY? By default, TCP buffers small packets and sends them together for efficiency (Nagle’s algorithm). For real-time robot control, this adds unacceptable latency. TCP_NODELAY disables this buffering so each command is sent immediately.
Key APIs¶
These are the main methods provided by the DeltoTCP::Communication class:
Method |
Description |
|---|---|
|
Open or close the TCP connection to the gripper |
|
Read all sensor data from the gripper (joints, F/T sensors, GPIO, etc.) |
|
Send motor duty commands to the gripper |
|
Query the gripper’s firmware version |
|
Zero-calibrate the fingertip F/T sensors |
|
Set the three GPIO output states |
|
Query what type of sensor is installed on the gripper |
|
Query which fingers have sensors installed (as a bitmask) |
Sensor Types¶
The gripper firmware reports its sensor type during the initial handshake. The communication library automatically parses the sensor data in the correct format:
Type |
Description |
Data per finger |
|---|---|---|
|
6-axis force/torque sensor |
6 doubles (fx, fy, fz, tx, ty, tz) |
|
3-axis force/torque sensor |
6 doubles (3 used, 3 unused) |
|
4-axis force/torque sensor |
6 doubles (4 used, 2 unused) |
|
3x5 tactile matrix sensor |
15 uint8 values per finger |
|
3x6 tactile matrix sensor |
18 uint16 values per finger |
The sensor type is detected automatically – you do not need to configure it manually.
Data Structure¶
The GetData() method returns a DeltoReceivedData structure containing:
Field |
Type |
Description |
|---|---|---|
|
|
Joint positions (radians) |
|
|
Joint velocities (radians/second) |
|
|
Motor currents (amperes) |
|
|
Motor temperatures (Celsius) |
|
|
F/T sensor data (N fingers x 6 values) |
|
|
GPIO states (3 outputs + 1 input) |
|
|
Tactile M sensor data |
|
|
Tactile S sensor data |
Only the sensor field matching the detected SensorType is populated. For example, if the gripper has FT_6AXIS sensors, the fingertip_sensor field contains data and the tactile_m and tactile_s fields are empty.