Contributing
Thank you for your interest in contributing to SMACC2. Whether it is a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.
Repository: robosoft-ai/SMACC2
License: Apache 2.0
ROS 2 distro: Jazzy (Ubuntu 24.04)
Reporting Bugs and Feature Requests
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
Before filing an issue, please check existing open issues or recently closed issues to make sure somebody else has not already reported it.
When filing an issue, please include as much information as you can:
A reproducible test case or series of steps
The version of SMACC2 and ROS 2 being used
Any modifications you have made relevant to the bug
Anything unusual about your environment or deployment
Contributing via Pull Requests
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
Limited scope. Your PR should do one thing or one set of things. Avoid adding unrelated fixes to PRs. Put those on separate PRs.
Descriptive title. Give your PR a descriptive title. Add a short summary if required.
Green pipeline. Make sure the CI pipeline passes.
Request reviews. Do not be afraid to request reviews from maintainers.
New code = new tests. If you are adding new functionality, add tests exercising the code and serving as live documentation of your original intention.
Submitting a Pull Request
Fork the repository.
Modify the source. Focus on the specific change you are contributing – if you also reformat all the code, it will be hard to review your change.
Ensure local tests pass:
colcon test pre-commit run -a # requires: sudo apt install pre-commit
Commit to your fork using clear commit messages.
Send a pull request, answering any default questions in the pull request interface.
Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional documentation on forking a repository and creating a pull request.
Finding Contributions to Work On
Looking at the existing issues is a great way to find something to contribute. The “help wanted” label is a great place to start.
Contributing to Documentation
This documentation site lives in a separate repository:
Docs repository: robosoft-ai/smacc2_docs
Building Locally
cd ~/ros2_ws/src
git clone https://github.com/robosoft-ai/smacc2_docs.git
cd smacc2_docs
pip install -r docs/requirements.txt
sphinx-build -b html docs/source docs/build/html
Then open docs/build/html/index.html in a browser.
Writing Guidelines
Pages use reStructuredText (
.rst) format with.. title::and.. meta:: :description:directives for SEO.Follow the Diataxis framework: tutorials teach, how-to guides solve, concepts explain, reference describes.
Code examples should be drawn from real state machines in the
smacc2_sm_reference_libraryor real client libraries whenever possible.Follow the SMACC2 naming convention (
Sm,Ms,St,Or,Cl,Cb,Cpprefixes) in all examples.
Coding Standards
Follow the existing code style in the repository.
Use
pre-commithooks for automatic formatting and linting.Header files use
.hppextension; source files use.cpp.Follow the SMACC2 naming convention for all classes and files.
Keep state machines header-only (states defined in
.hppfiles).Prefer the component-based architecture: clients orchestrate, components implement, behaviors consume.
Licensing
Any contribution that you make to this repository will be under the Apache 2.0 License, as dictated by that license:
“Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.”