Skip to content

fix(dual-franka): align RLinf v0.4 deployment and control diagnostics (v0.1) - #262

Open
NewYork424 wants to merge 29 commits into
RLinf:mainfrom
jx-qiu:nieyi/split-01-rlinf-v04
Open

NewYork424 wants to merge 29 commits into
RLinf:mainfrom
jx-qiu:nieyi/split-01-rlinf-v04

Conversation

@NewYork424

@NewYork424 NewYork424 commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Align dual-Franka deployment with official RLinf v0.4 robot interfaces while retaining full-resolution observations and the existing primitive result contracts.

  • Use supported arm, end-effector and synchronous joint-reset interfaces. Non-gripper commands hold the grippers without reissuing open/close commands.
  • Keep policy images and uncropped RGB-D from the same camera acquisition. Read remote-camera intrinsics through the existing connection, reject stale projection snapshots, and follow the single-Franka camera metadata field names.
  • Rotate through bounded orientation references using the existing RLinf action path. After rotation, reuse move_delta to correct residual position drift beyond the existing 0.006 m position tolerance. Drift above rotation_hold.max_drift_m (default: 0.10 m) aborts the call before translation compensation. Forward optional robot.compliance settings to the official backend.
  • Add a continuous VLA-only diagnostic runner, tests/e2e_tests/dual_franka/dual_franka_vla_only.py, reusing the existing diagnostic validators. It connects to existing services without resetting or recovering the robot and checks Ctrl-C/STOP between individual action RPCs. A read-only vla.status returns only the prediction chunk length required by this runner.
  • Include Task 6 for the two-cup sorting setup, reusing Task 4 and its deployed VLA instruction.

The existing dual_franka_vla.py console retains its 20-step validation default and explicit --expected-action-steps override. Motion results retain their existing fields; rotation reports success only when compensation, if needed, succeeds and the final position and angle meet their tolerances. During posture recovery, ordinary rotation accuracy remains diagnostic; protective drift errors interrupt the recovery.

Validation

  • Earlier PR-related offline tests: 199 passed, 4 skipped. The final rotation, threshold/configuration and related regression tests: 35 passed.
  • Full unit suite: 1216 passed, 5 skipped, 3 failed. All three failures also reproduce on the unchanged base: two require the unavailable lerobot.datasets dependency, and one depends on this machine's Codex tool list.
  • Both configured pre-commit Ruff hooks passed over all tracked files, with no file changes. Explicit file arguments were used because the local Git version does not support the --deduplicate option used by --all-files.
  • Combined test additions and deletions across fix(dual-franka): align RLinf v0.4 deployment and control diagnostics (v0.1) #262–265: 1167 lines.

Both English and Chinese Sphinx builds passed with warnings treated as errors. The example configuration and both deployment guides describe possible drift sources and distinguish the 0.10 m abort threshold from the 0.006 m compensation tolerance. This update does not claim new real-robot validation of its default. A stop request takes effect after any in-flight RPC returns; it is not a hardware emergency stop.

Consolidates #253 and #254, and replaces #252. Earlier discussion remains in #252.

Copilot AI balanced review requested due to automatic review settings October 10, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

status = model.status(timeout_s=10)
expected_steps = int(status["config"]["openpi"]["action_chunk"])
if expected_steps <= 0:
raise ValueError("expected action steps must be positive")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the default now requires vla.status, but both docs and tests' README.md still describe a fixed 20-step default

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

def build_parser():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
"--skill", choices=["vla_full_rollout"], default="vla_full_rollout"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will "--skill" change execution? Do we need it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted

from robots.dual_franka.tasks import get_dual_franka_task
from rpent.robots.components.pi05_vla_client import Pi05VLAClient
from rpent.utils.rpc import make_rpc_client
from tests.e2e_tests.dual_franka.dual_franka_vla import (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/README.md places real-robot diagnostics under tests/e2e_tests. could we put this script alongside dual_franka_vla.py, whose helpers it already uses?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread tests/e2e_tests/dual_franka/dual_franka_vla_only.py
Comment thread rpent/robots/components/pi05_vla_client.py

@pytest.mark.parametrize("embodiment", ["libero", "dual_franka", "robodojo", "yam"])
def test_cli_forwards_model_configuration(monkeypatch, embodiment):
@pytest.mark.parametrize("repo_id", [None, "test/dataset"])

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this test change for?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread robots/dual_franka/tools.py Outdated
delta_xyz: Annotated[list[float], Field(min_length=3, max_length=3)],
) -> ToolResult:
"""Move one Franka TCP by a bounded world-frame xyz delta in meters.
"""Move one Franka TCP by a bounded world-frame xyz delta in meters. Completion indicates execution ended; target_reached and final_error_m report accuracy, not a mandatory retry condition.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the added comment means?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

