Skip to content

Commit bdde678

Browse files
committed
feat: add 6/7 keys for gripper speed/force, display force/speed on Gripper line, fix points_path for explorer
1 parent 163231b commit bdde678

6 files changed

Lines changed: 22 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [3.1] — 2026-07-03
8+
## [3.2] — 2026-07-03
9+
10+
### Added
11+
- `6`/`7` keys for gripper speed/force (prompt-based, Robotiq only)
12+
- Force/speed display on Gripper line (`F=100 S=100`)
13+
- Force/speed applied before each gripper operation (rq_set_force/rq_set_speed)
914

1015
### Fixed
1116
- Missing `points_path` argument in `_submenu_explore_points` (P key crash)
1217
- Redundant inline import of `load_config` in teach pendant
1318
- Redundant Enter key handler in points explorer (auto-refreshes every 2s)
1419

20+
## [3.1] — 2026-07-03
21+
1522
## [0.3.0] — 2026-06-19
1623

1724
### Added

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ All movement and orientation keys support **hold-to-repeat**.
165165
<tr><td><code>V</code></td><td>Set position (mm)</td></tr>
166166
<tr><td><code>6</code></td><td>Set speed (0-100)</td></tr>
167167
<tr><td><code>7</code></td><td>Set force (0-100)</td></tr>
168+
<tr><td colspan="3">Gripper line shows: `Connected 50.0mm (0%) F=100 S=100`</td></tr>
168169
</table>
169170
</td>
170171
<td align="center" style="width:33%">

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "urkit"
7-
version = "3.1"
7+
version = "3.2"
88
description = "Universal Robots e-Series control toolkit built on ur_rtde"
99
readme = "README.md"
1010
license = {text = "MIT"}

src/urkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
from __future__ import annotations
2626

27-
__version__ = "3.1"
27+
__version__ = "3.2"
2828

2929
from urkit.config import load_config, resolve_config
3030
from urkit.exceptions import (

src/urkit/cli/teach.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,16 @@ def _draw_screen(
305305
if robot.gripper:
306306
pos_mm = robot.gripper.get_position_mm()
307307
max_mm = robot.gripper.max_travel_mm()
308+
extra = ""
309+
if hasattr(robot.gripper, '_force'):
310+
extra += f" F={robot.gripper._force}"
311+
if hasattr(robot.gripper, '_speed'):
312+
extra += f" S={robot.gripper._speed}"
308313
if pos_mm is not None and max_mm is not None and max_mm > 0:
309314
pct = int((max_mm - pos_mm) / max_mm * 100)
310-
gripper_state = f"{green('Connected')} {pos_mm:.1f}mm ({pct}%)"
315+
gripper_state = f"{green('Connected')} {pos_mm:.1f}mm ({pct}%)" + extra
311316
else:
312-
gripper_state = green("Connected")
317+
gripper_state = f"{green('Connected')}" + extra
313318

314319
lines: list[str] = []
315320

@@ -845,7 +850,7 @@ def _submenu_explore_points(robot: URRobot, messages: list[str]) -> None:
845850
config = load_config()
846851
points_path = config.get("points_path") if config else None
847852
if points_path:
848-
points_path = Path(points_path).resolve()
853+
points_path = Path(str(points_path)).resolve() # type: ignore[arg-type]
849854
else:
850855
points_path = Path("points.db").resolve()
851856

src/urkit/gripper/robotiq.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def _build_script(self, function_call: str) -> str:
103103
The preamble defines all ``rq_*`` functions and initializes
104104
socket state. Two config lines override the mm range for
105105
the current gripper model before the function executes.
106+
Force and speed are set before each operation.
106107
107108
Args:
108109
function_call: A preamble function call (e.g. ``rq_open_and_wait()``).
@@ -114,6 +115,8 @@ def _build_script(self, function_call: str) -> str:
114115
ROBOTIQ_PREAMBLE
115116
+ "set_closed_mm(0.0, 1)\n"
116117
+ f"set_open_mm({self._max_mm}.0, 1)\n"
118+
+ f"rq_set_force({self._force}, 1)\n"
119+
+ f"rq_set_speed({self._speed}, 1)\n"
117120
+ f"{function_call}\n"
118121
)
119122

0 commit comments

Comments
 (0)