A modern C++ library for 3D rotations, poses, and trajectories with comprehensive tooling. MoveG is designed for robotics and computer vision applications, providing a robust foundation for spatial transformations with strong type safety and error checking.
- Robust 3D transformation handling (quaternions, rotation matrices, Euler angles)
- Coordinate frame transformations with error checking
- Modern C++20 implementation
- Comprehensive unit tests with Catch2
- Automated code quality checks
- Memory safety with sanitizers
- High-performance optimizations (LTO, parallel builds)
Provides representation and operations for 3D rotations using quaternions, rotation matrices, Euler angles, and axis-angle representations. Supports conversion between formats, composition of rotations, and angular velocity transformations.
Builds on the rotation library to represent 6-DOF poses (position and orientation). Supports transformation composition, inverse operations, and coordinate frame conversions with proper error handling.
Will provide capabilities for motion planning and trajectory generation.
- CPM: Package manager for dependency handling
- Catch2: Unit testing framework
- fmt: Modern string formatting library
- Eigen: Linear algebra library
- Clang Tools: Format and static analysis
- Sanitizers: Address, undefined behavior, and leak detection
- Doxygen: Documentation generation
- pre-commit: Git hooks for code quality checks
# Clone the repository with submodules
git clone --recursive https://github.com/GiorgioMedico/MoveG.git
cd MoveG
# Create build directory
mkdir build && cd build
# Configure and build (Release mode)
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
# Run the main executable
cd app
./main
# Run all tests
cd ..
ctest -C Release
# Generate documentation
cmake --build . --target docs
# Run code coverage analysis
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=On ..
cmake --build . --target coverage
# Code formatting
cmake --build . --target run_clang_format
cmake --build . --target run_cmake_format-DENABLE_TESTING=ON/OFF: Enable/disable unit tests (default: ON)-DENABLE_COVERAGE=ON/OFF: Enable code coverage analysis (default: ON)-DENABLE_CLANG_TIDY=ON/OFF: Enable static analysis (default: ON)-DENABLE_SANITIZE_ADDR=ON/OFF: Enable address sanitizer (default: ON)-DENABLE_SANITIZE_UNDEF=ON/OFF: Enable undefined behavior sanitizer (default: ON)-DENABLE_SANITIZE_LEAK=ON/OFF: Enable memory leak sanitizer (default: ON)-DENABLE_LTO=ON/OFF: Enable link-time optimization (default: OFF, auto-ON for Release)-DENABLE_WARNINGS_AS_ERRORS=ON/OFF: Treat warnings as errors (default: OFF)-DUSE_CPM=ON/OFF: Use CPM for dependency management (default: ON)
This project includes optimized configuration for VS Code:
- Press
Alt+Sto delete CMake cache and reconfigure - Use the "CMake: Build" task for building
- Use the "CMake: Run Tests" button for running tests
- Use built-in tasks for documentation and code coverage
src/MoveG_Lib/- Core library implementationrotation_lib.{h,cpp}- 3D rotation managementpose_lib.{h,cpp}- Pose (position + orientation) handlingtraj_lib.{h,cpp}- Trajectory planning (in development)
app/- Example applicationspose_example.cpp- Demonstration of pose library featuresrotation_example.cpp- Demonstration of rotation library features
tests/- Unit tests with Catch2test_Pose.cpp- Comprehensive tests for pose functionalitytest_Rotation.cpp- Comprehensive tests for rotation functionality
cmake/- Build system modulesCodeCoverage.cmake- Code coverage configurationSanitizer.cmake- Memory and behavior sanitizersLTO.cmake- Link-time optimization
docs/- Documentationtools/- Development helper scripts
MoveG uses Eigen3 as its primary dependency for linear algebra and geometry operations. The required version is automatically installed via CPM during the build process.
- CMake 3.21+
- C++20 compatible compiler (GCC 9+, Clang 9+, MSVC 2019+)
- Git (for cloning and development)
- Doxygen (for documentation generation)
- Python 3 (for helper scripts)
Apache License 2.0
Contributions are welcome. Please format your code with clang-format and ensure all tests pass before submitting pull requests.