\ud83c\udf89 Thank you for your interest in contributing to RobotWin Studio!
We welcome contributions of all kinds: bug reports, feature requests, documentation improvements, and code contributions.
- Check existing issues first to avoid duplicates
- Open an Issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- System information (Windows version, Unity version, .NET SDK version)
- Relevant logs or error messages
- Use GitHub Discussions for brainstorming and feedback
- Open an Issue for concrete feature proposals with:
- Use case description
- Proposed implementation (if applicable)
- Potential impact on existing functionality
- Use GitHub Discussions for "How do I...?" questions
- Check existing documentation in
docs/first
# Verify installed versions
dotnet --version # Should be 8.0+
cmake --version # Should be 3.20+
python --version # Should be 3.11+-
Fork and clone the repository:
git clone https://github.com/YOUR_USERNAME/robotwin-studio.git cd robotwin-studio
-
Follow the Windows setup guide:
# See docs/SETUP_WINDOWS.md for detailed instructions python tools/rt_tool.py setup
-
Build all components:
# Build native engines cmake -S NativeEngine -B builds/native cmake --build builds/native --config Release # Build CoreSim dotnet build CoreSim/CoreSim.sln --configuration Release # Build FirmwareEngine cmake -S FirmwareEngine -B builds/firmware cmake --build builds/firmware --config Release
# Run all CoreSim tests
dotnet test CoreSim/CoreSim.sln
# Run with detailed output
dotnet test CoreSim/CoreSim.sln --logger "console;verbosity=detailed"# Physics deep validation (energy conservation, friction, constraints)
builds/native/PhysicsDeepValidation.exe
# Sensor internal validation (line sensor algorithms)
builds/native/SensorInternalValidation.exe# Firmware integration tests
builds/native/FirmwareIntegrationTest.exe- Follow .NET coding conventions
- Use PascalCase for public members
- Use camelCase for private fields
- Prefer
varwhen type is obvious - Add XML documentation comments for public APIs
/// <summary>
/// Processes a simulation step.
/// </summary>
/// <param name="deltaTime">Time step in seconds.</param>
public void Step(float deltaTime)
{
// Implementation
}- Follow Google C++ Style Guide with modifications:
- Use
snake_casefor variables and functions - Use
PascalCasefor types and classes - Use
kprefix for constants (kMaxIterations)
- Use
- Prefer modern C++ (C++20)
- Use
nullptrinstead ofNULL - Use
autowhen type is obvious
// Good
auto* body = GetBody(id);
if (body == nullptr) {
return false;
}
// Avoid
RigidBody* body = GetBody(id);
if (!body) {
return false;
}- Follow Unity naming conventions
- Use
[SerializeField]for inspector-visible fields - Use
[Tooltip]for user-facing descriptions - Keep MonoBehaviour classes focused and single-purpose
-
Create a feature branch:
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix
-
Make your changes:
- Keep commits atomic and focused
- Write clear commit messages
- Follow code style guidelines
-
Test your changes:
# Run all tests dotnet test CoreSim/CoreSim.sln builds/native/PhysicsDeepValidation.exe builds/native/SensorInternalValidation.exe
-
Update documentation if needed:
- Update README.md if adding features
- Update relevant docs/ files
- Add inline code comments for complex logic
- Keep PRs small and focused (< 500 lines if possible)
- Provide a clear description:
- What problem does this solve?
- How does it solve it?
- Any breaking changes?
- Include test/verification notes:
- What tests did you run?
- What manual testing did you perform?
- Link related issues: Use "Fixes #123" or "Relates to #456"
- Ensure CI passes (if GitHub Actions is configured)
- Code follows project style guidelines
- All tests pass locally
- Documentation updated (if applicable)
- No build warnings introduced
- No build artifacts committed (
*.exe,*.dll,*.pdb, etc.) - Commit messages are clear and descriptive
# Update repo snapshot (README tree + docs index)
python tools/rt_tool.py update-repo-snapshot
# Sync Unity plugins from native builds
python tools/rt_tool.py update-unity-plugins
# Setup development environment
python tools/rt_tool.py setup# Clean build (native)
cmake --build builds/native --target clean
cmake --build builds/native --config Release
# Clean build (CoreSim)
dotnet clean CoreSim/CoreSim.sln
dotnet build CoreSim/CoreSim.sln --configuration Release
# Rebuild everything
python tools/rt_tool.py rebuild-all- CoreSim: Use Visual Studio or VS Code with C# debugger
- NativeEngine: Attach Visual Studio debugger to Unity process
- FirmwareEngine: Use named pipe debugging (see
docs/DEBUG_CONSOLE.md) - Unity: Use Unity Editor debug tools and console
- Build outputs:
bin/,obj/,builds/,*.exe,*.dll,*.pdb - Unity generated:
Library/,Temp/,Logs/,UserSettings/ - IDE files:
.vs/,.vscode/,.idea/ - Test outputs:
TestResults/,test_output.txt - Personal config:
.venv/,__pycache__/
If your PR introduces breaking changes:
- Document in PR description with clear upgrade path
- Update version numbers (follow Semantic Versioning)
- Update CHANGELOG.md (if it exists)
- Consider deprecation before removal
For changes to physics engine or tight loops:
- Profile before and after using built-in profilers
- Include benchmarks in PR description
- Test on target hardware (don't rely on dev machine)
- Consider numerical stability (floating-point precision)
- Be respectful and constructive
- Follow Code of Conduct
- Help others in discussions
- Share your use cases and projects
By contributing, you agree that your contributions will be licensed under the same MIT License that covers the project.
Questions? Open a Discussion or reach out to the maintainers.