Tag Archives: SLAM

[Solved] error: #error “Please include Eigen/Geometry instead of including headers inside the src directory d

error: #error “Please include Eigen/Geometry instead of including headers inside the src directory d

1-error
2-solution
prompt us to \include < Eigen/Geometry>, the header file related to vim should under Panglin/include/pangolin/plot/rang.h
but a new error is reported. There is no such file or directory as eigen/geometry

Solution:

cd /usr/include
sudo ln -sf eigen3/Eigen Eigen
sudo ln -sf eigen3/unsupported unsupported

 

[Solved] rs_to_velodyne-master compile Error: POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature

rs_to_velodyne-master compile Error:

/usr/include/pcl-1.10/pcl/point_types.h:574:1: error: ‘plus’ is not a member of ‘pcl::traits’
  574 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::CPPFSignature,

/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘plusscalar’ is not a member of ‘pcl::traits’
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,

/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘type’ is not a member of ‘pcl::traits::datatype<pcl::PPFRGBSignature, pcl::fields::f4>::decomposed’ {aka ‘pcl::traits::decomposeArray<float>’}

/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘plusscalar’ is not a member of ‘pcl::traits’
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
......

 



 
解决方法:
在对应程序包的CMakeLists.txt中加入一行代码即可顺利编译。

Solution:
Add the following line in CMakeLists.txt of the corresponding program package:
set(CMAKE_CXX_STANDARD 14)

You can also use the same method when compiling other packages with the same error!

[Solved] VINS-MONO: integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’

The following problems are encountered when compiling vins-mono with catkin,

