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.

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:

  1. Limited scope. Your PR should do one thing or one set of things. Avoid adding unrelated fixes to PRs. Put those on separate PRs.

  2. Descriptive title. Give your PR a descriptive title. Add a short summary if required.

  3. Green pipeline. Make sure the CI pipeline passes.

  4. Request reviews. Do not be afraid to request reviews from maintainers.

  5. 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

  1. Fork the repository.

  2. 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.

  3. Ensure local tests pass:

    colcon test
    pre-commit run -a   # requires: sudo apt install pre-commit
    
  4. Commit to your fork using clear commit messages.

  5. Send a pull request, answering any default questions in the pull request interface.

  6. 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:

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_library or real client libraries whenever possible.

  • Follow the SMACC2 naming convention (Sm, Ms, St, Or, Cl, Cb, Cp prefixes) in all examples.

Coding Standards

  • Follow the existing code style in the repository.

  • Use pre-commit hooks for automatic formatting and linting.

  • Header files use .hpp extension; source files use .cpp.

  • Follow the SMACC2 naming convention for all classes and files.

  • Keep state machines header-only (states defined in .hpp files).

  • 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.”