Welcome to JSim! This guide outlines the conventions and rules to follow when making contributions.
- Headers & Implementations: All
.hppfiles belong ininclude/and.cppfiles insrc/. - Doxygen Documentation: Every class, struct, and method MUST be fully documented using standard Doxygen tags (
@brief,@param,@return). - Bindings: Any new feature (bodies, joint constraints, simulation ticks) must be exposed cleanly in both
core/python/bindings.cpp(PyBind11) andvendordep/src/(Java JNI).
- Python simulation entry points (Main Loop, Vis, Assets) reside here.
- Maintain determinism: The main loop (
apps/sim-runtime/main_loop.py) forces fixed-timestep loops. Do not driftdtwith raw system time. - Settings are exposed via typed dataclasses or parsed configuration, not hardcoded values.
- Keep URDF/STL parsers robust. Always assume malformed XML/binary input and fail gracefully.
- Field Definitions: Historic Python scripts with hardcoded bounding boxes are deprecated. We use JSON/YAML configuration to define fields and environments.
- FRC C++ logic matches standard
googletestsyntax. Add tests for all new mechanisms (drivetrain,collision). - All code must pass the GitHub Actions CI pipelines (Windows, Linux, macOS).
- Use
./scripts/run-tests.shto validate locally before making a PR. - Before being merged PR must be approved by a code owner with merge permissions.