한국어 | English
A simulation platform for Autonomous Surface Vessels (ASV) that navigate safely to goal positions while avoiding dynamic and static obstacles in maritime environments
- A* Pathfinding: Grid-based optimal path calculation
- Reinforcement Learning (PPO): Real-time obstacle avoidance with 360° sensors
- RRT* (Reference): Sampling-based path planning (scripts only)
- Realistic maritime environment using Crest Ocean System
- Configurable static (0
8) and dynamic (04) obstacles - 6-DOF boat physics simulation
- Unity: 2021.3 LTS or higher
- Python: 3.8+ (for ML-Agents training)
- ML-Agents Toolkit: 2.0+
- Clone repository
git clone https://github.com/your-username/unity-asv-navigation-rl.git
cd unity-asv-navigation-rl- Install ML-Agents (for RL training)
pip install mlagents==0.30.0-
Open project in Unity
- Launch Unity Hub
- Click "Open" and select the cloned project folder
- Wait for Unity to import all assets
-
Verify package dependencies
- The project will automatically import required packages via Package Manager
- Check dependencies in
Packages/manifest.json
- Open
Assets/Scenes/Train-AStar.unity - Click Play button in Unity Editor
- The boat will automatically navigate using A* pathfinding
- Results are logged to the console
- Open
Assets/Scenes/Train-RL.unity - Ensure a trained model is loaded in the
BoatAgent_RLcomponent - Click Play button
- The boat will navigate using the trained RL policy
- Create a new scene or open an existing scene
- Drag the desired prefab from
Assets/Prefabs/:TrainArea-AStar.prefab- A* navigation setupTrainArea_RL.prefab- RL agent setup
- Configure parameters in the Inspector
- Press Play to start the simulation
-
Configure training parameters
- Edit
config/boat_rl_curriculum.yaml(for curriculum learning)
- Edit
-
Start training
mlagents-learn config/boat_rl_curriculum.yaml --run-id=ASV_Navigation_v1-
Monitor training progress
- Open TensorBoard:
tensorboard --logdir results/ - View learning curves, rewards, and episode statistics
- Open TensorBoard:
-
Export trained model
- Model will be saved in
results/ASV_Navigation_v1/ - Copy
.onnxfile toAssets/ML-Agents/for inference
- Model will be saved in
autonomous-usv-navigation/
├── Assets/
│ ├── Scenes/ # Unity scenes
│ │ ├── Train-AStar.unity # A* navigation scene
│ │ └── Train-RL.unity # RL training/test scene
│ │
│ ├── Scripts/ # C# source code
│ │ ├── BoatProbesBase.cs # Boat physics base class
│ │ ├── BoatProbes_AStar.cs # A* boat controller
│ │ ├── BoatProbes_RL.cs # RL boat controller
│ │ ├── BoatProbesAI.cs # AI boat controller
│ │ ├── BoatAgent.cs # Basic ML-Agents agent
│ │ ├── BoatAgent_RL.cs # Advanced RL agent
│ │ ├── BoatAIController_AStar.cs # A* pathfinding logic
│ │ ├── BoatAIController_RRT.cs # RRT* pathfinding logic
│ │ ├── BoatAIAdapter.cs # AI adapter interface
│ │ ├── BoatMovementEnhancer.cs # Boat movement enhancement utility
│ │ ├── ObstacleController.cs # Obstacle control script
│ │ ├── MoveComponent.cs # Movement component
│ │ ├── PlaytimeLogger.cs # Runtime logging utility
│ │ └── DataScript/ # Data collection utilities
│ │ ├── AStar/ # A* experiment data
│ │ │ └── Experimentmanager.cs # Experiment manager
│ │ └── Testmanager.cs # Test manager
│ │
│ ├── Prefabs/ # Reusable game objects
│ │ ├── TrainArea-AStar.prefab
│ │ ├── TrainArea_RL.prefab
│ │ └── [Obstacle prefabs]
│ │
│ ├── Materials/ # 3D materials
│ ├── Models/ # 3D models
│ └── ML-Agents/ # Trained ML models
│
├── config/ # ML-Agents configs
│ ├── boat_rl_curriculum.yaml # Curriculum learning config
│ └── boat_rl_test.yaml # Test config
│
├── Packages/ # Unity packages (auto-managed)
├── ProjectSettings/ # Unity project settings
│
├── README.md # English README (this file)
└── README_KR.md # Korean README
- Crest Ocean System 4
- A* Pathfinding Project 4.2.17
- Unity ML-Agents 2.0+
Built with ❤️ for maritime autonomous research