Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced ChoreoLib with Time-Based Start and Nearest Trajectory State Functionality #468

Closed

Conversation

YoavRozov
Copy link

Features:

Enhancement:

  • Added functionality to initiate the choreoSwerveCommand from a specific point of time within the trajectory.

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:

  • Implemented the capability to identify the nearest ChoreoTrajectoryState from a given list of trajectories, akin to Pose2d.nearest().

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants