Skip to content

Docs: Choreo Stack and Codebase Integration#74

Merged
spellingcat merged 5 commits into2024from
docs/choreo
Jul 26, 2025
Merged

Docs: Choreo Stack and Codebase Integration#74
spellingcat merged 5 commits into2024from
docs/choreo

Conversation

@Awesomeplayer165
Copy link
Copy Markdown
Contributor

Includes Choreo GUI and Sleipnir backends, communication within Choreo's tech stack, generations, and codebase integration.

@Awesomeplayer165 Awesomeplayer165 changed the title Draft of Choreo integration and Stack Docs: Choreo Stack and Codebase Integration Aug 19, 2024
@Awesomeplayer165 Awesomeplayer165 marked this pull request as draft August 19, 2024 00:38
Copy link
Copy Markdown
Collaborator

@Lyssia-Seiden Lyssia-Seiden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally i think this document should be more detailed about what choreo is vs other tools and why its useful, since thats less likely to change over time and more relevant to a reader of these docs


![Choreo Hero Home Page](/Assets/choreo-hero.png)

The Choreo GUI is the multiplatform Tauri (React + Rust) app that allows you to create and save the paths. It's an independent app from Visual Studio or WPILib (although for the 2025 season it might be bundled in WPILib).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would lighten up on the details about how Choreo is built, just cover the essentials like what numerical optimization is and how its applicable to trajopt.


### [Sleipnir](https://github.com/SleipnirGroup/Sleipnir)

Sleipnir, written in C++23, is a "a linearity-exploiting sparse nonlinear constrained optimization problem solver that uses the interior-point method." What this really means is that based on multiple constraints and variables (some listed [here](https://sleipnirgroup.github.io/Choreo/document-settings/robot-configuration/)), the problem-solver is able to constrain them while optimizing the path time. 8033 was the first team to run Choreo at a competition (Chezy Champs, where we saw very reliable paths and great potential in constrast to what we used to use: PathPlanner).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above, the explanation of sleipnir can be extended a little bit or link to another resource to introduce the concept and why trajopt is useful, as well as comparing it to splines.


### Communication: From Path to Trajectory

The Choreo GUI communicates with Sleipnr and receives results back (as Sleipnir runs through step iterations). First, Choreo sends all the project robot data and the paths as data to Choreo's backend. Choreo's backend is able to communicate with Sleipnir, which generates the trajectory. While the trajectories are generating, each iteration of the trajectory (which theoretically gets closer to a more optimized solution) is communicated back to Choreo, where the GUI can show a preliminary trajectory. Finally, the trajectory is finalized, Choreo displays it and autosaves the project.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesnt really matter for the reader of these docs

return alliance.isPresent() && alliance.get() == Alliance.Red;
},
this)
.beforeStarting(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be better to not use beforeStarting here to make the control flow clearer (ik we did this in season)

@Awesomeplayer165
Copy link
Copy Markdown
Contributor Author

Sure I'll add that in too

Copy link
Copy Markdown
Collaborator

@Lyssia-Seiden Lyssia-Seiden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to break up lines for review

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure to move this to assets


### Intro to Numerical Optimization

Choreo is a new approach to creating auto trajectories by using numerical optimization, namely Convex Optimization. Convex Optimization with respect to time constraints applies to minimizing the time it takes to travel a path. A convex function simply is a function that curves downward, like an upward parabola. The constraints (independent variables) axis would be changed to affect the time (dependent variables) axis. It's the solver's job to try as hard as possible to minimize the time taken for a path, which in turn allows robotics teams to score more points in the auto period.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"A convex function simply is a function that curves downward, like an upward parabola."
not exactly, its a function where you can draw a line between any point in the function to any other point in the function without intersecting the function.


### How the Solver Generates Paths

The solver is first given a list of waypoints that include its position, angle, and other metadata. Then it guesses initial guess points that can be used to better interpolate between the path. Next, control intervals are gussed based on a guess of its general shape (trapezoid, ..) (the biggest factor of generation times).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the parentheticals at the end seem unnecessary

@spellingcat spellingcat changed the base branch from main to 2024 July 23, 2025 23:42
@spellingcat spellingcat marked this pull request as ready for review July 26, 2025 00:18
@spellingcat spellingcat merged commit 347ba2b into 2024 Jul 26, 2025
1 check passed
@spellingcat spellingcat deleted the docs/choreo branch July 26, 2025 00:19
spellingcat added a commit that referenced this pull request Jul 31, 2025
* wording tweaks and updates to BasicGit.md

* remove last names from BasicGit.md

* brush up git workflow doc

* add mac/linux git install link

* pr feedback word tweaks

* Vision 2024 (#69)

* merged wpilib.md and wpilibintro.md

* hide spectrum talk a bot more

* specify reference sheet type

Co-authored-by: spellingcat <70864274+spellingcat@users.noreply.github.com>

* convert electronics pictures to html and add size tags

* add `s to latex

* fix readme wpilib link

* add apriltag image

* 2024 vision updates

* remove obj detection link

* feedback

* hopefully explained multitag better

---------

Co-authored-by: Lewis-Seiden <lewy@seiden.us>
Co-authored-by: Lewis-Seiden <70111132+Lewis-Seiden@users.noreply.github.com>

* added example stage 3 writeup

* began supersturcture writeup

* add explanation of a state trigger binding

* first draft of sim article edits (#73)

* first draft of sim article edits

* feedback

* fixed latex

* never mind

* it's working in the vscode preview hello

* i'm so sorry

* more writing

* add conclusion to writeup

* Update Stage-3-Writeups/Superstructure-Triggers.md

Co-authored-by: Jacob Trentini <jacobtrentinidevelopment@gmail.com>

* fix monolithic typo

* Akit code structure reference (#81)

* added akit structure reference doc

* tweaked mermaid graph code

* more tweaks to try to get mermaid graph working

* more tweaks

* format please

* example works?

* what i care about works?

* wrote reference material

* Prettified Code!

* pneumatics are for losers booo [updated code examples to reflect current practices, no substantive content changes]

---------

Co-authored-by: Lewis-Seiden <aPotatoeWithANaginata@gmail.com>
Co-authored-by: spellingcat <spellingcat@users.noreply.github.com>

* Docs: Choreo Stack and Codebase Integration (#74)

* add choreo.md

* add numerical optimization

* update choreo article

---------

Co-authored-by: Jacob Trentini <dev@jacob2.dev>
Co-authored-by: spellingcat <70864274+spellingcat@users.noreply.github.com>

* Command based docs updates 2024 (#70)

* editing pass on CommandBased.md

* kevin pr feedback

* fixed examples

* fix kitbot examples\ (who wouldve thought that installing a java syntax checker would be a good idea

* replace pathplanner reference to choreo reference in wpilib intro

* update projects to 2025 (surely there's a better way to do this 😭)

* import basic project also

* update command based articles

---------

Co-authored-by: Lewis-Seiden <lewy@seiden.us>
Co-authored-by: spellingcat <70864274+spellingcat@users.noreply.github.com>

---------

Co-authored-by: Lewis-Seiden <lewy@seiden.us>
Co-authored-by: spellingcat <70864274+spellingcat@users.noreply.github.com>
Co-authored-by: Jacob Trentini <jacobtrentinidevelopment@gmail.com>
Co-authored-by: spellingcat <spellingcat@users.noreply.github.com>
Co-authored-by: Jacob Trentini <dev@jacob2.dev>
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.

3 participants