Repository navigation
feat(drone): Integrate 6-DOF Quadrotor Dynamics and 3D Visualization- #15 - #308
Merged
Merged
Conversation
…lation feat(drone): Integrate 6-DOF Quadrotor Dynamics and 3D Visualization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Verification
pytest tests/passesSummary
This PR enhances AdaptiveRL with an integrated 3D quadrotor simulation built on the existing 6-DOF rigid-body dynamics environment while preserving the original 3-DOF kinematic environment.
The implementation improves physical simulation, quadrotor visualization, Streamlit integration, CLI compatibility and reinforcement learning support.
Key Changes
1. 6-DOF Physics Improvements
Added robust physical parameter and state validation.
Implemented continuous swept collision detection to prevent obstacle tunnelling.
Added safe quaternion-to-Euler angle conversion.
Decomposed reward calculations into individually inspectable components.
Strengthened numerical stability and physical validation tests.
2. 3D Quadrotor Visualization
Added a geometrically consistent quadrotor model.
Implemented four arms in X configuration.
Added four rotor hubs and propeller representations.
Added drone heading visualization.
Integrated position and quaternion-based attitude transformations.
Preserved compatibility with the existing Plotly 3D visualizer.
3. Streamlit Flight Deck
Added a selector for 3-DOF and 6-DOF simulation modes.
Integrated attitude-aware 3D flight playback.
Added roll, pitch, yaw, altitude and angular velocity telemetry.
Improved flight-state inspection and simulation playback.
4. Reinforcement Learning and CLI
Fixed environment selection in
demo-drone.Added observation and action-space compatibility checks.
Added PPO and SAC configurations for 6-DOF quadrotor training.
Added checkpoint lifecycle and evaluation integration tests.
Improved environment cleanup.
5. Documentation and Testing
Updated README and architecture documentation.
Expanded 6-DOF mathematical and physical documentation.
Added a dedicated 6-DOF training guide.
Added independent physics validation and training integration tests.
Verification Results
Reported local verification:
Check | Result
-- | --
Focused tests | 89 passed
Complete non-slow test suite | 325 passed
Quaternion stability (50,000 steps) | Passed
Ruff linting and formatting | Passed
Mypy | Passed
Two slow tests were excluded from the complete non-slow test run. GitHub Actions multi-version verification remains pending.
Compatibility and Scope
Preserves the existing 3-DOF environment.
Adds an optional 6-DOF rigid-body quadrotor environment.
Maintains existing research and reinforcement learning architecture.
Does not claim validation against physical UAV hardware.
Expected Outcome
A more complete and integrated educational 3D drone simulation with rigid-body dynamics, realistic quadrotor geometry, interactive flight visualization and PPO/SAC training support.
- [ ] `ruff check src/ tests/` passes - [ ] `mypy src/` passes