Skip to content

Bathymetry Data Conversion for Bathymetry Plugin

Woensug Choi edited this page Sep 15, 2020 · 15 revisions
  • The converter script was developed by Micahel Jakuba at WHOI and implemented to the dave project by Woensug Choi.

Proclaimer

The Gazebo includes direct uploads of DEM data on the simulator (Gazebo tutorial for DEM link). However, it handles only grids and suggests downsampling to coarse resolutions. The pipeline of this converter constructs simplified triangular meshes that retain detail where it is needed. The pipeline also creates overlap and generates tiles with the special/arbitrary filenames required by the plugin. A major limitation of the bathymetry converter-plugin is the arbitrary file naming convention that has to be followed in order for the tiling to work.

Converting grids from NOAA Data

  • This process takes much time (approx. 2 hours)

Install prerequisite packages (approx. 1.5 hours)

download bathymetry source file

cd Bathymetry_Converter/mkbathy
wget -O bathymetry_source.tar.bz2 https://www.dropbox.com/s/x3acdnnpw3ej9b4/bathymetry_source.tar.bz2?dl=1
tar xvfj bathymetry_source.tar.bz2
cd ..

unzip dependency files (meshlab portable)

from dave project folder

cd Bathymetry_Converter/mkbathy/mkbathy_dependencies
tar xvfj meshlab_linux_portable.tar.bz2
cd ../../

Packages for bash script

sudo apt-get install gmt gmt-dcw gmt-gshhg apcalc sqlite3 checkinstall libudunits2-dev libgdal-dev libgeos-dev libproj-dev

Install gdal and pdal

  • Install proj version ≥ 6.0

tar -xzf proj-$VERSION.tar.gz && cd proj-$VERSION
./configure && make -j4
sudo checkinstall -y -install
proj --version
  • Install gdal

    • do install padal (down below) while 'make -j4' running to save some time
tar -xzf gdal-$VERSION.tar.gz && cd gdal-$VERSION
./configure --enable-shared --with-python=python3 --with-proj=/usr/local
make -j4
sudo checkinstall -y -install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" >> ~/.bashrc
gdalinfo --version
  • Install pdal

    • if stopped at log file opned with vi type ':q' to quit
tar -xzf PDAL-$VERSION-src.tar.gz && cd PDAL-$VERSION-src
cmake . && sudo checkinstall -y -install
pdal --version

Run mkbathy.sh script to convert data (approx. 0.5 hours)

cd mkbathy
chmod +x mkbthy.sh
./mkbathy.sh

converted gazebo model files will be saved at Bathymetry_Converter/bathymetry

Clone this wiki locally