Feat unitree g1 humanoid (Draft)#75
Draft
BlGene wants to merge 13 commits into
Draft
Conversation
Stack of debugging-driven changes to eliminate grip/slip/wedge/hidden- collision failure modes during the right-arm tabletop pick-and-place trajectory. The remaining residual is the runtime DLS IK getting stuck on cross-body preplace approaches; addressed via planning-time mitigations only — no runtime planner replacement yet. Asset side (scripts/assets/prepare_unitree_g1.py): - Fingertip pad reoriented from (0.02, 0.01, 0.045) (vertical fin) to (0.045, 0.01, 0.02) (flat plate along fingertip face). - Pad sliding/torsional/rolling friction (12, 0.2, 0.02) -> (20, 0.4, 0.04) for slip resistance. - Arm actuator damping doubled to (60, 12); stiffness unchanged to avoid hard-approach push-aside of pickup objects. Workspace + clearance (molmo_spaces/configs/task_sampler_configs.py and the policy config): - pickup_workspace_size_xy (0.16, 0.10) -> (0.16, 0.06). - place_workspace_center_xy (0.42, 0.08) -> (0.42, 0.02), place_workspace_size_xy (0.10, 0.08) -> (0.04, 0.02). - g1_place_travel_object_clearance 0.13 -> 0.07; previous 0.12 pushed the preplace target out of the right-arm reach envelope. Selector + runtime IK (molmo_spaces/policy/solvers/...): - max_sequential_ik_failures 4 -> 20. - g1_grasp_joint_margin_weight 0.5 -> 1.5; g1_grasp_joint_motion_weight 0.25 -> 1.0 so the selector prefers grasps whose IK chain stays away from limits and has small phase-to-phase joint excursions. - g1_runtime_ik_damping 1e-3 (was using shared default 1e-12), g1_selector_ik_damping 1e-4, g1_runtime_ik_dt 0.5. - Null-space posture nudge in _tcp_to_jp_fn biases the redundant 1 DoF of the 7-DoF right arm toward init_qpos without changing TCP pose. - Smoothed ctrl EMA scaffolding present but disabled by default (g1_runtime_ctrl_smoothing 0.0) — averaging across IK basins worsened rotation tracking. - HoldCurrentControlAction (not NoopAction) for the runtime failure hold so a still-gripped held object isn't released during the 2 s terminal hold. - Closed-grasp probe now sets arm ctrl from the candidate qpos and re-pins the base / locked left arm between mj_step calls so the wrist actually holds the candidate during the settle window. Diagnostics (G1-only, additive): - [G1_CONV] convention check at reset (pelvis + right_grasp_site axes in world). - [G1_BASIN_FLIP] warning when right-arm IK output ctrl jumps more than g1_runtime_basin_flip_threshold_rad (0.30) between frames. - [G1_CONTACTS] full per-frame contact dump with body#geomNNN fallback for unnamed structural geoms. Test updates mirror the new defaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The G1 tabletop grasp selector had an inverted vertical-axis filter: `dists_up >= 0.75` required the gripper +z axis to point UP in world, which rejected top-down grasps under the +z=forward convention. The score weight already biased toward top-down grasps (low dists_up), so the selector and score disagreed — the filter rejected what the score preferred. The remaining "eligible" candidates were upside-down grasps that put the wrist at the right arm's kinematic edge, so runtime IK failed. Drop the filter entirely. The shared compute_grasp_pose pipeline used by Franka / RBY / YAM / RUM has no hard vertical-axis rejection — only a soft vertical_cost_weight in the score. G1 now matches that pattern. Also reduce pregrasp_z_offset from 0.12 m to 0.06 m on the G1 right-arm pick-and-place config: the 12 cm setback along the approach axis was pushing the pregrasp pose past the right arm's reach envelope. The 2b7a4cf runtime additions (null-space posture nudge, basin-flip detector, EMA ctrl smoothing scaffold, G1-specific IK damping overrides, grasp-centering knobs, full-contact diagnostics, [G1_*] logging, closed-grasp probe sync) were all bandaids compensating for the filter bug. With the root cause fixed they're unnecessary; revert to the 9fb3afc baseline policy + shared TCPMove + shared DLS IK. The asset-side fixes from 2b7a4cf are kept: grasp-site quat for the +z-forward README convention, fingertip pad orientation/friction, arm gains, hand force-limit multiplier. Task-sampler workspace tightening is also kept. Component tests pass; integration smoke test (skipped in CI without UNITREE_URDF_ROOT) updated to assert the new pickup/place workspace sizes and pregrasp offset. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
abhaybd
marked this pull request as draft
May 12, 2026 20:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.