Repository navigation
Fix self-collision between the stowed arm and base_link in Stretch 3 - #342
Open
ericzhubonnie-glitch wants to merge 2 commits into
Open
ericzhubonnie-glitch wants to merge 2 commits into
ericzhubonnie-glitch wants to merge 2 commits into
Conversation
At qpos = 0 -- where both keyframes start, since "home" and "stow" only set ctrl -- link_DW3_wrist_pitch sits 48.3 mm inside the collision hull of base_link. That produces 14 contacts and a 68 kN internal impulse on the very first step, and drives joint_wrist_pitch to 37 rad/s, past its upper limit. base_link uses base_link_collision, a 40336-vertex mesh, so its collision shape is the compile-time convex hull, which fills the notch the arm retracts into. The rest of the stowed-arm pairs are already in <contact><exclude> (link_arm_* against link_lift, wrist_yaw against every arm segment, both fingers against the wrist), so this pair looks like an omission rather than intent. hello_robot_stretch (v1) does not have the overlap at all. Add the three missing excludes. At t=0 the deepest contact goes from 48.28 mm to the floor at 0 mm, the first-step wrist_pitch speed from 37.10 to 0.11 rad/s, and the wrist excursion over the first 0.5 s from 0.618 rad (past the 0.56 limit) to 0.051 rad. Reported in google-deepmind#341.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Triggering a rebuild so the google CLA check re-evaluates against the newly signed Individual CLA. No code change.
This branch has not been deployed
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.
What this fixes
Fixes #341.
At
qpos = 0— which is where both keyframes start, sincehomeandstowsetctrlbut leaveqposat zero —link_DW3_wrist_pitchis 48.28 mm inside the collision hull ofbase_link. Three pairs interpenetrate at t=0 and none of them is in<contact><exclude>:base_link↔link_DW3_wrist_pitchlink_right_wheel↔link_DW3_wrist_pitchlink_aruco_right_base↔link_DW3_wrist_pitchbase_linkusesbase_link_collision(40,336 vertices) as its collision geom, and mesh collision runs on the compile-time convex hull, which fills the notch the arm retracts into. The remaining stowed-arm pairs are already excluded (link_arm_*againstlink_lift,link_wrist_yawagainst every arm segment, both fingers against the wrist), so this looks like an omission rather than intent.hello_robot_stretch(v1) has no self-collision atqpos = 0at all.The change
Three lines in
hello_robot_stretch_3/stretch.xml:Measured effect
MuJoCo 3.16.0,
hello_robot_stretch_3/scene.xml,mj_resetDataKeyframe(m, d, 0):joint_wrist_pitchspeed on the first stepjoint_wrist_pitchexcursion over the first 0.5 sFive seconds in, the settled
link_DW3_wrist_pitchpose differs between the two runs by 11.3 mm in y — same command, same seed, so the impulse leaves a residue in where the arm ends up.The model is 23.7 kg, i.e. ~232 N of weight, so 68.5 kN is an internal startup impulse rather than anything physical. It does not persist (the model pushes itself out within 5 s), but every rollout starts with it, and the wrist is driven past its own joint limit on the way.
The alternative fix — replacing
base_link_collisionwith primitives or a decimated hull — would also cut 40k vertices out of every collision query, but that is a much larger change and is not required to resolve the overlap.Checks
python format_xml.py --check hello_robot_stretch_3/stretch.xml→ cleanpytest test/ -k stretch→ 10 passedmjcf-doctor check hello_robot_stretch_3/scene.xml→ exit 0, no errors (was the only hard error across the 82 models I scanned)No other model directory is touched.