Repository navigation
Conversation
Drop parameters no caller passes, keeping the value every caller got: UpperController.plan_to_ik_target's start and ik_alpha (the IK keeps solve_ik_reduced's alpha 0.1), plan_to_configuration's start (always the command seed), execute_path's validate (always on), and ReducedJointPlanner._shorten_path's smooth (always on). Drop PlanResult from golem_upper_ik.core.planner's re-exports, which nothing imports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J
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
A dead-code sweep of
golem_upper_ikfound the package already lean: every function, class, module, config key, robot-profile field,package.xmldependency, entry point, launch argument and module constant has a caller. What was left is a handful of parameters no caller passes and one unused re-export. Behaviour is unchanged: each removed parameter's default was the only value any caller ever used.Removed (
core/controller/upper_controller.py,core/planner/)UpperController.plan_to_ik_target(start=None, ..., ik_alpha=0.1):startandik_alphaare gone andik_timeoutis now required. The only caller (frame_task_server.py:261) passesik_timeoutalone. The IK keepssolve_ik_reduced's default alpha of 0.1.UpperController.plan_to_configuration(start=None): the start is always the command seed. Its callers areframe_task_server.py:496andplan_to_ik_target, and neither passed a start.UpperController.execute_path(validate=True): waypoints are always checked. No caller passedvalidate. The checked callers areframe_task_server.py:321and the tests.ReducedJointPlanner._shorten_path(smooth=True): the B-spline smoothing always runs. Its only caller (reduced_joint_planner.py:622) passespathalone.PlanResultis no longer re-exported fromgolem_upper_ik.core.planner. A repo-wide grep forPlanResultfinds only uses insidereduced_joint_planner.pyandplanner_process.py.How "unused" was checked
core_ws/src,golem_robocasa,testsandtools. Only names used insidegolem_upper_ik's own tests were reported, and none came up.PlannerConfigfield,robot.yamlkey,RobotProfilefield andpackage.xmldependency against the code that consumes it. All are used.tools/*_rate.pyscripts are run bytest_ros_io.pyandtest_frame_task_server.py.safety_full.yamlis paired inpairing.yaml. Both are kept.Kept, unsure
These are default parameters that only the tests set to something else. They look like small API conveniences, so they stay:
IKSolver.update_configurations(q=None)RobotModel.rebuild_reduced_model(reference_q=None)RobotModel.reduced_limit_violations(tol=0.0)RobotModel.closest_collision_pairs(count=3)UpperController.steady_state_step(threshold=1e-3): no caller passesthreshold, but the default doubles as its named value.Tests
colcon test --packages-select golem_upper_ikin a scratch copy insidegolem_ros(domain 122):One post-edit run failed
test_planned_goals[g1]once: a plannedt_posegoal was aborted while the host was under load from other sessions. The change to the planned path keeps its behaviour, and the test then passed 5 times in a row on its own, followed by a clean full run.🤖 Generated with Claude Code
https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J