Enhanced ChoreoLib with Time-Based Start and Nearest Trajectory State Functionality #468
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.
Enhancement:
Use Case:
Allows the robot to resume following a path from a designated point, useful for scenarios like interrupting the command during autonomous to perform a task (e.g., picking up a game piece with vision) and then seamlessly continuing along the trajectory.
New Feature:
Explanation: It is similar to Pose2d.nearest(). The difference is that ChoreoTrajectoryState.nearest() incorporates weighted parameters to determine the impact of errors in each parameter on the output.
Example Use Case: Enables the robot, after deviating from the trajectory to perform a task, to resume following the path from the point closest to its current position. The weighting parameters allow fine-tuning of the selection criteria based on specific requirements, such as prioritizing position accuracy.