Add trajectory evaluator #3789
Draft
StarrryNight wants to merge 63 commits into
Draft
Conversation
…re into Andrewyx/robot_localizer
…re into Andrewyx/robot_localizer
…rewyx/robot_localizer # Conflicts: # src/software/embedded/primitive_executor.cpp # src/software/embedded/primitive_executor.h # src/software/embedded/thunderloop.cpp # src/software/simulation/er_force_simulator.cpp # src/software/simulation/er_force_simulator.h
…rewyx/robot_localizer
Resolve conflicts from master's #3760 (new prim-exec logic using motion controllers), #3769, and the field renames, which overlapped with this branch's own controller/prim-exec rework. Resolution: - Adopt master's #3760 implementation for primitive_executor, thunderloop, and the motion controllers (PositionController/OrientationController, non-templated PidController + pid_controller.cpp). Drops the branch's parallel close-PID / start_angle / stall-detection variant. - Take master's robot_constants field names (robot_trajectory_max_* ) and 2026 tuning values (trajectory speed 2.5, decel 2.0). - Take master's tbots_protobuf createAngularTrajectoryFromParams signature (uses params.start_angle()) and master's move_primitive.cpp. - Keep robot_localizer.cpp/.h as a standalone library for separate re-integration; removed the now-unused thunderloop -> robot_localizer dep. Verified building: proto translation, move_primitive, motion_control/..., robot_localizer, primitive_executor, thunderloop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rewyx/robot_localizer
…rewyx/robot_localizer
…rewyx/robot_localizer
…re into Andrewyx/robot_localizer
…into Andrewyx/robot_localizer
…nderbots/Software into Andrewyx/robot_localizer # Conflicts: # src/software/embedded/motor_controller/stspin_motor_controller.cpp
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.
Description
Introduces TrajectoryEvaluator as a modular replacement for CollisionEvaluator, with separate cost functions for collisions, path shape, and destination similarity.
Changes TrajectoryPlanner::findTrajectory to re-evaluate the current trajectory against updated obstacles each tick before deciding whether to replan:
route
All destination similarity thresholds live in TrajectoryEvaluator. The goalie uses a tighter threshold (GOALIE_DESTINATION_SIMILARITY_THRESHOLD_M = 0.02m) for more precise positioning, passed through MovePrimitive from the
goalie FSM.
Testing Done
Resolved Issues
Length Justification and Key Files to Review
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue