Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-ubuntu20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
ref:
description: Git ref to build
required: true
default: v2.0.0
default: v2.0.1
version:
description: Release version without the v prefix
required: true
default: 2.0.0
default: 2.0.1

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion packages/gripper_action_controller/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "forge-gripper-action-controller"
version = "2.0.0"
version = "2.0.1"
description = "Dora GripperCommand controller for Forge robotics dataflows."
readme = "README.md"
requires-python = ">=3.12"
Expand Down
2 changes: 1 addition & 1 deletion packages/joint_trajectory_controller/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "forge-joint-trajectory-controller"
version = "2.0.0"
version = "2.0.1"
description = "Dora FollowJointTrajectory controller for Forge robotics dataflows."
readme = "README.md"
requires-python = ">=3.12"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ def tick(self, now_ns: int) -> ControllerOutput | None:
# conditions abort the motion: a hard deviation, or a stalled plant.
self._history.append((now_ns, tuple(self._actual.positions)))
window_start_ns = now_ns - self.config.stuck_window_ns
while self._history and self._history[0][0] < window_start_ns:
# Keep the newest sample at or before the start of the window.
while len(self._history) > 1 and self._history[1][0] <= window_start_ns:
self._history.popleft()

worst_index = max(
Expand Down Expand Up @@ -337,7 +338,10 @@ def _stalled(
if len(self._history) < 2 or self._actual is None:
return False
oldest_ns, oldest_positions = self._history[0]
window_elapsed_ns = max(0, elapsed_ns - (now_ns - oldest_ns))
observed_ns = now_ns - oldest_ns
if observed_ns < self.config.stuck_window_ns:
return False
window_elapsed_ns = max(0, elapsed_ns - observed_ns)
reference_old = sample_trajectory(active.trajectory, window_elapsed_ns)
reference_moved = max(
abs(current - previous)
Expand Down
15 changes: 7 additions & 8 deletions packages/joint_trajectory_controller/tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,15 @@ def test_stalled_plant_aborts_after_the_window() -> None:
controller.update_joint_state(_state(), 0)
assert controller.accept_goal("goal", _goal(duration_ns=2_000_000_000), 0) is None

result = None
for elapsed_ns in range(0, 1_000_000_000, 50_000_000):
controller.update_joint_state(_state(positions=(0.0, 0.0)), elapsed_ns)
for elapsed_ns in (0, 50_000_000, 100_000_000, 199_000_000):
controller.update_joint_state(_state(), elapsed_ns)
output = controller.tick(elapsed_ns)
if output is not None and output.result is not None:
result = output
break
assert output is not None and output.result is None

assert result is not None, "a frozen plant must abort instead of finishing silently"
assert result.result is not None
# The first tick after the window has elapsed is slightly late.
controller.update_joint_state(_state(), 201_000_000)
result = controller.tick(201_000_000)
assert result is not None and result.result is not None
assert result.result.error_code == "PATH_TOLERANCE_VIOLATED"
assert "no measurable progress" in result.result.message

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "forge-controls"
version = "2.0.0"
version = "2.0.1"
description = "Reusable motion and control capabilities for Forge robotics dataflows."
readme = "README.md"
requires-python = ">=3.12"
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading