Giter VIP home page Giter VIP logo

dslam_open's Introduction

Data-Efficient Decentralized Visual SLAM

dslam

This is the code for the 2018 ICRA paper Data-Efficient Decentralized Visual SLAM by Titus Cieslewski, Siddharth Choudhary and Davide Scaramuzza:

@Article{Cieslewski18icra,
  author        = {Titus Cieslewski and Siddharth Choudhary and Davide
                  Scaramuzza},
  title         = {Data-Efficient Decentralized Visual {SLAM}},
  journal       = {{IEEE} Int. Conf. Robot. Autom. ({ICRA})},
  year          = 2018,
  month         = may
}

You can find a pdf of the paper here. If you use any of this code, please cite this publication.

You might be looking for the python/tensorflow implementation of NetVLAD, which is also tied to that publication. Find that one here.

Downloads

File Size Description sha1
kitti.zip 144.7MB Intermediate files for KITTI 00 f5f39202afdb598d50dc14d43580114cd7eb81bf
stata.zip 649.8MB Intermediate files for Stata 2012-01-25-12-14-25 8b6c488ce3ca99b7abd41a553387ef9c7c447a24
robotcar_netvlad_feats.zip 414MB NetVLAD features used for DVPR cluster training 8785d63dd56b15ebc8de8a6b1c7e3554754953e4

Install instructions

C++

Install the ROS ecosystem. This has been developed with ROS version Jade under Ubuntu 14.04. Minimal installation will do. Next, install catkin tools, vcstool, OpenCV-nonfree dev, autoconf and libglew-dev:

sudo add-apt-repository --yes ppa:xqms/opencv-nonfree # Maybe not necessary for Ubuntu > 14.04?
sudo apt-get update
sudo apt-get install python-catkin-tools python-vcstool libopencv-nonfree-dev autoconf libglew-dev

# Create a new catkin workspace if needed:
mkdir -p my_ws/src
cd my_ws
catkin config --init --mkdirs --extend /opt/ros/<YOUR VERSION> --merge-devel --cmake-args -DCMAKE_BUILD_TYPE=Release

# Clone dslam:
cd src
git clone [email protected]:uzh-rpg/dslam_open.git

# Clone dependencies:
vcs-import < dslam_open/dependencies.yaml

# Build:
catkin build

Matlab

For full reproduction, you need to install NetVLAD and all its dependencies and add it to your matlab path. However, for the datasets evaluated in the paper, we provide the intermediate results generated by NetVLAD, so you can skip the installation of NetVLAD for now.

Distributed Trajectory Estimation

Build distributed-mapper in the feature/logging branch in an arbitrary location. No need to build the unit tests (they require extra dependencies), all you need is the runDistributedMapper executable.

Run instructions

In the following, we list all data processing steps that produce intermediate results. All intermediate results are saved in <DATASET SEQUENCE ROOT>/dslam/. Furthermore, we provide all intermediate results for the datasets evaluated in the paper, so you can skip the corresponding steps and just use our intermediate results. Note that some steps are nondeterministic (ORB SLAM, NetVLAD clustering, the decentralized SLAM simulation itself).

Dataset preprocessing

Note that these are only necessary if you want to reproduce the pipeline fully or want to adapt the pipeline to your own dataset. If you just want to run the system on either of the two datasets in the paper, you can use the preprocessed data we provide and skip straight to Execute the remaining preprocessing sections.

KITTI 00

For KITTI 00, obtained here, no special preprocessing is necessary.

Stata 2012-01-25-12-14-25

For Stata 2012-01-25-12-14-25, which can be obtained here, we require somewhat more preprocessing. We need to first rectify the images and then parse images, times and ground truth poses out of the rosbag. Launch dslam/launch/rectify_stata.launch, start recording /wide_stereo/left/image_rect and /wide_stereo/right/image_rect into a rosbag, and play back the main dataset rosbag. Once the images are rectified, run dslam/src/stata_unbag.py with the following parameters:

  • --bag_name path to the main bag downloaded from the dataset website
  • --rect_bag_name path to the bag with rectified images you just created
  • --outdir output directory
  • --tf_file the ground truth .poses file downloaded from the stata dataset (rightmost column in the downloads table)

This will take some time and create the images folder in the output directory, as well as times.txt, gt_poses.txt and some auxiliary files that help you assemble the ORB SLAM settings file (or you can use the one we provide).

Run ORB SLAM (loop closure disabled) to generate visual odometry data

In your catkin workspace, run dataset_to_vo, for example on KITTI 00:

./devel/lib/dslam/dataset_to_vo --type=kitti /home/titus/data/kitti/00/ /home/titus/data/kitti/00/orb_kitti.yaml

Where orb_kitti.yaml are the configuration parameters to run ORB SLAM on the KITTI datasets. They are available in the files we provide for download. Once this has completed, the following files will be created in the current working directory:

descs_0.txt
lm_obs_0.txt
lm_pos_0.txt
poses_0.txt
times_0.txt

Copy these files to <DATASET SEQUENCE ROOT>/dslam/. If more than one set of these exists, ORB SLAM failed at some point. In that case, either rerun the simulation until it does not fail, or, if you have one set containing the majority of the dataset, just use that set (rename it to end with _0.txt).

Configure the main simulation parameters in decentr_sim.m

All subsequent steps will take place in the Matlab script dslam/matlab/decentr_sim.m, so open that script in Matlab and set the configuration variables as indicated in the first section. Here is an example configuration:

confmat

Note that dvpr_train_path is the path containing NetVLAD features to be used for the clustering of the NetVLAD space used by decentralized visual place recognition. See the corresponding paper for detailed insight. As features, we used a random bunch of features extracted from several sequences of the Oxford RobotCar dataset. These features are available as download and we recommend you use them as well. Alternatively, you can have the variable point to any folder containing several .bin files with NetVLAD output, representing your NetVLAD clustering training dataset.

Parse NetVLAD descriptors for the dataset

Note: This is done with the Matlab implementation of NetVLAD for dslam. If you are looking for the python/tensorflow implementation of NetVLAD that is also tied to this publication, you will find it here.

This step takes quite some time (10 minutes on KITTI 00 with an NVIDIA GT 1060), so consider using the provided file instead. If you still want to run this yourself, in decentr_sim.m, execute the section %% Generate NetVLAD vectors for dataset. Note that this requires NetVLAD weights. We used vd16_pitts30k_conv5_3_vlad_preL2_intra_white.mat provided here. Once the parsing is complete, the file netvlad_feats.bin will appear in <DATASET SEQUENCE ROOT>/dslam/.

Note that NetVLAD can only take jpg pictures as input. You might need to convert any png pictures into jpg, for example using the following bash commands:

for i in *.png ; do convert "$i" "${i%.*}.jpg" ; done

Execute the remaining preprocessing sections

The next three sections in decentr_sim.m take you through the rest of preprocessing that sets up the decentralized SLAM simulation:

  1. parseAllData() zips up the visual odometry (VO) output from ORB SLAM and the NetVLAD descriptors parsed in the previous section and puts the result into full_data.mat.
  2. splitAndSave() subdivides the VO + NetVLAD data into n subsequences, one per simulated robot. The result is saved in full_data_n_robots.mat, where n is replaced with the used number of robots.
  3. generateDecentrFrameStream() takes the subsequences and rearranges the VO data into a stream representing the VO of all sequences being played back simultaneously. The stream is saved into decentr_stream_n_robots.mat.

Simulate!

Now that all preprocessing is done, you are ready to run the decentralized SLAM simulation!

  1. Tweak the parameters in the %% Parameters section.
  2. Don't forget to have one process of the verification_request_server running.

If you are running inside the dslam/matlab directory, the verification_request_server can be run with:

 ../../../../devel/lib/dslam/verification_request_server temp_request.txt temp_result.txt temp_lock.txt

Execute up until and with the runSimulationAndSave() command. This command will run the simulation and give you live visual feedback like this (see also gif on top of readme):

viz

Once the simulation is complete, results will be written into a file called run_data_X.mat, where X contains a string of the parameters used in the simulation.

Plot

Once the simulation is complete, you can re-plot the paper figures for your run with the sections following runSimulationAndSave() in decentr_sim.m. If you want to reproduce the parameter studies (min dist gv parameter study and NetVLAD dimension parameter study), you can find the code for them in param_studies.m.

Acknowledgements

This research was funded by the DARPA FLA Program, the National Center of Competence in Research (NCCR) Robotics through the Swiss National Science Foundation, the SNSF-ERC Starting Grant and the U.S. Army Research Lab (ARL) through the MAST-CTA project 329420

dslam_open's People

Contributors

tcies avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dslam_open's Issues

Project 'dslam' tried to find library 'orb_slam_2'.

when I catkin build,the error occurs.
Errors << dslam:cmake /home/reinovo/my_ws/logs/dslam/build.cmake.005.log
CMake Error at /home/reinovo/my_ws/devel/share/orb_slam_2/cmake/orb_slam_2Config.cmake:148 (message):
Project 'dslam' tried to find library 'orb_slam_2'. The library is neither
a target nor built/installed properly. Did you compile project
'orb_slam_2'? Did you find_package() it before the subdirectory containing
its code is included?
Call Stack (most recent call first):
/home/reinovo/my_ws/devel/share/catkin_simple/cmake/catkin_simple-extras.cmake:38 (find_package)
CMakeLists.txt:28 (catkin_simple)

cd /home/reinovo/my_ws/build/dslam; catkin build --get-env dslam | catkin env -si /usr/bin/cmake /home/reinovo/my_ws/src/dslam_open/dslam --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/reinovo/my_ws/devel -DCMAKE_INSTALL_PREFIX=/home/reinovo/my_ws/install -DCMAKE_BUILD_TYPE=Release; cd -
......................................................................................
Failed << dslam:cmake [ Exited with code 1 ]
Failed <<< dslam [ 0.6 seconds ]
[build] Summary: 20 of 21 packages succeeded.
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: None.
[build] Failed: 1 packages failed.
[build] Runtime: 3.2 seconds total.

CMAKE ERROR minkindr_python faild

Excuse me! When I run catkin build command, cmake failed occur. It shows:

CMake Error at /home/ubuntu484/dvslam_ws/devel/share/catkin_simple/cmake/catkin_simple-extras.cmake:38 (find_package):
By not providing "Findcatkin_boost_python_buildtool.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find
a package configuration file provided by "catkin_boost_python_buildtool", but CMake did not find one.

Could not find a package configuration file provided by "catkin_boost_python_buildtool" with any of the following names:

catkin_boost_python_buildtoolConfig.cmake
catkin_boost_python_buildtool-config.cmake

Add the installation prefix of "catkin_boost_python_buildtool" to CMAKE_PREFIX_PATH or set
"catkin_boost_python_buildtool_DIR" to a directory containing one of the above files. If "catkin_boost_python_buildtool" provides
a separate development package or SDK, be sure it has been installed.

Do you know how to solve it? I am sorry to bother you.

How to estimate the relative pose between robots

Hello, I have read the paper "Data-Efficient Decentralized Visual SLAM" of you. And there has a question I can not understand. How to estimate the relative pose between robots, did the robot know the initial pose of other robots? Or is there have a common reference frame knew by all robots? Look forward to your reply, thanks.

Simulation Plot breaks up after few iterations

@tcies Hello, when I executed the runSimulationAndSave() command, with the robot number 5, there are some errors. It seems that the errors are due to the optimization. What are the latent and possible reasons behind this kind of errors? Thanks a lot.
P.S.: Details of the errors are shown as below:
`835 out of 1708

real_time =

46.6732

Discarding place recognition near previous match!

ans =

ParallelException with properties:

 identifier: 'MATLAB:assertion:failed'
    message: 'Assertion failed.'
      cause: {}
remotecause: {[1×1 MException]}
      stack: [1×1 struct]

ans =

'Warning: Directory already exists.
 > In runSyncGaussSeidel (line 28)
   In parallel.internal.queue.evaluateRequest (line 46)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.58.0)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/libdistributed-mapper.so)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib/libgtsam.so.4)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.58.0)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libboost_timer.so.1.58.0)
 /home/lixinyue/distributed-mapper/distributed_mapper_core/cpp/build/runDistributedMapper: /usr/local/MATLAB/R2017a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.58.0)
 '

ans =

struct with fields:

file: '/home/lixinyue/my_ws/src/dslam_open/dslam/matlab/runSyncGaussSeidel.m'
name: 'runSyncGaussSeidel'
line: 32

ans =

struct with fields:

file: '/home/lixinyue/my_ws/src/dslam_open/dslam/matlab/runSyncGaussSeidel.m'
name: 'runSyncGaussSeidel'
line: 32

Error using manageAsyncGaussSeidel (line 55)
Assertion failed.

Error in stepDecentrState (line 77)
manageAsyncGaussSeidel(decentr_state, ...

Error in runSimulationAndSave (line 51)
stepDecentrState(decentr_state, decentr_stream{step_i}, params, ... `

catkin build

I have some trouble in catkin build ,I can not sure that it can be successful in ubuntu 18.04?
Maybe I should use ubuntu 14.04 ?

Problem about opencv

Hi, I have followed the install instructions in README.md. But when I run catkin build, there is something wrong.

Starting  >>> dbow2 
                                                           
Errors     << dbow2:make /home/johnson/workspace/dslam_ws/logs/dbow2/build.make.021.log
In file included from /home/johnson/workspace/dslam_ws/devel/include/DVision/DVision.h:42:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:14:
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h: In member function ‘void DVision::BRIEF_t<Bits>::compute(const cv::Mat&, const std::vector<cv::KeyPoint>&, std::vector<std::bitset<Bits> >&, bool) const’:
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:207:7: error: ‘cvtColor’ is not a member of ‘cv’
       cv::cvtColor(image, aux, cv::COLOR_RGB2GRAY);
       ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:207:32: error: ‘COLOR_RGB2GRAY’ is not a member of ‘cv’
       cv::cvtColor(image, aux, cv::COLOR_RGB2GRAY);
                                ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:214:5: error: ‘GaussianBlur’ is not a member of ‘cv’
     cv::GaussianBlur(aux, im, ksize, sigma, sigma);
     ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h: In member function ‘void DVision::BRIEF_t<Bits>::generateTestPoints()’:
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:276:3: error: ‘DUtils’ has not been declared
   DUtils::Random::SeedRandOnce();
   ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:284:12: error: ‘DUtils’ has not been declared
       x1 = DUtils::Random::RandomGaussianValue(g_mean, g_sigma);
            ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:289:12: error: ‘DUtils’ has not been declared
       y1 = DUtils::Random::RandomGaussianValue(g_mean, g_sigma);
            ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:303:12: error: ‘DUtils’ has not been declared
       x2 = DUtils::Random::RandomGaussianValue(meanx, sigma2);
            ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:308:12: error: ‘DUtils’ has not been declared
       y2 = DUtils::Random::RandomGaussianValue(meany, sigma2);
            ^
In file included from /home/johnson/workspace/dslam_ws/devel/include/DVision/DVision.h:42:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FORB.cpp:24:
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h: In member function ‘void DVision::BRIEF_t<Bits>::compute(const cv::Mat&, const std::vector<cv::KeyPoint>&, std::vector<std::bitset<Bits> >&, bool) const’:
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:207:7: error: ‘cvtColor’ is not a member of ‘cv’
       cv::cvtColor(image, aux, cv::COLOR_RGB2GRAY);
       ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:207:32: error: ‘COLOR_RGB2GRAY’ is not a member of ‘cv’
       cv::cvtColor(image, aux, cv::COLOR_RGB2GRAY);
                                ^
/home/johnson/workspace/dslam_ws/devel/include/DVision/BRIEF256.h:214:5: error: ‘GaussianBlur’ is not a member of ‘cv’
     cv::GaussianBlur(aux, im, ksize, sigma, sigma);
     ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h: At global scope:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:27:20: error: ‘BRIEF’ in namespace ‘DVision’ does not name a type
   typedef DVision::BRIEF::bitset TDescriptor;
                    ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:28:17: error: within this context
   typedef const TDescriptor *pDescriptor;
                 ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:36:5: error: within this context
     TDescriptor &mean);
     ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:44:32: error: within this context
   static double distance(const TDescriptor &a, const TDescriptor &b);
                                ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:44:54: error: within this context
   static double distance(const TDescriptor &a, const TDescriptor &b);
                                                      ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:51:37: error: within this context
   static std::string toString(const TDescriptor &a);
                                     ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:58:26: error: within this context
   static void fromString(TDescriptor &a, const std::string &s);
                          ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:0:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:65:35: error: within this context
   static void toMat32F(const std::vector<TDescriptor> &descriptors, 
                                   ^
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:35:15: error: ‘static void DBoW2::FBrief::meanValue(const std::vector<const DBoW2::FClass::TDescriptor*>&, DBoW2::FClass::TDescriptor&)’ cannot be declared
   static void meanValue(const std::vector<pDescriptor> &descriptors, 
               ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:35:16: error:   since ‘virtual void DBoW2::FClass::meanValue(const std::vector<const DBoW2::FClass::TDescriptor*>&, DBoW2::FClass::TDescriptor&)’ declared in base class
   virtual void meanValue(const std::vector<pDescriptor> &descriptors, 
                ^
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h: In static member function ‘static void DBoW2::FBrief::meanValue(const std::vector<const DBoW2::FClass::TDescriptor*>&, DBoW2::FClass::TDescriptor&)’:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:24:11: error: within this context
   FBrief::TDescriptor &mean)
           ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:26:7: error: invalid use of incomplete type ‘class DBoW2::FClass::TDescriptor’
   mean.reset();
       ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: note: forward declaration of ‘class DBoW2::FClass::TDescriptor’
   class TDescriptor;
         ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:31:31: error: invalid use of incomplete type ‘const class DBoW2::FClass::TDescriptor’
   const int L = descriptors[0]->size();
                               ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: note: forward declaration of ‘class DBoW2::FClass::TDescriptor’
   class TDescriptor;
         ^
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:38:19: error: within this context
     const FBrief::TDescriptor &desc = **it;
                   ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:41:14: error: no match for ‘operator[]’ (operand types are ‘const DBoW2::FClass::TDescriptor’ and ‘int’)
       if(desc[i]) counters[i]++;
              ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:47:30: error: invalid use of incomplete type ‘class DBoW2::FClass::TDescriptor’
     if(counters[i] > N2) mean.set(i);
                              ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: note: forward declaration of ‘class DBoW2::FClass::TDescriptor’
   class TDescriptor;
         ^
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h: In static member function ‘static double DBoW2::FBrief::distance(const DBoW2::FClass::TDescriptor&, const DBoW2::FClass::TDescriptor&)’:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:54:39: error: within this context
 double FBrief::distance(const FBrief::TDescriptor &a, 
                                       ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:57:27: error: ‘DVision::BRIEF’ has not been declared
   return (double)DVision::BRIEF::distance(a, b);
                           ^
In file included from /home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FBrief.h:17:0,
                 from /home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:15:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h: In static member function ‘static std::__cxx11::string DBoW2::FBrief::toString(const DBoW2::FClass::TDescriptor&)’:
/home/johnson/workspace/dslam_ws/src/DBoW2/include/DBoW2/FClass.h:27:9: error: ‘class DBoW2::FClass::TDescriptor’ is private
   class TDescriptor;
         ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:62:44: error: within this context
 std::string FBrief::toString(const FBrief::TDescriptor &a)
                                            ^
/home/johnson/workspace/dslam_ws/src/DBoW2/src/FBrief.cpp:66:17: error: no matching function for call to ‘to_string(const DBoW2::FClass::TDescriptor&, std::__cxx11::string&)’
   to_string(a, s); // reversed 

It's too long. So I just paste part of that.

Firstly I think It might be some wrong with OpenCV. But I tried to comile the origin DBow2 ( https://github.com/dorian3d/DBoW2.git ) and It works. So it seems that the configuration of OpenCV is correct. The version of OpenCV is opencv-3.3.1-dev which is installed by ros-kinetic.

Then I don't know how to fix it. Any help would be welcomed

Problems about Simulation Section

After running the codes:
../../../../devel/lib/dslam/verification_request_server temp_request.txt temp_result.txt temp_lock.txt
But it seems that the directory does not exist, what's the problem?

problem about using KITTI01 and own dataset

I followed the steps to try to train netvlad files for other datasets and simulate. I can successfully output all files, but when I run decentr_sim, the program will report an error, similar to the index of the array is out of range, and the index at one position is out of range. I have tried multiple datasets, only KITTI04 can run, I would like to know why, I tried the training results of KITTI00 01 07 04 but can not run the program.
I really need your help,thanks a lot !
@tcies

Known OpenCV issues

Newer versions of OpenCV break some parts of the build.

Problem: "SURF" is not a member of "cv" in dbow2

Yay interface changes... thankfully we don't need SURF, this was just needed in the old version of DBoW2 for their demo. Simply comment out https://github.com/uzh-rpg/DBoW2/blob/master/CMakeLists.txt#L22-L27

OpenCV linking issues

Ideally, you would only have one OpenCV version on your PC. Consider:

  • Removing all unused OpenCV versions from /usr/local or apt uninstalling them
  • If you use python, only install OpenCV in virtualenvs that are not active during the build of dslam_open

Thanks Benchun Zhou from KIT for feedback on these issues.

error in initDecentrState.m line 61

Matlab report an error when running initDecentrState.m in line 61:

T_O_W(1:3,1:3)*full_state{I}.p_W_lm'+T_O_W(1:3,4);

I think the problem maybe caused by mismatch of matrix dimension to plus, so I replace

T_O_W(1:3,4) with iron(ones(1,size(full_state{I}.p_W_lm,1),1),T_O_W(1:3,4)).

It can pass, but I wonder is this correct?

Dataset_to_vo problem

@tcies Hi, as I want to reproduce the pipeline to another dataset (kitti 01), then I need to run ORB SLAM to generate VO data. However, as I run dataset_to_vo, there seems to an error or problem that I cannot solve. The error is:

MakeCurrent: Not available with non-pangolin window.

I guess the error is due to the Pangolin, but I have fully follow the instructions and build the workspace successfully, so how to solve the problems? Thanks a lot.
By the way, the console logs are shown as follows:

I0629 11:51:53.945066  8259 TemplatedVocabulary.h:1480] /home/lixinyue/my_ws/src/ORB_SLAM2/orb_slam_2/Vocabulary/ORBvoc.txt.proto .proto

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Stereo

Loading ORB Vocabulary. This could take a while...
I0629 11:51:54.810225  8259 TemplatedVocabulary.h:1480] /home/lixinyue/my_ws/src/ORB_SLAM2/orb_slam_2/Vocabulary/ORBvoc.txt.proto .proto
Vocabulary loaded!


Camera Parameters: 
- fx: 718.856
- fy: 718.856
- cx: 607.193
- cy: 185.216
- k1: 0
- k2: 0
- p1: 0
- p2: 0
- fps: 10
- color order: BGR (ignored if grayscale)

ORB Extractor Parameters: 
- Number of Features: 100
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7

Depth Threshold (Close/Far Points): 18.8008
sh: 1: gnuplot: not found
W0629 11:51:55.942534  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:55.992823  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.087868  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.194983  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.309288  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.412573  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.518157  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.624987  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.723423  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.823798  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:56.928405  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.033638  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.138293  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.239769  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.350859  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.436209  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.546696  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.659258  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.761232  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.866683  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:57.958070  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.065088  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.175227  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.278771  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.386066  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.487242  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.590344  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.694272  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.802196  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:58.903501  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.007551  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.111759  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.210729  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.319007  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.421427  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.524024  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.633453  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.733881  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.834147  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:51:59.944428  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.028889  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.138453  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.253643  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.356040  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.459113  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.559882  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.668987  8259 dataset_to_vo.cpp:190] Initializing...
W0629 11:52:00.769940  8259 dataset_to_vo.cpp:190] Initializing...
........ similar logs .........
MakeCurrent: Not available with non-pangolin window.```

error:no member function ‘loadProto’

Hi,I am very interset in the project ,but when I compile orb_slam2 ,I received an error:no member function ‘loadProto’ declared in ‘DBoW2::TemplatedVocabulary<cv::Mat, DBoW2::FORB>’.By the way ,how to open the document named vocabulary.txt.proto,because I saw garbled when I use gedit and other way to open it. I am sorry to disturb you, and thank you very much!

Dataset_to_vo Problem in Ubuntu 16.04 LTS

Hi everyone, when I was running the dataset_to_vo excutable program in the command shell, there are some errors about segmentation fault (core dumped). After some searches online, I found that it may be due to the incompatibility of eigen in Ubuntu 16.04 LTS, some details of explanations goes here.
To help fix the problem, at first, we need to add #define EIGEN_DONT_VECTORIZE and
#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT everywhere we use eigen. And also, we need to modify the CMakeList of ORB_SLAM2, by deleting -march=native in line 12. After re-compiling, it can succeed to run dataset_to_vo excutable program by using KITTI 01 in my example.
However, when I want to run the simulationandsave function in MATLAB, some errors happen. Then the problem is due to the depreciation of eigen vectorization. To fix it, we need to delete some define function that we previously did.
All in all, to succeed running both dataset_to_vo excutable program and doing simulation in MATLAB, what we need to do is:

  1. Add #define EIGEN_DONT_VECTORIZE and #define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT in all .h .hpp .cpp files in the g2o.
  2. deleting -march=native in line 12.
  3. (optional, maybe due to the performance of my computer, I cannot run dataset_to_vo if don't comment out SLAM.shutdown()) comment out SLAM.shutdown() in dataset_to_vo.cpp in line 209
  4. re-complie (catkin build) and run.

Note: This is only my solution for this problem. However, as I am the beginner for Linux, for SLAM, this solution maybe inproper. Any suggestions and corrections would be appreciated. Thanks.

XML or text declaration not at start of entity: line 25, column 0

when i run the command "catkin build",it appeared.i don't know what is the meaning?And where is the "runDistributedMapper",where is the "feature/logging"?i can't find these.mybe i make a mistake when installed.i can't run the simulation!please give me some advice,thank you!

Can't find times.txt

Hi, I hope you will be fine. I am testing test_parse_all_data with kitti data set. However, there is an error on line 37 in parseAllData.m
netvlad_time_file = [root 'times.txt'];
times.txt data file is not available.
Please guide me as soon as possible.

sudo: ./rectify_stata.launch: command not found

I just want to use the data in the article to see the result graph, but it hasn't been successful. Can you give me some more detailed instructions to get me to run the GIF diagram?Now,i encouraged problem when i run rectify_stata.launch.

‘REDUCE_SUM’ is not a member of ‘cv’

/home/z/c/my_ws/build/dlib_catkin/dlib_src-prefix/src/dlib_src/src/DVision/HSolver.cpp: In member function ‘cv::Mat DVision::HSolver::findHomography(const cv::Mat&, const cv::Mat&, double, int, std::vector, bool, double, int) const’:
/home/z/c/my_ws/build/dlib_catkin/dlib_src-prefix/src/dlib_src/src/DVision/HSolver.cpp:144:35: error: ‘REDUCE_SUM’ is not a member of ‘cv’
cv::reduce(sq_ab, error, 0, cv::REDUCE_SUM); // 0 = single row
^
/home/z/c/my_ws/build/dlib_catkin/dlib_src-prefix/src/dlib_src/src/DVision/FSolver.cpp: In member function ‘cv::Mat DVision::FSolver::findFundamentalMat(const cv::Mat&, const cv::Mat&, double, int, std::vector
, bool, double, int) const’:
/home/z/c/my_ws/build/dlib_catkin/dlib_src-prefix/src/dlib_src/src/DVision/FSolver.cpp:149:35: error: ‘REDUCE_SUM’ is not a member of ‘cv’
cv::reduce(sq_ab, norms, 0, cv::REDUCE_SUM); // 0 = single row
^
/home/z/c/my_ws/build/dlib_catkin/dlib_src-prefix/src/dlib_src/src/DVision/FSolver.cpp:160:32: error: ‘REDUCE_SUM’ is not a member of ‘cv’
cv::reduce(prod, dot, 0, cv::REDUCE_SUM); // dot is Nx1
^
make[5]: *** [CMakeFiles/DLib.dir/src/DVision/HSolver.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [CMakeFiles/DLib.dir/src/DVision/FSolver.cpp.o] Error 1
make[4]: *** [CMakeFiles/DLib.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [dlib_src-prefix/src/dlib_src-stamp/dlib_src-build] Error 2
make[1]: *** [CMakeFiles/dlib_src.dir/all] Error 2
make: *** [all] Error 2

Is this the wrong version of OpenCV? I've used opencv 2.4.11 and 2.4.8 before. It's all this error.

pangolin_catkin build failed

hi, as I was running the catkin build command, but it seems that there were some errors: (seem that the pangolin_catkin is not built)
...............................................................................
Failed << pangolin_catkin:make [ Exited with code 2 ]
Failed <<< pangolin_catkin [ 4.9 seconds ]
Finished <<< dlib_catkin [ 8.2 seconds ]
[build] Summary: 13 of 19 packages succeeded.
[build] Ignored: None.
[build] Warnings: None.
[build] Abandoned: 4 packages were abandoned.
[build] Failed: 2 packages failed.
[build] Runtime: 9.2 seconds total.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.