Repository navigation
motion: add cable twist constraint, auto-enabled for arms carrying cameras - #6667
Open
Eliot Horowitz (erh) wants to merge 3 commits into
Open
Eliot Horowitz (erh) wants to merge 3 commits into
Eliot Horowitz (erh) wants to merge 3 commits into
Conversation
When cable_constraint is set, every rotational joint of each arm model must stay within max_cable_twist_degs (default 180) of cable_twist_reference_degs (default all zeros). A joint that starts beyond its band may hold or unwind that twist but not add to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015iYkQevDA4SgAxzmmu8QbN
cable_constraint, max_cable_twist_degs and cable_twist_reference_degs on the builtin motion service config act as defaults; a Move request's extra overrides each one it sets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015iYkQevDA4SgAxzmmu8QbN
When the builtin motion service config leaves cable_constraint unset, any arm with a camera mounted downstream of it in the frame system, and no input_range_override of its own, gets the cable constraint. Setting cable_constraint to false in the config or a request's extra turns the guess off. Adds cable_constraint_frames to scope the constraint to specific arms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015iYkQevDA4SgAxzmmu8QbN
Contributor
Availability
Quality
Performance
Ordered Sequence 1 plan-by-plan: cappuccina-5fb95a4c (98 plans replayed in recorded order)Time moved (seconds, warm passes, by absolute change)
Joint travel moved (L2, warm passes, by absolute change)
All 98 plans (cold pass and warm passes)Every plan solved every pass in both runs. Time (seconds)
Joint travel (L2)
The above data was generated by running scenes defined in the
|
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.
Summary
Adds a planner constraint that keeps cables routed through an arm from winding up. It can be set in the builtin motion service config, per request through
extra, or inPlannerOptions. It needs no proto changes.Motion service config (the defaults for every Move):
{ "cable_constraint": true, "max_cable_twist_degs": 180, "cable_twist_reference_degs": { "arm": [0, 0, 0, 0, 0, 90] } }A Move request's
extratakes the same keys, pluscable_constraint_framesto limit the constraint to specific arms. Each key the request sets overrides the config.The constraint can turn on by itself. If the config leaves
cable_constraintunset, any arm that has a camera mounted downstream of it in the frame system, and noinput_range_overrideof its own, is assumed to carry the camera's cable. The constraint then applies to those arms only. Setting"cable_constraint": falsein the config, or in a request'sextra, turns this off. A debug log names the arms it picked.referenceframe.Modelmust stay withinmax_cable_twist_degs(default 180) of its reference (default all zeros). Translational DoF and non-model frames are skipped.motionplan.ErrCableConstraintViolated.Behavior change
Robots that have a camera mounted on an arm get the constraint without any config change. Joint-space goals more than 180° from zero on those arms will now fail. To keep the old behavior, set
"cable_constraint": falsein the config.Files
motionplan/cable_constraint.go(new):CableConstraint(with an optionalFramesfilter), the check, andConstraintChecker.AddCableConstraint.motionplan/armplanning/planner_options.goandcontext.go: the options, the default limit, and the code that adds the check to each segment's checker.services/motion/builtin/builtin.go: the config fields, validation, the camera-on-arm detection, and how config and request values are combined.motionplan/cable_constraint_test.goandservices/motion/builtin/cable_constraint_test.go.Testing
extra, the camera-on-arm detection (a wrist camera, a fixed camera, and an arm with no camera), turning the detection off, and config validation.🤖 Generated with Claude Code
https://claude.ai/code/session_015iYkQevDA4SgAxzmmu8QbN