Development Guide
Guide for contributing to EmbodiK and developing with the source code.
Development Setup
Clone Repository
Install With Pixi
Pixi is the canonical development environment. It installs EmbodiK in editable mode and manages Pinocchio, Eigen, Nanobind, CMake, test tools, and docs tools.
Rebuild After Native Changes
Project Structure
embodik/
├── cpp_core/ # C++ core library
│ ├── include/ # Header files
│ └── src/ # Source files
├── python/ # Python package
│ └── embodik/ # Package source
├── python_bindings/ # Nanobind bindings
│ └── src/ # Binding code
├── examples/ # Example scripts
├── test/ # Test suite
├── docs/ # Documentation
└── CMakeLists.txt # CMake configuration
Building
Using CMake (Direct Debugging)
Use direct CMake only when debugging the native build. Otherwise use Pixi.
Using pip (Source-Build Fallback)
If CMake cannot find Pinocchio, Eigen, or URDFDOM, use the source-build fallback in the Installation Guide.
Testing
Run the test suite:
# Run all tests
pixi run test
# Run specific test file
pixi run python -m pytest test/test_robot_model.py
# Hardware-style seed recovery (joint limits + self-collision)
pixi run python -m pytest test/test_hardware_seed_recovery.py
Code Style
EmbodiK follows PEP 8 for Python code:
Documentation
Building Documentation
Writing Documentation
- API documentation is auto-generated from docstrings
- Add docstrings to all public functions and classes
- Use NumPy-style docstrings for consistency
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Add tests for new functionality
- Ensure relevant tests pass:
pixi run test - Format code:
pixi run format - Submit a pull request
Release Process
- Update version in
pyproject.toml - Update
CHANGELOG.md - Create git tag:
git tag v0.1.0 - Push tag:
git push origin v0.1.0 - GitHub Actions will build and publish to PyPI
The PyPI trusted publisher for embodik must match the tag workflow exactly:
- Owner:
robodreamer - Repository:
embodik - Workflow:
wheels.yml - Environment:
pypi
The Publish to PyPI job declares environment: pypi so PyPI receives a
stable environment claim in GitHub's OIDC token. If PyPI reports
invalid-publisher, compare the rendered claims from the Actions log against
the PyPI trusted publisher configuration. A valid token with
environment: pypi can still fail when the PyPI project has no matching
publisher for the owner, repository, workflow filename, and environment.
Debugging
C++ Extension Issues
If the C++ extension fails to load:
CMake Debugging
Enable verbose CMake output:
Questions?
- Open an issue on GitHub
- Check existing documentation
- Review example code in
examples/