In file included from /usr/local/include/ceres/internal/parameter_dims.h:37,
                 from /usr/local/include/ceres/internal/autodiff.h:151,
                 from /usr/local/include/ceres/autodiff_cost_function.h:130,
                 from /usr/local/include/ceres/ceres.h:37,
                 from /home/matthew/projects/vinsmono/src/VINS-Mono/camera_model/src/calib/CameraCalibration.cc:20:
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
   64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
   64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
      |                                              ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
   64 | struct SumImpl<std::integer_sequence<T, N, Ns...>> {
      |                                                 ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
   71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
   71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
      |                                                   ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
   71 | struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
      |                                                      ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
   78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:59: error: wrong number of template arguments (6, should be 1)
   78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
      |                                                           ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:62: error: expected unqualified-id before ‘>’ token
   78 | struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
      |                                                              ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
   85 | struct SumImpl<std::integer_sequence<T, N>> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:41: error: wrong number of template arguments (2, should be 1)
   85 | struct SumImpl<std::integer_sequence<T, N>> {
      |                                         ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
   60 | struct SumImpl;
      |        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:85:42: error: expected unqualified-id before ‘>’ token
   85 | struct SumImpl<std::integer_sequence<T, N>> {
      |                                          ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
   91 | struct SumImpl<std::integer_sequence<T>> {
      |                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:38: error: template argument 1 is invalid
   91 | struct SumImpl<std::integer_sequence<T>> {
      |                                      ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:91:39: error: expected unqualified-id before ‘>’ token
   91 | struct SumImpl<std::integer_sequence<T>> {
      |                                       ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
  135 |                          std::integer_sequence<T, N, Ns...>,
      |                               ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:31: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: template argument 3 is invalid
  135 |                          std::integer_sequence<T, N, Ns...>,
      |                                                           ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: error: type/value mismatch at argument 4 in template parameter list for ‘template<class T, T Sum, class SeqIn, class SeqOut> struct ceres::internal::ExclusiveScanImpl’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:135:59: note:   expected a type, got ‘N’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
  146 | struct ExclusiveScanImpl<T, Sum, std::integer_sequence<T>, SeqOut> {
      |                                       ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:39: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:146:57: error: wrong number of template arguments (3, should be 4)
  146 | struct ExclusiveScanImpl<T, Sum, std::integer_sequence<T>, SeqOut> {
      |                                                         ^
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:130:8: note: provided for ‘template<class T, T Sum, class SeqIn, class SeqOut> struct ceres::internal::ExclusiveScanImpl’
  130 | struct ExclusiveScanImpl;
      |        ^~~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
  160 |       typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;
      |                                                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:53: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:160:70: error: template argument 4 is invalid
  160 |       typename ExclusiveScanImpl<T, T(0), Seq, std::integer_sequence<T>>::Type;

After checking, it is generally caused by the incompatibility between Ceres-solver and eigen3. You can’t use the latest version of Ceres when running vins-mono.

I had no choice but to uninstall the previous version 2.0.0 first.

sudo rm -r /usr/local/lib/cmake/Ceres
sudo rm -rf /usr/local/include/ceres /usr/local/lib/libceres.a
sudo rm -r /usr/local/share/Ceres

Then download version 1.14.0 here,

http://ceres-solver.org/ceres-solver-1.14.0.tar.gz

wget ceres-solver.org/ceres-solver-1.14.0.tar.gz
https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver-1.14.0
mkdir build
cd build
cmake ..
make -j4
make test
sudo make install

Compile ceres_curve_fiiting
CD to ceres_curve_fiiting folder

 mkdir build
 cd build
 cmake ..
 make
 ./curve_fitting

Compilation finished!

ROS Error: Roslaunch got a ‘No such file or directory‘ error while attempting to run xterm -e gdb –args

When using gdb to debug the ROS node of VINS-mono, I encountered this error:

process[feature_tracker-2]: started with pid [8459]
RLException: Roslaunch got a 'No such file or directory' error while attempting to run:
xterm -e gdb --args /home/matthew/projects/vinsmono/devel/lib/vins_estimator/vins_estimator __name:=vins_estimator __log:=/home/matthew/.ros/log/5eeae726-84a9-11ec-ad3c-378f34e64432/vins_estimator-3.log
Please make sure that all the executables in this command exist and have
executable permission. This is often caused by a bad launch-prefix.
The traceback for the exception was written to the log file

 

Solution:

sudo apt-get install xterm

error while loading shared libraries: libmetis.so [How to Solve]

Running LIO-SAM reported the following error:

lio_sam/lio_sam_imuPreintegration: error while loading shared libraries: libmetis.so: cannot open shared object file: No such file or directory

 

Solution:

Use the following code to install:

sudo apt-get install libparmetis-dev

Problem solved successfully

[Solved] Data Set reproduct loam_velodyne Fully error: [multiscanregistration-1]

System overview

Loam is a must eat algorithm for entry slam. Its overall idea is to divide complex slam problems into:

1. High-frequency motion estimation;

2. Low-frequency environmental mapping.


Environmental Science:

ubuntu18.04, ros-melodic, pcl1.8

1. Loam_Velodyne installation

$ mkdir -p loam_ws/src
$ cd ~/loam_ws/src
$ git clone https://github.com/laboshinl/loam_velodyne.git
$ cd ..
$ catkin_make
$ source ~/loam_ws/devel/setup.bash

2. Run data set

1. Start roscore

$ roscore

2. Open a new terminal and start the loam_velodyne.launch

$ source ~/loam_ws/devel/setup.bash
$ roslaunch loam_velodyne loam_velodyne.launch

3. Test dataset NSH_indoor_outdoor.bag

3.1. To get a data set, the first thing is to analyze the information of the data set. One mistake that is easy to make when you get started is to directly use the data set downloaded from the Internet to run the algorithm. As a result, you can’t run anything. The so-called knowing yourself and the enemy can win every battle!

##View information about this dataset to facilitate modification of the launch file
rosbag info nsh_indoor_outdoor.bag

You can see the size, messages, types and topics of the package (focus on ensuring that the topics in the launch file are the same as here). The data set adopts 16 line radar, and the lidar value should be changed to vlp-16.

Open loam_Velodyne.launch file to check whether the red line part is consistent with the dataset.

3.2. If it is consistent, you can run the package.

rosbag play nsh_indoor_outdoor.bag
##Or adjust the playback speed, if the computer performance is not good, you can reduce the playback speed, or build out the map will have problems
rosbag play -r 0.5 nsh_indoor_outdoor.bag

The effects are as follows:

4. Save the last point cloud map

##Start the recording node halfway through the build
rosbag record -o nsh_.bag<output bag file name,set by yourself> /laser_cloud_surround
## Convert the above bag file to a pcd file
rosrun pcl_ros bag_to_pcd nsh_2021-11-22-18-13-54.bag<output bag filename> /laser_cloud_surround pcd_nsh<save pcd file's first level filename>
## look at the last pcd file and find the last file name
pcl_viewer last_pcd.pcd

The effects are as follows:

5. Test data set test.bag

5.1. Proceed as above. First analyze the package.

##View information about this dataset to facilitate modification of the launch file
rosbag info test.bag

The topics of the data are consistent with the previous data set, so there is no need to modify it, but the data set adopts 32 line radar, and the radar parameters need to be changed.

5.2. The steps of package running are the same as above. Let’s see the effect:

The effect is pretty good. Those who need data sets can comment on private letters to me.

6. Test data set kitti.bag

As above, view the dataset information~

It can be seen that the topics of Kitti dataset are much richer than the first two datasets, but we only need to focus on pointcloud. Change the place in the launch file to/Kitti/velo/pointcloud. Because Kitti dataset adopts 64 line radar, the corresponding in the launch file should also be changed to hdl-64e.

Since I forgot the screenshot after building the drawing, there are no attached drawings here~~


If you also encountered the following error when playing the data set after launching loam_velodyne.launch [multiScanRegistration-1] process has died [pid 10718, exit code -11, cmd /home/santu/rslidar_ws/devel/lib/loam_velodyne

Solution:

Just find cmakelists.txt under the path Src/loam_velodyne and comment out line 35!!

After commenting out, go back to the directory loam_ws, open the terminal and re-catkin_make ! Now restart the launch and release the package.

Error reported by RNG when compiling StVO pl

The errors reported are as follows: StVO PL/SRC/stereoframehandler. CPP: 1266:35: error: ‘RND’ was not declared in this scope
color = scalar (color_dist (RND), color_dist (RND), color_dist (RND), color_dist (RND))
explanation: random_ In the Linux implementation, device () reads the/dev/urandom device, random_ The purpose of device () is to generate a true random number. The rand () function uses the linear congruence method to generate a random number, but this random number is actually a pseudo-random number
original address: https://blog.csdn.net/keneyr/article/details/105595613#commentBox
However, randm_ Device() is only valid under Linux, not under windows
solution: add #include & lt; in front of the stereoframehandler.cpp file; random> just fine

Solution to error reporting in opencv4.0 compilation of logo-logo

Problem Description:

Recently, when learning integrated navigation, Ubuntu 20 + opencv4.0 was used. When compiling logo-beam, the following error messages were encountered:

10: fatal error: opencv/CV. H: no such file or directory
13 |#include & lt; opencv/cv.h>

Solution:

This is caused by the version change of OpenCV library. Put #include & lt; opencv/cv.h> Replace with #include & lt; opencv2/opencv.hpp> Just.