This repository provides a Python-based BlueROV2 (heavy configuration) dynamics model, extended to optionally include a lumped-mass tether. The code references:
- von Benzon, M.; Sørensen, F.F.; Uth, E.; Jouffroy, J.; Liniger, J.; Pedersen, S.
An Open-Source Benchmark Simulator: Control of a BlueROV2 Underwater Robot.
J. Mar. Sci. Eng. 2022, 10, 1898. - T.I. Fossen. Handbook of Marine Craft Hydrodynamics and Motion Control, 2nd ed. Wiley, 2021.
-
BlueROV2.py
Contains the coreBlueROV2
class for 6-DOF ROV dynamics, plus an optionalTether
class for lumped-mass tether modeling.- To activate the tether:
rov.use_tether = True rov.tether = Tether(...) rov.tether_state = <initial array> rov.anchor_pos = [x0, y0, z0]
- And call to
rov.dynamics_with_tether(...)
, tension forces are added in body-frame.
- To activate the tether:
-
test_euler.py
Demonstrates simple forward-Euler integration of the ROV. This prints results at each step in real time. -
test_ode.py
Demonstrates implicit integration usingscipy.integrate.solve_ivp(method="BDF")
. This is more stable for stiff tether dynamics. Prints results at each sampled time.
Both the Euler and ODE methods should yield consistent results (though the implicit solver is typically more stable for large thrust or stiff tethers).
- Clone or download this repository.
- Install dependencies:
pip install numpy scipy
- Run:
or
python test_euler.py
python test_ode.py
This project is released under the MIT License. Feel free to use, modify, and distribute. Contributions are welcome!