nilsbore / auvlib Goto Github PK
View Code? Open in Web Editor NEWModern C++ and python library for reading and processing sonar data
Home Page: https://nilsbore.github.io/auvlib-docs
License: Other
Modern C++ and python library for reading and processing sonar data
Home Page: https://nilsbore.github.io/auvlib-docs
License: Other
There are a few features to tick off before tagging a 1.0 version:
std_data::sss_ping
mirroring xtf_data::xtf_sss_ping
that replaces the latter in all algorithmsdraping_result
callback to view_draper
Breaking changes:
Maybe something broke in the ray tracing code? I tested this:
and got all zeros for the times.And when I tested the draping with ray tracing enabled, with debug_output
set True, I found out that all those times printing from this line:
auvlib/src/bathy_maps/src/base_draper.cpp
Line 204 in bff6d55
Can we add an instruction on the readme saying if you want to use auvlib as shared libraries you should add it your path?
Something like:
Add this too to your .bashrc
export PATH=$PATH:/yourpathto/auvlib/install/share
C. Chien succeeded compiling with version 3.3.7 but not with 3.2.10, 3.2.92 and 3.3.90.
Note: on my computer I have eigen 3.2.92, and it works.
Discovered by C. Chien:
Just found out that the issue related to eigen3 is due to incompatibility between different versions of eigen3. I installed auvlib on another computer with eigen-3.2.10, and got error messages listed at the end of this email. Then I installed Eigen-3.2.92, and expected it would work, but got another type of error saying ceres require Eigen version 3.3.7 during cmake .. (i.e. Makefile was not even generated). Not sure why I didn't get that message earlier and had Makefile generated). So I installed Eigen 3.3.7, then auvlib was successfully made and built. Thanks. C. Chien
/usr/local/include/eigen3/Eigen/src/StlSupport/StdVector.h:69:9: error: partial specialization of ‘class std::vector<T, Eigen::aligned_allocator >’ after instantiation of ‘class std::vector<Eigen::Matrix<double, 2, 2>, Eigen::aligned_allocator<Eigen::Matrix<double, 2, 2> > >’ [-fpermissive]
class vector<T,EIGEN_ALIGNED_ALLOCATOR >
^
/usr/local/include/eigen3/Eigen/src/StlSupport/StdVector.h:69:9: error: partial specialization of ‘class std::vector<T, Eigen::aligned_allocator >’ after instantiation of ‘class std::vector<Eigen::Matrix<double, 3, 3>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 3> > >’ [-fpermissive]
/usr/local/include/eigen3/Eigen/src/StlSupport/StdVector.h:69:9: error: partial specialization of ‘class std::vector<T, Eigen::aligned_allocator >’ after instantiation of ‘class std::vector<Eigen::Matrix<double, -1, -1>, Eigen::aligned_allocator<Eigen::Matrix<double, -1, -1> > >’ [-fpermissive]
/usr/local/include/eigen3/Eigen/src/StlSupport/StdVector.h:69:9: error: partial specialization of ‘class std::vector<T, Eigen::aligned_allocator >’ after instantiation of ‘class std::vector<Eigen::Matrix<double, 3, 1>, Eigen::aligned_allocator<Eigen::Matrix<double, 3, 1> > >’ [-fpermissive]
/home/chchien/catkin_ws/src/auvlib/src/bathy_maps/src/drape_mesh.cpp: In function ‘std::pair<Eigen::Matrix<double, -1, -1>, Eigen::Matrix<int, -1, 1> > correlate_hits(const MatrixXd&, const VectorXi&, const VectorXd&, const xtf_data::xtf_sss_ping_side&, const Vector3d&, double, const MatrixXi&, const EntriesT&, bool, Eigen::MatrixXd&, Eigen::VectorXd&, Eigen::VectorXi&, bool)’:
/home/chchien/catkin_ws/src/auvlib/src/bathy_maps/src/drape_mesh.cpp:237:66: error: call of overloaded ‘Matrix(int)’ is ambiguous
return make_pair(Eigen::MatrixXd(0, 4), Eigen::VectorXi(0));
When building the repo on the Xavier, I get the following error:
~/auvlib/build$ make -j4
Scanning dependencies of target tinyxml2
Scanning dependencies of target auvlib_glad
Scanning dependencies of target math
Scanning dependencies of target sys
[ 0%] Building CXX object src/embree/common/math/CMakeFiles/math.dir/constants.cpp.o
[ 1%] Building CXX object src/CMakeFiles/tinyxml2.dir/libigl/external/tinyxml2/tinyxml2.cpp.o
c++: error: unrecognized command line option ‘-msse2’
src/embree/common/math/CMakeFiles/math.dir/build.make:62: recipe for target 'src/embree/common/math/CMakeFiles/math.dir/constants.cpp.o' failed
make[2]: *** [src/embree/common/math/CMakeFiles/math.dir/constants.cpp.o] Error 1
CMakeFiles/Makefile2:1286: recipe for target 'src/embree/common/math/CMakeFiles/math.dir/all' failed
make[1]: *** [src/embree/common/math/CMakeFiles/math.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 1%] Building C object src/CMakeFiles/auvlib_glad.dir/libigl/external/glad/src/glad.c.o
[ 1%] Building CXX object src/embree/common/sys/CMakeFiles/sys.dir/sysinfo.cpp.o
[ 2%] Building CXX object src/embree/common/sys/CMakeFiles/sys.dir/alloc.cpp.o
c++: error: unrecognized command line option ‘-msse2’
src/embree/common/sys/CMakeFiles/sys.dir/build.make:62: recipe for target 'src/embree/common/sys/CMakeFiles/sys.dir/sysinfo.cpp.o' failed
make[2]: *** [src/embree/common/sys/CMakeFiles/sys.dir/sysinfo.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option ‘-msse2’
src/embree/common/sys/CMakeFiles/sys.dir/build.make:86: recipe for target 'src/embree/common/sys/CMakeFiles/sys.dir/alloc.cpp.o' failed
make[2]: *** [src/embree/common/sys/CMakeFiles/sys.dir/alloc.cpp.o] Error 1
CMakeFiles/Makefile2:1231: recipe for target 'src/embree/common/sys/CMakeFiles/sys.dir/all' failed
make[1]: *** [src/embree/common/sys/CMakeFiles/sys.dir/all] Error 2
[ 3%] Linking C static library libauvlib_glad.a
[ 3%] Built target auvlib_glad
[ 3%] Linking CXX static library libtinyxml2.a
[ 3%] Built target tinyxml2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
It looks like the problem comes from the embree submodule of libigl. By taking a closer look I saw that the imported version is v3.5.2, which does not support ARM architectures. This feature has been implemented starting from v3.13.0.
Having said that, I tried a variety of options, including:
make xCPUARCH=armv8l -j4
as suggested in this other issueHowever, the same error kept occurring.
Anyway, this is just my assumption on what the issue could be, maybe I'm extremely off-track and the fix turns out to be easier than expected.
The derivatives are currently taken wrt the process rather than wrt the testing points. This should be fixed.
The neg log likelihoods do not actually reverse the sign. Fix this (low priority).
Can we add to the documentation and maybe to the tutorial that auvlib.data_tools.all_data.match_attitude needs to be called in order to have access to pitch and roll information at later stages?
Hi, I am building a docker image based on ros. When I tried to install auvlib, there is a CMake Error at satge "RUN cmake -DCMAKE_INSTALL_PREFIX=../install .. && make -j4".
The error massage is:
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "mesh_map" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "mesh_map" which requires target "igl_opengl_glfw" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "align_map" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "align_map" which requires target "igl_opengl_glfw" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "drape_mesh" which requires target "igl_embree" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "drape_mesh" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "drape_mesh" which requires target "igl_opengl_glfw" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "patch_draper" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "patch_draper" which requires target "igl_opengl_glfw" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "base_draper" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "base_draper" which requires target "igl_opengl_glfw" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "map_draper" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "map_draper" which requires target "igl_opengl_glfw" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "sss_gen_sim" which requires target "igl_core" that is not in the export set.
CMake Error: install(EXPORT "BathyMapsConfig" ...) includes target "sss_gen_sim" which requires target "igl_opengl_glfw" that is not in the export set.
When I used to install auvlib on my own ubuntu 16.04, I did not remember getting this error, but I don't know why it happened now when I tried to build a docker based on ubuntu and ros.
My DockerFile is like this:
FROM ros:kinetic-ros-core-xenial
RUN git clone https://github.com/nilsbore/auvlib.git
WORKDIR auvlib
RUN mkdir -p build && apt-get update && apt-get install -y libcereal-dev libglfw3-dev libceres-dev libtinyxml2-dev \
&& git submodule update --init
WORKDIR libigl
RUN git submodule update --init external/embree
&& git submodule update --init external/glfw
WORKDIR ../build
RUN apt-get update && apt-get install -y libopencv-dev
RUN cmake -DCMAKE_INSTALL_PREFIX=../install ..
&& make -j4
RUN make install
kinetic-ros-core-xenial is provided by ros: https://github.com/osrf/docker_images/blob/1a1c56d93f309d10c412c6323db5791fc1b23d1b/ros/kinetic/ubuntu/xenial/ros-core/Dockerfile
Anyone knows what might be the solution? Thanks!
We should see if the conversion between NED and ENU coordinate system invalidates some of the pitch readings.
Basically, the heading/yaw should already be correct. The roll is the same AFAIK. However, the pitch needs to be negated. I don't know right know how this is handled for the .all
and .xtf
files from RAN. Maybe @xyp8023 can look into it if he's looking at the RAN data now.
Use libigl instead, if we need a point cloud viewer.
For some reason, sss_meas_data
with more than 2000 pings are corrected. The initial size is 2000 so it's either something with the resizing not working, or the pings not being written past the initial size.
In https://github.com/nilsbore/auvlib/blob/master/src/data_tools/src/all_data.cpp#L258, pings deeper than 40m are discarded, which may result in failure to build a complete mesh map from Hugin datasets. Why do we keep that condition? Can @nilsbore remove it if it's not needed?
I get this error when compiling on 18.04:
auvlib/libigl/include/igl/xml/writeDAE.cpp:131:15: error: ‘XML_NO_ERROR’ was not declared in this scope
if(error != XML_NO_ERROR)
This can be fixed by changing to XML_SUCCESS
inside libigl-legacy. Not sure how to fix this in a way that's consistent across platforms, best fix probably to upgrade to proper libigl.
I updated the Dockerfile to the following
FROM ros:noetic-ros-core-focal
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y libcereal-dev libglfw3-dev libceres-dev libtinyxml2-dev libopencv-dev python3-pip python3-opencv
RUN apt-get install -y xorg-dev
RUN pip install ipython==5.0.0
RUN apt-get install git -y
RUN git clone https://github.com/nilsbore/auvlib.git
WORKDIR auvlib
RUN git submodule update --init && mkdir -p build
WORKDIR build
RUN cmake -DCMAKE_INSTALL_PREFIX=../install .. ; exit 0
RUN make -j4
RUN make install
RUN echo "export PYTHONPATH=$PYTHONPATH:/auvlib/install/lib" >> ~/.bashrc && /bin/bash -c "source ~/.bashrc" && rm -rf /var/lib/apt/lists/*
The container builds successfully. I can start the python3 interpreter and import the csv_data utility
from auvlib.data_tools import csv_data
However, when I try to run
sound_speeds = csv_data.csv_asvp_sound_speed.parse_file(svp_path)
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: vector::_M_default_append
I've also tried adding auvlib/install/share to PATH and running ldconfig, but that doesn't work either.
Hi Nils,
In this line:
auvlib/src/bathy_maps/src/sss_meas_data.cpp
Line 177 in 44e55eb
So maybe it should be changed to:
if (ind == -1) { continue; } else if (!is_left) { col = waterfall_width/2 + ind; } else { col = waterfall_width/2 - 1 - ind; }
HI,
I am getting an error while trying to run a sample code.
ImportError: cannot import name 'std_data' from 'auvlib.data_tools' (/home/user126/Projects/auvlib/install/lib/auvlib/data_tools/init.py)
I am running Ubuntu 20.04 and I think I followed the building process correctly.
There are no errors during building apart from tinyxml2 and glfw.
When trying to run the sample code I am first adding path and then executing the sample code.
export PYTHONPATH=$PYTHONPATH:/home/user126/Projects/auvlib/install/lib
Are there any other dependencies needed or did I just missed a step while building?
Thanks!
In the jsf Sonar Data Message, there is a Sampling Interval dt could be used to calculate the max slant range. Say the number of samples in jsf_sss_ping.port.pings is n, the sound velocity is v:
max_slant_range = dtnv/2
However, it seems that the valid sound velocity is stored in the jsf_dvl_ping.
TODO: 1. add python interface to parse jsf_dvl_ping 2. add c++ and python interface for the function to match the sound velocity from jsf_dvl_ping to jsf_sss_ping.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.