Skip to content

Latest commit

 

History

History
129 lines (116 loc) · 4.73 KB

File metadata and controls

129 lines (116 loc) · 4.73 KB

Directory Description

  1. ./UUV This folder mainly contains the Unmanned Underwater Vehicle (UUV) model, camera parameters, and launch scripts.
    1. Config.json is the parameter file for the stereo camera. Changing the TypeID parameter allows you to modify the sensor type. TypeID=1 corresponds to RGB images, TypeID=2 to grayscale images, and TypeID=3 to depth images.
    2. UUV.params are the PD control parameters for the UUV, used in Hardware-in-the-Loop (HITL) simulations.
    3. px4_fmu-v6c_default.px4 is the HITL flight controller firmware for the UUV targeting the PX4 FMU v6c hardware. For other versions, refer to the firmware compilation tutorial below.
    4. UUVModel.dll is the dynamics model of the UUV, developed using Simulink and compiled for use in CopterSim software. This file should be in the same directory as the one-click launch script.
    5. UUVModel_HITL.bat is the one-click launch script for HITL simulation with UE4.
    6. UUVModel_SITL.bat is the one-click launch script for Software-in-the-Loop (SITL) simulation with UE4.
    7. UUVModel_HITLUE5.bat is the one-click launch script for HITL simulation with UE5.
    8. UUVModel_SITLUE5.bat is the one-click launch script for SITL simulation with UE5.
  2. ./Demo This folder mainly contains the UUV control demo code.
    1. UUVAttCtrlCamera.py is a sample program for the camera (does not start ROS publishing).
    2. UUVAttCtrlPath.py is a sample program for UUV control.
  3. ./euroc_uuv This folder mainly contains configurations for topics used in Vins subscriptions. To run the fusion localization, this configuration is required.
  4. ./FusionLocation This folder contains the fusion localization code for the UUV.
    1. Config.json is also the parameter file for the stereo camera. It is the same as the one in the UUV directory, and this file needs to be in the same directory as the image-capturing code.
    2. kf.py is the Kalman filter code.
    3. UUVAtt_server.py is the remote control program for the UUV (can be run remotely).
    4. relocate.py is the relocalization program for VINS.
    5. ropeInfo_generator.py is the rope localization program.
    6. path_fusion.py is the position fusion program.
    7. oneKeyScript.sh is the one-click startup script for all programs.

Starting Software-in-the-Loop (SITL)

  1. Run the following script as administrator: ./UUV/UUVModel_SITL.bat, and input 1 to create an aircraft. This script will open CopterSim, QGroundControl, and RflySim3D.
  2. Run the example programs located in the Demo folder.

Starting Hardware-in-the-Loop (HITL)

  1. On the host machine running the simulation platform, plug in the flight controller hardware (with firmware already flashed) via USB.
  2. Run the following script as administrator: ./UUV/UUVModel_HITL.bat, and input the corresponding COM port number when prompted. The port number will be displayed in the command line window. This script will open CopterSim, QGroundControl, and RflySim3D.
  3. Run the example programs located in the Demo folder.

Starting Fusion Localization

  1. Prepare an Ubuntu virtual machine and install Python 3.8.
  2. Download and compile VINS-Fusion, using the configurations provided in the ./euroc_uuv folder.
  3. Copy the ./FusionLocation directory to the virtual machine.
  4. Copy the RflySimSDK folder from the platform API directory to the virtual machine, and run ReLabPath.py to load the Python interface provided by the platform (this must be done after each platform update).
  5. Run either ./UUV/UUVModel_SITLUE5.bat or ./UUV/UUVModel_HITLUE5.bat as administrator to start the simulation platform.
  6. On the virtual machine, run oneKeyScript.sh to start the fusion localization process in one click.

Note: All the above steps require the RflySim platform. For more information and detailed tutorials, please visit: www.rflysim.com