Repository navigation
Add a differentiable FK layer and pose-reaching demo - #901
Conversation
[Medium impact] The PR appears safe to merge; no new actionable issue remains. SummaryAdds
|
Comments Outside DiffThese findings could not be posted inline.
|
Skip the GPU recovery case when roma or einops is unavailable, consistent with the neighboring optional RigidFormer tests. With dependencies installed, the existing exact EMA/recovery assertions still execute unchanged. Validation: 25 RigidFormer CPU/GPU tests and 59 FK/IK/import tests passed. Missing roma and missing einops were each verified to skip the case. Black 26.10.1, API docs coverage (3287/3287), and diff checks passed. Context review: no update needed; this test-only correction restores optional-dependency handling without changing documented model or training contracts. Existing behavioral coverage is reused; no redundant tests added.
Description
Add
DifferentiableFKLayeras the forward-kinematics counterpart toDifferentiableIKLayer. Its forward call computes TCP poses without constructing an unused geometric Jacobian;evaluate()returns poses and Jacobians from one FK pass.Add a Franka pose-reaching example that trains a joint predictor through fixed FK and TCP pose supervision with the shared SL trainer, plus a browser comparison of initial and frozen trained predictions. The combined FK/IK guide lives under Learning Infrastructure.
Use
DifferentiableFKLayeras the public FK API. Remove the oldKinematicsLayeralias/module and the old IK documentation redirect. Existing IK state-dict keys remain unchanged. The existing kinematic benchmark only migrates its FK import and constructor; this PR adds no benchmark mode or reporting changes.Fix the two CI failures in the RigidFormer showcase: verify prepared geometry before importing the optional evaluator dependencies, and explicitly configure the engine demo's visualization backend.
Dependencies: no new core dependencies. Optional plotting/mesh packages are listed in the example requirements.
Type of change
KinematicsLayerwithDifferentiableFKLayer.Validation
romadeliberately blocked and the visualization-configuration check.black .with 26.10.1, Black check, Python compilation of the changed example/benchmark entry points, andgit diff --checkpassed.Coverage review: reuse the existing FK/IK numerical, gradient, checkpoint/device and import tests and the existing showcase/visualization regressions. Remove compatibility-alias assertions with the deleted alias. No additional example-coupled tests were needed.
Context review: update learning-layer ownership, imports and benchmark guidance. Adjacent solver, framework, neural-dynamics and RL ownership remains accurate; the showcase fixes restore existing validation/configuration contracts.
Checklist
black ..