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 for the tiling to work.

Converting grids from NOAA Data

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

Clone the bathymetry converter repository

git clone [email protected]:Field-Robotics-Lab/Bathymetry_Converter.git

Install prerequisite packages (approx. 1.5 hours)

  • Installation based on Ubuntu 18.04 LTS

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 the 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

tar -xzf proj-$VERSION.tar.gz && cd proj-$VERSION
./configure && make -j4
sudo checkinstall -y -install
proj --version
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
sudo apt-get install ./gdal_3.1.3-1_amd64.deb
gdalinfo --version
  • Install pdal

    • if stopped at log file opened with vi, type ':q' to quit
tar xzfj PDAL-$VERSION-src.tar.bz2 && 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 to be called using the bathymetry plugin bathymetry plugin tutorial

Clone this wiki locally