Skip to content
项目

cybergalactic/PythonVehicleSimulator

在 GitHub 查看

关于

The Python Vehicle Simulator is software that supplements the textbook "Handbook of Marine Craft Hydrodynamics and Motion Control," 2nd Edition, by T. I. Fossen, published in 2021 by John Wiley & Sons Ltd.

学习与教育

这些数字如何统计

实测星标增长

24小时
0
7天
+4
15天
+6
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Python Vehicle Simulator

The Python Vehicle Simulator supplements the MATLAB MSS (Marine Systems Simulator) Toolbox. It includes models for autonomous underwater vehicles (AUVs), unmanned surface vehicles (USVs), and ships. The vehicle models are based on the MSS vessel models in /MSS/VESSELS/catalog. Each vehicle is modeled as an object in Python, and the vehicle class has methods for guidance, navigation, and control. The main program main.py defines vehicle objects for real-time simulation.

Root folder:
/src/python_vehicle_simulator/ 
    main.py                 - MAIN PROGRAM (terminal command >> python3 main.py)
    3D_animation.gif        - 3D animation file that can be opened in a web browser by right-clicking the file   
    
Library files:
/src/python_vehicle_simulator/lib/         
    control.py              - feedback control systems
    gnc.py                  - generic GNC functions
    guidance.py             - guidance functions        
    mainLoop.py             - main simulation loop
    plotTimeSeries.py       - plotting and animation functions

Vehicle classes/methods: 
/src/python_vehicle_simulator/vehicles/              
    DSRV.py                 - Deep submergence rescue vehicle (DSRV) controlled by a stern plane, L = 5.0 m
    frigate.py              - Frigate, rudder-controlled ship described by a nonlinear Nomoto model, L = 100.0 m
    otter.py                - Otter unmanned surface vehicle (USV) controlled by two propellers, L = 2.0 m
    ROVzefakkel.py          - Zeefakkel, rudder-controlled ship described by a nonlinear Nomoto model, L = 54.0 m
    semisub.py              - Semisubmersible controlled by tunnel thrusters and main propellers, L = 84.5 m
    shipClarke83.py         - Ship, linear maneuvering model specified by L, B and T using the Clarke (1983) formulas
    supply.py               - Offshore supply vessel controlled by tunnel thrusters and main propellers, L = 76.2 m
    tanker.py               - Tanker, rudder-controlled ship model including shallow water effects, L = 304.8 m
    remus100.py             - Cylinder-shaped AUV controlled by a rudder, stern planes and a propeller, L = 1.6 m 
    torpedo.py              - Cylinder-shaped torpedo controlled by a rudder, stern planes and a propeller, L = 1.6 m         

For more information about the mathematical modeling of marine craft and methods for guidance, navigation, and control, please consult:

T. I. Fossen (2021). Handbook of Marine Craft Hydrodynamics and Motion Control. 2nd. Edition, Wiley. https://wiley.fossen.biz

Install:

To run the main program main.py the following modules must be installed:

numpy           https://numpy.org/install/
matplotlib      https://matplotlib.org/stable/users/installing.html
pytest          https://docs.pytest.org

These dependencies will be automatically installed using the following command:

pip install -e <path>

where <path> is the location of the downloaded or cloned PythonVehicleSimulator repository.

####Example:

  1. Go to https://github.com/cybergalactic/PythonVehicleSimulator
  2. Click the green Code button and choose Download ZIP
  3. Extract the ZIP file (you’ll get a folder like PythonVehicleSimulator-main, which you can rename if desired).
  4. Open a terminal and run:

```python3 -m pip install -e /MY_PATH/PythonVehicleSimulator-main`` Replace /MY_PATH/ with the actual path on your system.

Note: The -e option installs the simulator in editable mode, allowing you to modify the source files and see changes immediately. If you omit -e, you can still run the program, but changes to the code won’t take effect until you reinstall the package.

To run tests:

pip install pytest
pytest

探索相关项目

加载中…