1. Lidar
1. fatal error: pcap.h: No such file or directory #include <pcap.h>
1.1 Problem Description: The header file is missing
1.2 Solutions:sudo apt-get install libpcap-dev
2. fatal error: IOError: [Errno 13] Permission denied: ‘/home/gene/.ros/roscore-11311.pid’
2.1 Problem description: The ros file permissions in this path are insufficient.
2.2 Solutions:sudo chmod 777 -R ~/.ros/
3. assets_writer_backpack_3d.launch 3d does not generate a ply file
3.1 Description of the problem: According to the experience of running assets_writer_backpack_2d.launch by cartograper, running assets_writer_backpack_3d.launch should generate a .ply file, and then generate a .pcd file for browsing. However, the actual Cartographer feature pack 3d does not generate .ply files.
3.2 Solutions:
- After comparing the relevant files of 2d and 3d, it is found that
assets_writer_backpack_3d.lua
the file is missing
{
action = "write_ply",
filename = "points.ply",
},
Add this statement in the file:
recompile and run to generate a 3d version of *****.ply file.
Two, slam_14 talk
1. /highgui/src/window.cpp:352: error: (-215:Assertion failed)
1.1 Problem description: missing dependencies or reading file path format/content errors;
1.2 Solutions:
- Possibility 1:
sudo apt-get install -y libgtk2.0-dev pkg-config
- Possibility 2:
修改一下,源代码读取的源文件路径
2. Failed to load module “canberra-gtk-module”
2.1 Problem description: The dependency file is missing
2.2 Solutions:
sudo apt-get install libcanberra-gtk-module
3. Could not find GLEW
3.1 Description of the problem: Could not find GLEW error in Cmake Pangolin library
3.2 Solutions:sudo apt install libglew-dev
4. error while loading shared libraries: libpango_core.so:
4.1 Description of the problem: pangolin has been compiled successfully, but when running the executable file, an error is reported:error while loading shared libraries: libpango_core.so: cannot open shared object file: No such file or directory
4.2 Solutions:
When running ./plotTrajectory
the program, the pangolin-related dynamic library is used, but the linker ld prompts that the library file cannot be found. The default directories of ld are /lib and /usr/lib, so the linker needs to be updated: sudo ldconfig
that's it.
5. error while loading shared libraries: libg2o_core.so:
5.1 Problem description: When running pose_estimation_3d2d in chapter ch_7 of "SLAM_14 Lecture", an error is always reported:
5.2 Solutions:
Similar to the fourth question above, because your own g2o library is installed from source code, and by default, the compiler will only use /lib
the /usr/lib
library files in these two directories. When installing through the source code package, if you do not specify --prefix
it will be Install the library under /usr/local
the directory without /etc/ld.so.conf
adding /usr/local/lib
this the file. In this way, although the source package is installed, the relevant .so library cannot be found when using it, and an error will be reported. That is, the system does not know that a source package is installed. The default directory of ld is /lib
and /usr/lib
, so you need to update the linker:
Step 1: Edit the configuration sudo gedit /etc/ld.so.conf
file and add the following path to the opened file:
/usr/local/lib
Step 2: Update the linkersudo ldconfig
6. /sbin/ldconfig.real: /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8 is not a symbolic link
6.1 Problem description: When updating the linker sudo ldconfig
, it is always reported that it is not a symbolic link:
6.2 Solution:
Step 1: Establish a soft connection::
sudo ln -sf /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_ops_ /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8
sudo ln -sf /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8
sudo ln -sf /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_train.so.8
sudo ln -sf /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8
Step 2: Just update the linker sudo ldconfig
.
7. undefined reference to `fmt::v8::vprint
7.1 Problem description: When compiling the pose_estimation part of chapter ch_7 of "SLAM_14 Lecture", an error is always reported:
7.2 Solutions:
If the fmt library is not linked, the problem can be solved by linking the fmt library: target_link_libraries(useSophus ${Sophus_LIBRARIES} fmt)
just fine.
8. std::bind(&OpticalFlowTracker::calculateOpticalFlow, &tracker, placeholders::_1))
8.1 Description of the problem: When compiling chapter ch_8 of "SLAM_14 Lecture", an error is always reported:
- std::bind(&OpticalFlowTracker::calculateOpticalFlow, &tracker, placeholders::_1));
- std::bind(&JacobianAccumulator::accumulate_jacobian, &jaco_accu, std::placeholders::_1));
8.2 Solutions:
I installed opencv4 according to the requirements of CMakeLists.txt, and then the corresponding source file will be CV_GRAY2BGR
changed COLOR_GRAY2BGR
(otherwise, an error will be reported), and specify my own Opencv4 path in CMakeLists.txt: set(OpenCV_DIR /usr/local/opencv-4.1.1/build)
, and the compilation passed smoothly. (There is also reinstalling opencv3 on the Internet to solve the problem, because my own opencv3 is installed by default in ros, so I did not choose to reinstall opencv3)
9. /usr/bin/ld: cannot find -lnvinfer
9.1 Problem description: When compiling ROS, encounter /usr/bin/ld: cannot find -lnvinfer:
9.2 Solution:
This is because the corresponding lib file cannot be found. In the above example, the file cannot be found in the system libnvinfer.so 、libnvinfer_plugin.so
. And there is this dynamic library file under the file path of my own installation:
but there is no such dynamic library file under /usr/lib
this path, so I need to link this file library:
sudo ln -s /usr/local/TensorRT/lib/libnvinfer.so.7.1.3 /usr/lib/libnvinfer.so
sudo ln -s /usr/local/TensorRT/lib/libnvinfer_plugin.so.7.1.3 /usr/lib/libnvinfer_plugin.so
Recompilation will pass.
10. SyntaxError: Non-ASCII character ‘\xe7’
10.1 Problem Description: This error occurs when compiling python scripts in ROS
10.2 Solutions:
This is because of encoding problems, there may be Chinese input, add ** #coding=utf-8 ** at the beginning, and recompile ROS to pass.
3. System environment
1. git clone: Failed to connect to github.com port 443:connection timed out
1.1 Description of the problem: When doing git clone, I don’t know what happened and found: Failed to connect to github.com port 443: Connection timed out, the clone can’t come down, as shown in the following figure:
1.2 Solutions:
Enter in the terminal, configure the global proxy, and the problem can be solved.
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890