Skip to content

Bathymetry Integration

Woensug Choi edited this page Jan 15, 2022 · 29 revisions

Contents

Overview

A bathymetry integration plugin that automatically spawns and removes bathymetry DEM grids converted preliminarily from high-resolution NOAA bathymetry data.

  • Features
    • Automatic spawn/remove with vehicle locations
    • Overlaps for mission continuity
    • Relocate the vehicle to the designated initial latitude and longitude at the start
    • Use bathymetry tile dissected with depth-dependent texture

The plugin is defined at .world file and would require input settings used for preliminarily converted bathymetry data (prefix, spacings, number of columns/rows, anchored latitude/longitude). The bathymetry tile data is located at dave/models/dave_bathymetry_models/.Also, each robot will provide its locations with intervals defined at urdf. The plugin is also usable for multiple robots.

Tutorial: How-to

Quickstart

  1. The bathymetry plugin uses latitude and longitude coordinates to recognize which tiles to spawn and remove. To do so, it uses the GDAL library to convert in between UTM(epsg:4326; X/Y coordinates) coordinate system used in the simulation and WGS86(eps:3857, Latitude/Longitude) coordinates system.
sudo apt-get install python3-gdal
  1. Download files for bathymetry demo and recompile to install
# downloading a file from google drive became compliated. Install and use gdown. Or, use [this link](https://drive.google.com/file/d/1lOqG5cdf5NEHnxsqKyEWNgQ0Ugk6u80A/view?usp=sharing)
# Install gdown
pip install gdown 
# Download demo files archive
gdown --id 1lOqG5cdf5NEHnxsqKyEWNgQ0Ugk6u80A
# Move downloaded file to dave directory
mv Dave_Bathymetry_Demo.tar.gz ~/uuv_ws/src/dave
cd ~/uuv_ws/src/dave
# Extract the demo files
tar -xzvf Dave_Bathymetry_Demo.tar.gz
# recompile
cd ~/uuv_ws
catkin_make
  1. Run gazebo with roslaunch command for bathy_dave launch file:
roslaunch dave_demo_launch dave_bathymetry_demo.launch
  1. Unpause the gazebo by clicking the play button at the bottom-left of the window
  2. As the clock ticks in the ROS Server, set_init_latlon will reposition the vehicle to the initial position defined at the launch file
  3. Zoom out (scroll down) to see the edge of the loaded bathymetry grid tile and the Rexrov
  4. Run this command on a new terminal window
# Assume that you are in the dave directory
python3 gazebo/dave_gazebo_bathymetry_misc/merry_go_round.py

The merry_go_round.py script will move the vehicle in a circle. You may change the script parameter inside to modify center lat/lon, radius, depth, angular speed.

Plugin settings

The details of the plugin settings are described at the end of the dave_bathymetry_demo.world file

    <plugin name="bathy_dave_plugin" filename="libdave_bathymetry_world_plugin.so">
      <bathymetry interval_s="0.1">
        <grid prefix="MontereyBay" priority="1" colmax="10" rowmax="10" anchor_lon="-70.699" anchor_lat="41.509" spacing_lon="0.012" spacing_lat="0.010" />
      </bathymetry>

Also, the update rate for the tiles is specified in each robot description. dave/urdf/robots/rexrov_description/urdf/rexrov_oberon7_bathymetry.xacro

  <gazebo>
      <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>/$(arg namespace)</robotNamespace>
        <robotParam>/$(arg namespace)/robot_description</robotParam>

        <bathymetry>
          <interval_s>0.1</interval_s>
        </bathymetry>

      </plugin>
  </gazebo>

Importing more bathymetry data

  • The bathymetry data need to be converted to be imported using the plugin. The converter to obtain bathymetry tiles from RAW bathymetry files can be found at Bathymetry converter.

*The plugin was developed by Micahel Jakuba at WHOI and modified and implemented to the dave project by Woensug Choi.

Clone this wiki locally