Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

auvlib

> 开发工具
Open source

Modern C++ and python library for reading and processing sonar data

99 stars0 likes1 views
WebsiteGitHub

About

Modern C++ and python library for reading and processing sonar data

auvlib

Tools for reading AUV deployment data files and for processing and visualization of side scan and multibeam data. Extensive documentation for the python API is available at this site.

To use auvlib on Linux, it is recommended to build the library on your machine (see the following sections). On Windows, it is instead recommended to use the pre-compiled statically linked python libraries. See the releases page for details on how to install and use the latest release.

Dependencies

auvlib has been tested on Ubuntu 16.04, 18.04 and 20.04. On Ubuntu 16.04, 18.04 and 20.04, use the following command to install all dependencies:

bash
sudo apt-get install libcereal-dev libglfw3-dev libtinyxml2-dev libboost-all-dev libopencv-dev xorg-dev

Building

Once cloned, you need to get the libigl submodule and some of its dependencies:

bash
git submodule update --init

When done, create a build folder in the repo root, and enter:

bash
mkdir build && cd build

Then execute the following cmake command depending on your platform:

  • Ubuntu 16.04: cmake -DCMAKE_INSTALL_PREFIX=../install .. -DAUVLIB_USE_LIBIGL_TINYXML=OFF -DAUVLIB_USE_LIBIGL_GLFW=OFF
  • Ubuntu 18.04: cmake -DCMAKE_INSTALL_PREFIX=../install ..
  • Ubuntu 20.04: cmake -DCMAKE_INSTALL_PREFIX=../install ..

NOTE: If you are using a conda python executable, you first need to change the flag on line 78 from set(PYTHON_EXECUTABLE /usr/bin/python3) to something like set(PYTHON_EXECUTABLE /home/user/anaconda3/envs/[YOUR ENV NAME]/bin/python).

NOTE: Ignore the errors about the tinyxml2 and glfw targets not being in the export set; build files are still generated properly.

When done, build and intall the code using

make -j4 && make install

You should now have a compiled version of auvlib in the folder /path/to/auvlib/install. When done, please execute

bash
export PYTHONPATH=$PYTHONPATH:/path/to/auvlib/install/lib

in any terminal where you want to use the python version of the library, or add this line to your ~/.bashrc.

Using as a python library

Python 3 is the preferred interface for auvlib. In general, the python bindings have more complete documentation and supports most of the use cases of the c++ library. Extensive documentation is available at this site.

Simple python example

As an example, in the snippet below, we read multibeam data from a .gsf file, and create an image with the vehicle track and a multibeam height map.

python
from auvlib.data_tools import std_data, gsf_data
from auvlib.bathy_maps import draw_map
import sys

gsf_pings = gsf_data.gsf_mbes_ping.parse_folder(sys.argv[1]) # parse folder of gsf data
mbes_pings = gsf_data.convert_pings(gsf_pings) # convert to std_data pings

d = draw_map.BathyMapImage(mbes_pings, 500, 500) # create a bathymetry height map
d.draw_height_map(mbes_pings) # draw the height map
d.draw_track(mbes_pings) # draw the track of the vehicle
d.write_image("height_map.png") # save the height map to "height_map.png"

Advanced functionality

This example show how to drape a bathymetric mesh with sidescan data, and to generate a visualization similar to the image above. The program allows the user to click on any point in the mesh, and the draping will find all sidescan observations of that point and plot the corresponding intensity images using the data_vis.plot_patch_views function.

…

Python documentation and resources

The project directories contains examples and documentation, see pybathy_maps, pydata_tools or pysonar_tracing.

Using as a c++ library

First, initialize the submodules, same as for the previous section. For using auvlib as a library in an external project, check out the example projects. If you just want to use auvlib for reading data, please see the minimal data project.

For more complete documentation on C++ library usage, see the overview document.

Contributors

  • @nilsbore
  • @dawierha
  • @ignaciotb
  • @xyp8023
  • @iyuner
  • @MaxLarsson2

Acknowledgements

This work was supported by Stiftelsen för Strategisk Forskning (SSF) through the Swedish Maritime Robotics Centre (SMaRC) (IRC15-0046). See the SMARC website for details.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++auvmaritimemaritime-robotsmultibeam

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具