Fix Agibot left-arm teleop defects and env_cfg_callback contract - #1110
Fix Agibot left-arm teleop defects and env_cfg_callback contract#1110qianl-nv wants to merge 4 commits into
Conversation
Add a robot-only reset event to AgibotEmbodiment (event_config was never set, so every joint reset to 0 and RMPFlow's lula model no longer described the actual robot). Fix the left arm's frame/body offset quaternions, previously written as (w,x,y,z) in (x,y,z,w) fields and read as a 180 deg flip. Let ArenaEnvBuilder accept an env_cfg_callback that mutates the config in place and returns None, as the documented example does. Harden test_place_upright_mug_multi to assert the env_ids/percentage plumbing at the moment of the write instead of after marginal rotate-in-place physics. Signed-off-by: Chuanrui Zhang <chuanruiz@nvidia.com>
…back return Per review: the xyzw fix needs no inline explanation (the wxyz values were an oversight from the Lab 3.0 order switch), and env_cfg_callback now has one contract -- it must return the config -- instead of the builder tolerating a None return. Doc example and type hint updated to match; test docstring shortened. Signed-off-by: Chuanrui Zhang <chuanruiz@nvidia.com>
Greptile SummaryThe PR repairs Agibot left-arm reset and frame-offset behavior while clarifying the environment-config callback contract.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or non-blocking defects identified. The reset configuration, paired left-arm offsets, callback contract updates, and targeted test changes are internally consistent, and no reachable changed-code failure was established. Important Files Changed
Reviews (1): Last reviewed commit: "Simplify agibot reset comments" | Re-trigger Greptile |
| ) | ||
|
|
||
|
|
||
| def reset_robot_to_default(env, env_ids, asset_cfg: SceneEntityCfg = SceneEntityCfg("robot")): |
There was a problem hiding this comment.
🟡 A third, divergent "reset robot to default" implementation
We now have three approaches to the same RMPFlow "reset joints to their default" need: Franka and Galbot reuse franka_stack_events.randomize_joint_by_gaussian_offset (std=0), terms/events.py has reset_all_articulation_joints, and this adds a fourth bespoke one. The two things that make this one different are worth pulling out: it's robot-only (so it doesn't trample task assets) and it also restores the joint position/velocity targets. That last part is the interesting bit — if RMPFlow needs the targets reset too, then Galbot's gaussian-offset reset (which doesn't touch targets) likely has the same latent runaway you're fixing here.
Could this live in the shared terms/events.py as a robot-only reset_joints_to_default (with the target restore) so Galbot/Franka and any future RMPFlow embodiment converge on one implementation instead of drifting? Happy to be wrong if the target reset is genuinely Agibot-specific.
| ) | ||
| """Restore ``init_state`` joint values and targets on every reset. | ||
|
|
||
| RMPFlow expects `joint_lift_body`` and ``joint_body_pitch`` at those default values |
There was a problem hiding this comment.
🔵 Mismatched backticks
`joint_lift_body `` opens with one backtick and closes with two, so it renders wrong. Also worth escaping the leading underscore names if this is meant as RST.
| RMPFlow expects `joint_lift_body`` and ``joint_body_pitch`` at those default values | |
| RMPFlow expects ``joint_lift_body`` and ``joint_body_pitch`` at those default values |
🤖 Isaac Lab-Arena Review BotSummaryThis PR fixes three real Agibot left-arm teleop defects (a never-set Findings🟡 Warning: 🔵 Improvement: Test Coverage
VerdictShip it (consider the shared-reset consolidation as a follow-up). |
Per review: the term is neither Agibot- nor robot-specific, so it moves next to the other event terms as reset_joint_position_and_velocity_to_defaults. Also fixes a backtick typo in the AgibotEventCfg docstring. Signed-off-by: Chuanrui Zhang <chuanruiz@nvidia.com>
202e197 to
81b96ad
Compare
Summary
Fix three defects that make Agibot left-arm teleoperation unusable and crash documented
env_cfg_callbackusage.Detailed description
AgibotEmbodiment:event_configwas never set, so every joint reset to 0 and RMPFlow's lula model no longer described the actual robot. Robot-only rather thanmdp.reset_scene_to_default, which would also reset every scene asset and trample task-level contracts such asdisable_reset_pose.ArenaEnvBuilderaccept anenv_cfg_callbackthat must return a cfg. Update the doc and comments to state so.test_place_upright_mug_multito assert the env_ids/percentage plumbing at the moment of the write: it previously depended on marginal rotate-in-place physics that any change to the robot's reset behaviour flips.Resubmitted for #1097 since the CI doesn't work from fork.