|
| 1 | +# Python-SLAM Project Structure |
| 2 | + |
| 3 | +This document describes the organized structure of the Python-SLAM project after cleanup and reorganization. |
| 4 | + |
| 5 | +## Root Directory Structure |
| 6 | + |
| 7 | +```text |
| 8 | +python-slam/ |
| 9 | +├── .copilot/ # GitHub Copilot configuration |
| 10 | +├── .github/ # GitHub workflows and templates |
| 11 | +├── .vscode/ # VS Code workspace settings |
| 12 | +├── assets/ # Static assets and media files |
| 13 | +├── config/ # Configuration files |
| 14 | +│ ├── build/ # Build and dependency configuration |
| 15 | +│ │ ├── CMakeLists.txt |
| 16 | +│ │ ├── Makefile |
| 17 | +│ │ ├── package.xml |
| 18 | +│ │ ├── requirements.txt |
| 19 | +│ │ └── setup.py |
| 20 | +│ └── env/ # Environment configuration |
| 21 | +│ ├── .env # Default environment variables |
| 22 | +│ └── .env.multi # Multi-container environment |
| 23 | +├── data/ # Data files and datasets |
| 24 | +├── docker/ # Docker containerization |
| 25 | +│ ├── Dockerfile # Main application container |
| 26 | +│ ├── Dockerfile.backend # Backend service container |
| 27 | +│ ├── Dockerfile.visualization # Visualization container |
| 28 | +│ ├── docker-compose.yml # Standard compose configuration |
| 29 | +│ ├── docker-compose.multi.yml # Multi-container setup |
| 30 | +│ ├── cyclonedx.xml # Software Bill of Materials |
| 31 | +│ └── entrypoint.sh # Container entry point script |
| 32 | +├── docs/ # Documentation |
| 33 | +│ ├── archive/ # Archived documentation versions |
| 34 | +│ │ ├── README_*.md # Previous README versions |
| 35 | +│ │ ├── COMPLETION_SUMMARY*.md # Implementation summaries |
| 36 | +│ │ └── IMPLEMENTATION_*.md # Implementation documents |
| 37 | +│ ├── api/ # API documentation |
| 38 | +│ ├── configuration/ # Configuration guides |
| 39 | +│ ├── design/ # Design documents |
| 40 | +│ ├── diagrams/ # Architecture diagrams |
| 41 | +│ ├── procedures/ # Operational procedures |
| 42 | +│ ├── requirements/ # Requirements documentation |
| 43 | +│ └── testing/ # Testing documentation |
| 44 | +├── launch/ # ROS2 launch files |
| 45 | +├── resource/ # ROS2 resource files |
| 46 | +├── rviz/ # RViz configuration files |
| 47 | +├── scripts/ # Build and utility scripts |
| 48 | +│ ├── build_ros2.sh # ROS2 build script |
| 49 | +│ ├── dev.sh # Development environment setup |
| 50 | +│ ├── install.sh # Installation script |
| 51 | +│ ├── launch_slam.sh # SLAM launch script |
| 52 | +│ ├── run-multi.sh # Multi-container runner |
| 53 | +│ ├── setup.sh # General setup script |
| 54 | +│ ├── setup_dev.sh # Development setup |
| 55 | +│ ├── test-multi.sh # Multi-container testing |
| 56 | +│ └── test_pyslam_*.py # PySlam integration tests |
| 57 | +├── src/ # Source code |
| 58 | +│ ├── python_slam/ # Main Python package |
| 59 | +│ └── python_slam_main.py # Main application entry point |
| 60 | +├── tests/ # Test suite |
| 61 | +│ ├── test_comprehensive.py # Comprehensive test suite (NASA STD-8739.8) |
| 62 | +│ ├── test_framework.py # Framework tests |
| 63 | +│ └── test_slam_modules.py # Module-specific tests |
| 64 | +├── tools/ # Development and validation tools |
| 65 | +│ └── validation/ # System validation tools |
| 66 | +│ ├── configure.py # Configuration wizard |
| 67 | +│ └── validate_system.py # System validation script |
| 68 | +├── CHANGELOG.md # Version history and changes |
| 69 | +├── README.md # Main project documentation |
| 70 | +└── TODO.md # Project todo list |
| 71 | +``` |
| 72 | + |
| 73 | +## Organization Principles |
| 74 | + |
| 75 | +### 1. Configuration Management |
| 76 | + |
| 77 | +- **config/build/**: Build system configuration (CMake, Make, setuptools, requirements) |
| 78 | +- **config/env/**: Environment variables and runtime configuration |
| 79 | +- **docker/**: All Docker-related files consolidated in one location |
| 80 | + |
| 81 | +### 2. Documentation Strategy |
| 82 | + |
| 83 | +- **docs/**: Active documentation with organized subdirectories |
| 84 | +- **docs/archive/**: Historical versions and deprecated documentation |
| 85 | +- Separation of API docs, design docs, and user guides |
| 86 | + |
| 87 | +### 3. Code Organization |
| 88 | + |
| 89 | +- **src/**: All source code including main application entry point |
| 90 | +- **tests/**: Comprehensive test suite with NASA STD-8739.8 compliance |
| 91 | +- **tools/**: Development utilities and validation scripts |
| 92 | + |
| 93 | +### 4. Operational Files |
| 94 | + |
| 95 | +- **scripts/**: All shell scripts for build, setup, and deployment |
| 96 | +- **launch/**: ROS2 launch configurations |
| 97 | +- **rviz/**: Visualization configurations |
| 98 | + |
| 99 | +### 5. Asset Management |
| 100 | + |
| 101 | +- **assets/**: Static files and media |
| 102 | +- **data/**: Datasets and runtime data |
| 103 | +- **resource/**: ROS2 package resources |
| 104 | + |
| 105 | +## Benefits of This Structure |
| 106 | + |
| 107 | +1. **Clear Separation of Concerns**: Each directory has a specific purpose |
| 108 | +2. **Easy Navigation**: Developers can quickly find relevant files |
| 109 | +3. **Build System Clarity**: All build configs in config/build/ |
| 110 | +4. **Documentation Organization**: Active vs archived documentation |
| 111 | +5. **Container Management**: All Docker files in one location |
| 112 | +6. **Tool Accessibility**: Development tools in dedicated directory |
| 113 | +7. **Clean Root**: Minimal files in root directory for better readability |
| 114 | + |
| 115 | +## Maintenance Guidelines |
| 116 | + |
| 117 | +- Keep root directory clean with only essential files |
| 118 | +- Archive old documentation versions in docs/archive/ |
| 119 | +- Place new configuration files in appropriate config/ subdirectories |
| 120 | +- Add new tools to tools/ with appropriate subdirectories |
| 121 | +- Maintain this structure documentation when making organizational changes |
| 122 | + |
| 123 | +## File Reference Updates |
| 124 | + |
| 125 | +After reorganization, scripts and configurations may need path updates: |
| 126 | + |
| 127 | +- Main application: `src/python_slam_main.py` |
| 128 | +- Requirements: `config/build/requirements.txt` |
| 129 | +- Docker compose: `docker/docker-compose.yml` |
| 130 | +- Environment: `config/env/.env` |
| 131 | +- Build configs: `config/build/` |
0 commit comments