Getting Started
Before contributing, ensure you have completed the installation and workspace setup as described in the Installation guide.Development Workflow
Create a feature branch
Create a new branch from Use descriptive branch names that indicate the purpose of your changes.
main for your changes:Commit Message Conventions
All commit messages must use one of these prefixes:| Prefix | Use Case | Example |
|---|---|---|
Add: | New features or capabilities | Add: obstacle avoidance algorithm |
Fix: | Bug fixes | Fix: robot spawning position |
Update: | Changes to existing code | Update: camera parameters |
Remove: | Deletions of code or features | Remove: deprecated sensor node |
Docs: | Documentation changes | Docs: update installation guide |
Refactor: | Code restructuring without behavior changes | Refactor: simplify navigation logic |
Commit messages should be concise but descriptive. Focus on what changed and why it matters.
Pre-Push Checklist
Before pushing your changes, ensure:- Code builds without errors (
colcon build --symlink-install) - Test world launches successfully (
ros2 launch lunabot_simulation moon_yard.launch.py) - Changes tested thoroughly in simulation
- Documentation updated (if applicable)
- Debug statements and temporary code removed
- Interface contracts updated (if you renamed topics/actions/frames)
Adding New Code
Python Nodes
When adding a new Python node:- Place it in the appropriate package subdirectory (e.g.,
lunabot_navigation/lunabot_navigation/) - Update
setup.pyto register the entry point:
- Rebuild the workspace:
Launch Files
- Add your launch file to the
launch/directory of the appropriate package - Ensure it’s installed in
CMakeLists.txt:
- Rebuild the package
World Files
- Add
.sdfworld files tolunabot_simulation/worlds/ - Ensure the worlds directory is installed in
CMakeLists.txt:
- Rebuild
lunabot_simulation
CI Interface Contract Checks
The CI pipeline runscheck_interface_contracts.py to verify that required ROS interfaces haven’t been accidentally renamed or removed.
What are interface contracts?
What are interface contracts?
Interface contracts are guarantees about the topics, actions, and TF links that must exist in the codebase. They prevent breaking changes to critical robot communication interfaces.The contract file (
.github/contracts/interface_contracts.json) defines:- Topics: Required publishers and subscriptions with their message types
- Actions: Required action servers and clients
- TF Links: Required coordinate frame transformations
- Deferred Topics: Future interfaces not yet enforced
When to Update Contracts
Update.github/contracts/interface_contracts.json in the same PR when you:
- Rename a topic, action, or frame link
- Change the message/action type of a contracted interface
- Move interface declarations to a different source file
Example Contract Entry
Getting Help
If you have questions or need assistance:- Open an issue on GitHub
- Contact the software lead
- Check the Troubleshooting guide for common issues