Choreo (Constraint-Honoring Omnidirectional Route Editor and Optimizer, pronounced like choreography) is a graphical tool for planning time-optimized trajectories for autonomous mobile robots in the FIRST Robotics Competition.
Grab the latest release for your platform on the releases page.
Requirements for all platforms:
Choreo can be built and run on Windows, but it requires a few extra steps because CasADi requires the MinGW toolchain.
Buliding on Windows requires MinGW. On the release page, download the binary labeled x86_64, posix, and msvcrt. Extract the mingw64 folder to C:\mingw64. Add an entry to the user or system PATH environment variable that points to C:\mingw64\bin.
After installing MinGW, run rustup default stable-gnu to switch to the GNU toolchain that uses MinGW. This can be reverted using rustup default stable-msvc when returning to other rust projects.
Run npm install to build Node.js dependencies and TrajoptLib. Once it is finished, the libraries will be copied into src-tauri/*.dll. You will need to redo this step if Choreo begins using a different version of TrajoptLib.
Run npm run tauri dev -- --release to start the dev server.
The --release avoids issue #84.
If you're having a permissions error with CMake, try first building using the cargo command directly:
cd src-tauri
cargo build --releaseThen try npm run tauri dev -- --release again.
To create an NSIS .exe installer bundle, run npm run tauri build. It will report the location of the bundle upon completion.
The following steps can be used to build for arm64 or x86_64 architectures.
Make sure Xcode command line tools are installed:
xcode-select --installRun npm install to build Node.js dependencies and TrajoptLib. Once it is finished, the libraries will be copied into src-tauri/lib*.dylib. You will need to redo this step if Choreo begins using a different version of TrajoptLib.
An arm64 or x86_64 Mac can be used to build for arm64 or x86_64 targets. The target architecture will be the currently selected Rust target triple.
You can create a config.toml file in src-tauri/.cargo containing the following definition to change the target from the native architecture to the other:
[build]
target = "aarch64-apple-darwin" # arm64 (Apple Silicon) targetor,
[build]
target = "x86_64-apple-darwin" # x86_64 (Intel) targetYou must first install the Rust targets using rustup target install <target>.
Run npm run tauri dev to start the dev server.
To create a .dmg macOS bundle, run npm run tauri build. It will report the location of the bundle upon completion.
The following steps can be used for Ubuntu Linux; others may require additional configuration. If you find any additional required steps for your distro, please create a PR or issue to add documentation for it.
Tauri requires some libraries to function, follow their instructions.
Run npm install to build Node.js dependencies and TrajoptLib. Once it is finished, the libraries will be copied into src-tauri/lib*.so*. You will need to redo this step if Choreo begins using a different version of TrajoptLib.
Due to issue #89, you must manually copy all files matching src-tauri/lib*.so* into src-tauri/target/debug/ to ensure they can be found for the next step.
Run npm run tauri dev to start the dev server.
To create a .deb Debian/Ubuntu bundle, run npm run tauri build. It will report the location of the bundle upon completion.
- 📈 CasADi: Numerical optimizer
- 🖥️ Tauri: Desktop applications
- ⚛️ React: JS Framework
- 🚗 TrajoptLib: Uses CasADi to generate paths
- 🦀 Rust: Backend code
- ⚡️ Vite
The trajectory optimizer depends upon the following user-specificed parameters, which are entered in the Robot Configuration panel.
- Mass [kg]: The mass of the robot with battery and bumpers
- MoI [kg * m2]: The resistance to change in rotational velocity in response to a torque applied to the robot about the vertical axis
- Max Velocity [m/s]: The maximum tangential speed of the wheel
- Note: A reasonable choice of Max Velocity is that corresponding to ~80% of free speed experienced at the drive motor(s)
- Max Torque [N * m]: The maximum torque applied at the wheel
- Note: A reasonable choice of Max Torque is that corresponding to a current draw of approximately
1.5 * BreakerValueexperienced at the drive motor(s)
- Note: A reasonable choice of Max Torque is that corresponding to a current draw of approximately
- Wheelbase and Trackwidth [m]: The largest distances between the robot's wheel centers
- Length and Width [m]: The overall size of the robot's bumper
The robot's rotational inertia has a significant impact on how quickly it can follow complex paths. For the best results, it is recommended to get as accurate an estimate of this parameter as possible. This can be accomplished via:
- Faithful CAD loaded with mass properties
- Physical experimentation
- System Identification methods
If none of these techniques are possible, a reasonable estimate of MoI would be mass * length * width / 6 based on the assumption of a rectangle of uniformly-distributed mass.