Code for our ICRA 2023 paper "Real-Time Navigation for Autonomous Surface Vehicles In Ice-Covered Waters". Links to ICRA presentation and demo video.
sim2D_demo_vid.mp4
- clone the project
git clone https://github.com/rdesc/Autonomous-Ship-In-Ice
- Create and activate new environment
conda create --name ship_ice_planner python=3.6
conda activate ship_ice_planner
- Install requirements from "requirements.txt". Note, may need to install the dubins package manually (see here for instructions).
pip install -r requirements.txt
The planner is intended to run in a separate python process from the simulator/controller where one process, e.g. the physics simulator, is responsible for sending the current goal, ship state, and ice field information to the planner and the planner process uses this information to generate a plan which gets sent back to the main process.
All the parameters are configured via a yaml file. Sample configuration files are provided in the config
directory.
Run the following console command to start the physics simulation and planner in separate processes:
python sim2d_ship_ice_navigation.py
The script will launch the demo function which will initialize the physics simulation and planner processes with a starting ship state, goal, and ice environment.
To generate empirical data of planner performance in simulation, the following script runs a series of simulation trials in sequence as well as baseline planners (e.g. straight planner and morphological skeleton planner).
python -m experiments.sim_exp.py
Alternatively, the planner can generate paths without navigating a ship (either real world or in simulation) via the following console command:
python -m ship_ice_planner.launch
The script will launch the demo function.
Note, the config parameter output_dir
needs to be set to a valid directory path for the planner to save the generated paths.
The planner can also be imported as a python module and launched, e.g.:
from ship_ice_planner.launch import launch
config_file = 'configs/no_physics.yaml' # demo config
queue = Queue()
queue.put(dict(
goal=(0, 70),
ship_state=(6, 10, np.pi / 2),
obstacles=pickle.load(open('data/demo_ice_data.pk', 'rb'))
))
launch(cfg_file=config_file, queue=queue, debug=True, logging=True)
By default debug
mode is set to False and logging
to console is set to True.
To evaluate the results of the simulation trials, run the following script:
python -m ship_ice_planner.src.evaluation.evaluate_run_sim.py
To generate ice field simulation data, use the following script:
python -m experiments.generate_rand_exp.py
Example of ice field generated with 0.4 concentration.