Robotiq gripper reported native range is 0–255 but actual reachable position is ~230
Hi,
when using the `RobotiqGripper` interface from **ur_rtde**, the gripper reports a native device range of **0–255**, but the actual reachable position appears to be lower (around **230** in my case).
When commanding `move(255)`, the gripper stops around **230** and never reaches the expected maximum value.
This creates inconsistencies when working with:
* `UNIT_DEVICE`
* `UNIT_NORMALIZED`
* `UNIT_MM`
because the library assumes a full **0–255** device range.
---
# Environment
```
OS: Ubuntu 24.04.3 LTS
ROS: ROS2 Jazzy
ur_rtde: 1.6.0
Robot: Universal Robots UR10e
Gripper: Robotiq 2F-140
Connection: Robotiq URCap socket interface
```
---
# Minimal Reproducible Example
```cpp
#include <ur_rtde/robotiq_gripper.h>
#include <iostream>
#include <thread>
#include <chrono>
using namespace ur_rtde;
int main()
{
std::cout << "Robotiq range test" << std::endl;
RobotiqGripper gripper("123.45.67.89", 63352, true);
gripper.connect();
std::cout << "Activating gripper..." << std::endl;
gripper.activate();
// Use raw device units
gripper.setUnit(RobotiqGripper::POSITION,
RobotiqGripper::UNIT_DEVICE);
// Print configured range
int min_native, max_native;
gripper.getNativePositionRange(min_native, max_native);
std::cout << "Configured native range: "
<< min_native << " - "
<< max_native << std::endl;
std::cout << std::endl;
// Try to close completely
std::cout << "Commanding position 255..." << std::endl;
gripper.move(255, 50, 50, RobotiqGripper::WAIT_FINISHED);
std::this_thread::sleep_for(std::chrono::milliseconds(200));
// Read raw device position
int pos = gripper.getVar("POS");
std::cout << "Requested position: 255" << std::endl;
std::cout << "Reported position: " << pos << std::endl;
if (pos != 255)
{
std::cout << "WARNING: position never reaches 255" << std::endl;
}
std::cout << std::endl;
gripper.open();
std::cout << "Disconnecting..." << std::endl;
gripper.disconnect();
return 0;
}
```
---
# Observed Output
```
Configured native range: 0 - 255
Commanding position 255...
RobotiqGripper::move: 255
Requested position: 255
Reported position: 230
WARNING: position never reaches 255
```
---
# Expected Behaviour
If the reported native range is **0–255**, commanding `move(255)` should result in a final reported position of **255**.
---
# Actual Behaviour
The gripper stops around **230**, even though the reported range is **0–255**.
---
# Additional Notes
This behaviour suggests that the actual physical range of the gripper may be smaller than the nominal device range. However, since the library reports a full **0–255** range through `getNativePositionRange()`, it can lead to incorrect scaling when using the higher-level unit conversions (`UNIT_NORMALIZED` or `UNIT_MM`).
# Question
Is this behaviour expected for the Robotiq gripper when using the URCap socket interface?
In other words, is it normal that the gripper never reaches the full device value `255` even though `getNativePositionRange()` reports a range of `0–255`?
If this is the intended behaviour, should users assume that the effective maximum position is lower than 255 and handle the scaling manually when using `UNIT_DEVICE`, `UNIT_NORMALIZED`, or `UNIT_MM`?
Alternatively, could this indicate that I am misusing the interface or missing some configuration or calibration step?
Any clarification on the correct interpretation of the device position range would be greatly appreciated.
issue