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
add global ik_reference to prevent elbow/wrist flipping
- Global ik_reference on URRobot (constructor, property, from_config)
- ik_reference in config.yaml for persistent setup
- ik_reference in CLI teach pendant (reads config, shows at boot)
- Per-call ik_reference parameter on move_to, move_relative, move_sequence
- README documentation with recommendation to always use ik_reference
- 21 unit tests for move_sequence with ik_reference
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.3.20] — 2026-07-27
9
+
10
+
### Added
11
+
- Global `ik_reference` setting on `URRobot` — set once, applies to all motion commands (`move_to`, `move_relative`, `move_sequence`) to prevent elbow/wrist flipping (IK ambiguity)
12
+
-`ik_reference` in config.yaml and `from_config()` — persistent setup without code changes
13
+
-`ik_reference` in CLI teach pendant — reads from config.yaml, shows at boot
14
+
- Per-call `ik_reference` parameter on `move_to()`, `move_relative()`, `move_sequence()` — override global default per move
15
+
- README documentation with recommendation to always use `ik_reference` for stable motion
Copy file name to clipboardExpand all lines: README.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -398,6 +398,43 @@ robot.move_relative(delta_z=0.05) # 5cm along tool Z
398
398
-**BASE** (default): delta relative to robot base
399
399
-**TOOL**: delta relative to TCP orientation
400
400
401
+
#### IK Reference (recommended)
402
+
403
+
**Problem:** When the robot has multiple valid joint configurations to reach the same TCP pose (e.g., elbow up vs. elbow down), it can unexpectedly flip its posture between moves. This is called an **IK ambiguity** and it causes "weird" movements where the robot takes a strange path or flips its wrist.
404
+
405
+
**Solution:** Set an **IK reference posture** — a saved point that defines your preferred arm configuration. The robot then stays close to that posture for all moves.
406
+
407
+
```python
408
+
# 1. Put the robot in your preferred posture (e.g., "home")
409
+
# 2. Save it: robot.save_point("home")
410
+
# 3. Set as IK reference:
411
+
robot.ik_reference ="home"
412
+
413
+
# Now all moves stay close to that posture — no elbow flipping
414
+
robot.move_to("pick")
415
+
robot.move_to("place")
416
+
robot.move_relative(delta_z=-0.05)
417
+
```
418
+
419
+
**In config.yaml** (recommended for permanent setup):
420
+
421
+
```yaml
422
+
robot_ip: 192.168.1.50
423
+
ik_reference: home # prevents weird elbow/wrist flips
424
+
```
425
+
426
+
**How it works:** The robot's inverse kinematics solver uses the reference posture as a bias (`qnear`). The TCP still reaches the exact same pose, but the arm configuration (elbow up/down, wrist orientation) stays consistent with your reference.
427
+
428
+
**Per-move override:**
429
+
430
+
```python
431
+
robot.ik_reference = "home" # global default
432
+
robot.move_to("weird_pose", ik_reference=None) # one move without it
433
+
robot.move_to("back", ik_reference="current") # use current joints
434
+
```
435
+
436
+
**When to use it:** Almost always. If you've ever seen the robot move in a way that looked "wrong" or flipped its elbow unexpectedly, this is what fixes it. Set it once in config.yaml and forget about it.
437
+
401
438
#### Points are tool-agnostic
402
439
403
440
Points are stored in the active TCP frame, so they work with any tool. If you swap grippers and set the correct TCP offset, your saved points remain valid.
@@ -563,6 +600,7 @@ URKit searches for `config.yaml` in this order:
563
600
| `robot_ip` | Robot IP address | `192.168.1.50` |
0 commit comments