{
"name": "move_delta",
"description": "Move one Franka TCP by a bounded world-frame xyz delta in meters.",
"description": "Move one Franka TCP by a bounded world-frame xyz delta in meters. Completion indicates execution ended; target_reached and final_error_m report accuracy, not a mandatory retry condition.",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange description for mcp

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Comment thread robots/dual_franka/env_server.py Outdated
return {
"ok": error <= self.controller["move_tolerance_m"],
# Completion describes execution, not target accuracy.
"ok": True,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok is always True?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@Sonorous281

Copy link
Copy Markdown
Collaborator

Could we tidy up the dual-Franka test directories and file names? They seem a bit scattered and inconsistent.

Comment thread robots/dual_franka/env_server.py Outdated
drift_limit = self.controller["rotate_max_drift_m"]
max_position_error = 0.0
exit_reason = "iteration_limit"
integral = np.zeros(3, dtype=np.float64)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you explain why holding the initial position with the RLinf controller is not enough here? the position and rotation integral corrections add quite a bit of control logic. Can we simplify this while keeping the tracking fixes we actually need?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Removed the position and rotation integral corrections and settling logic. Rotation now holds the initial TCP position and sends bounded orientation references through RLinf’s existing action path, with drift protection retained.

}
)
controller = flatten_control(CONTROL)
rotation_hold = _require_mapping(raw.get("rotation_hold", {}), "rotation_hold")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rotation compensation is enabled by default, but rotation_hold is missing from the example config and deployment docs. could we document the settings, how to disable compensation, and the setup used to validate the defaults?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integral compensation and its configuration options have been removed. The remaining rotation_hold.max_drift_m guard is documented in the example config and both deployment guides, with a default of 0.03 m. This update includes offline validation, without claiming new real-robot validation of that threshold.

@Code-Hit-ai

Copy link
Copy Markdown
Collaborator

I’ve reviewed the implementation. This PR aligns the integration with RLinf, fixes the previously discussed bugs in rotation and other primitives, and adds manual VLA debugging support. These changes have practical value, and I support the functional direction. However, formatting issues still need to be addressed.

@read-the-docs-community

read-the-docs-community Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 RPent | 🛠️ Build #35095484 | 📁 Comparing 1c1d393 against latest (ff91f14)

  🔍 Preview build  

1 file changed
± rst_source/real_world_robots/dual_franka.html

@read-the-docs-community

read-the-docs-community Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 RPent-cn | 🛠️ Build #35095485 | 📁 Comparing 1c1d393 against latest (ff91f14)

  🔍 Preview build  

1 file changed
± rst_source/real_world_robots/dual_franka.html

@NewYork424 NewYork424 changed the title fix(dual-franka): align RLinf v0.4 deployment and control diagnostics fix(dual-franka): align RLinf v0.4 deployment and control diagnostics -(v0.1) Oct 12, 2026

RPent 会将该机器人配置转换成内部双节点 RLinf cluster 和环境对象。如需使用其他文件,请传入 ``--robot-config /path/to/robot_config.yaml``。

``rotation_hold.max_drift_m`` 默认为 ``0.03`` m。``rotate_delta`` 中,TCP 相对起始位置的漂移超过该值时,会通过现有 RPC 错误通道中止旋转。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a simple description of the problem solved by this.

# See the License for the specific language governing permissions and
# limitations under the License.

"""Manual-only continuous VLA rollout; never registered with the agent toolkit."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file with vla-only? "vla-only" is better than "full-vla"

@NewYork424 NewYork424 changed the title fix(dual-franka): align RLinf v0.4 deployment and control diagnostics -(v0.1) fix(dual-franka): align RLinf v0.4 deployment and control diagnostics (v0.1) Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants