git clone https://github.com/rsasaki0109/rust_robotics.git
cd rust_robotics
cargo build --workspace --lib --tests --examples
cargo test --workspace --lib --testsAll of these must pass before submitting a PR:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -W clippy::all -D warnings
cargo build --workspace --lib --tests --examples
cargo test --workspace --lib --tests
cargo doc --workspace --no-deps
cargo deny checkIf the change touches ROS2/Gazebo integration, also run the relevant smoke
script from ros2_nodes/launch/ after sourcing the ROS2 environment.
-
Add the implementation in the appropriate crate under
crates/:rust_robotics_planningfor path plannersrust_robotics_localizationfor filtersrust_robotics_controlfor controllersrust_robotics_mappingfor mapping algorithmsrust_robotics_slamfor SLAM algorithms
-
Follow existing patterns:
- Config struct with
validate()method try_new()returningRoboticsResult<Self>- Implement
PathPlannertrait (for planners) or equivalent - Use
plan()returningRoboticsResult<Path2D>(not the legacyplanning())
- Config struct with
-
Add tests in the same file under
#[cfg(test)] mod tests -
Register the module in
lib.rsand add re-exports -
Add a section to
README.mdwith description and source link -
Add a runnable example or a focused comparison test when the behavior is easier to understand through output than through API docs alone
#![forbid(unsafe_code)]in all crates- Return
Resultfrom library code, neverunwrap()(useexpect()only for true invariants) - Use seeded RNG (
StdRng::seed_from_u64) for deterministic tests - Escape
[m]as\[m\]in doc comments (rustdoc treats[...]as links) - Long-running tests (>10s) should be
#[ignore] - Keep examples deterministic where possible so CI output is stable
- Prefer small, reviewable PRs that cover one algorithm, experiment, or docs change at a time
cargo bench --bench unified_planning_benchmark -p rust_robotics_planning
cargo bench --bench jps_crossover_benchmark -p rust_robotics_planningWhen adding a visual example, include the generated image under img/ or
docs/assets/, link the source file from the README, and add the card to
docs/app.js if it is a good public demo.
By contributing, you agree that your contributions will be licensed under the MIT License.