Tag Archives: ubuntu

[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.

[Solved] Pointsift Error: – ltensorflow not found_framework

My environment: Ubuntu 18.04 tensorflow 2.1
when reproducing pointsift, follow the readme prompt, modify the locations of tensorflow and Lib in the. Sh file, compile the. Sh file, and report an error:
/usr/bin/LD: cannot find – ltensorflow_framework
collect2: error: ld returned 1 exit status

The reason is that the shell file is connected to the dynamic library In libtensorflow_framework.so, the dynamic library name of tensorflow 2.1 is libtensorflow_Frame.So.2, so the link is not available

Solution: create a connection symbol to make libtensorflow_Framework. So. 2 and libtensorflow_Framework.so points to the same

cd /usr/local/lib/python3.6/dist-packages/tensorflow_core //My files are in this directory, some are in the tensorflow directory, as long as they are in the same directory as .so.2
ln -s libtensorflow_framework.so.1 libtensorflow_framework.so

[CUDA Environment] Python Pytorch Error: CudaSetupArgument

@TOC
the probability of this problem is that the CUDA version used for compilation is inconsistent with the CUDA version running
first check the CUDA version of the system (that is, the CUDA version used for compilation)

nvcc -V

In my pytorch + CONDA environment, you can use CONDA list to view the cudatoolkit version in the virtual environment. At first, the CUDA version of my system is 9.0 and the cudatoolkit version is 10.2. Therefore, the version is inconsistent, so the error message shown in the title appears. Later, I switched the CUDA version of the system and the problem was solved
brief description of the specific version switching method:
echo $path view CUDA path information, add the path of cuda10.2 and link it to/usr/local/CUDA. The specific instructions are

ln -s /usr/local/cuda10.2 /usr/local/cuda

Then modify the system path as follows:

vim ~/.bashrc

Add code at the end

export PATH=/usr/local/cuda:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

Press ESC, enter: WQ, press enter to exit, and then enter on the command line

source ~/.bashrc

Update path information
now enter from the command line

nvcc -V

You can view the CUDA version after switching

[Solved] Ubuntu 20.04 install MATLAB and toolbox permissions Error

1. Prompt for no access during installation
open the install file with sudo command, and remember to CD to the install directory

 sudo ./install

if the program is stuck and cannot be opened after entering the password, open the terminal and enter the following command

xhost +SI:localuser:root

2. Prompt for no access when installing the toolbox using the built-in add on
use Chmod to adjust file access rights

sudo chmod -R o+rw /usr/local/MATLAB/RXXXXx

after adjusting the permissions, you can download it, but an unexpected error appears at the end, which makes it impossible to install it
download the MATLAB installer again and reinstall it. Note that you don’t need to reinstall it all. Just select the toolbox you want

[Solved] curl: symbol lookup error: curl: undefined symbol: curl_mime_free

curl: symbol lookup error: curl: undefined symbol: curl_mime_free
Execute curl command to report error

curl -s https://www.adas.com

report errors:

curl: symbol lookup error: curl: undefined symbol: curl_mime_free

Solution:

#ubuntu system
apt-get update -y

#centos
yum update -y

Execute curl – s again, normal

[Solved] OpenCV error: #error “This header with legacy C API declarations has been removed from OpenCV.

Error reporting details

Error reporting reason

In the opencv version you are currently using, the definition declaration related to legacy C API has been removed, and the content of legacy can still be from legacy/constants_c.H from the header file.

Therefore, the solution is also obvious. Open the error file directly, delete the original part of the error header file, and replace it with legacy/constants_c.H.

Solution:

Open the cpp file with error
find the error header file location:

Delete the code of the header file containing the error and replace it with:

#include "opencv2/imgcodecs/legacy/constants_c.h"

Compiled successfully ~

if your problem is also solved, leave a praise~

Mobaxterm connects to Ubuntu server through SSH network error: software caused connection abort

Recently, mobaxterm is used to connect to the remote Ubuntu server through SSH. After not operating for a period of time, the connection will be broken and a prompt “network error: software caused connection abort” will be displayed.

You can modify the SSH configuration item in mobaxterm and check SSH keepalive to solve the problem of disconnection.

In addition, you need to modify the configuration file on the Ubuntu server side.

sudo vi /etc/ssh/sshd_config

1. Find tcpkeepalive yes and # remove the previous one;

2. Find the clientaliveinterval parameter, remove the previous #, and change the following 0 to 60, indicating that the request is sent every minute to maintain the connection.


Digression. To maintain the connection, you can use commands such as top to refresh the command line in real time.

[Solved] Nvml compilation official use case error: collect2: error: ld returned 1 exit status

Question

When running the example of nvml, an error is reported:

/tmp/tmpxft_00001d31_00000000-4_gpu_monitor.o: In the function ‘main’:
gpu_monitor.c:(.text+0x77): undefined reference to ‘nvmlInit_v2’
gpu_monitor.c:(.text+0x93): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0xcd): undefined reference to ‘nvmlDeviceGetCount_v2’
gpu_monitor.c:(.text+0xe9): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x15e): Undefined reference to ‘nvmlDeviceGetHandleByIndex_v2’
gpu_monitor.c:(.text+0x17a): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x1b4): undefined reference to ‘nvmlDeviceGetName’
gpu_monitor.c:(.text+0x1d0): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x208): Undefined reference to ‘nvmlDeviceGetPciInfo_v3’
gpu_monitor.c:(.text+0x224): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x282): undefined reference to ‘nvmlDeviceGetComputeMode’
gpu_monitor.c:(.text+0x2b6): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x318): undefined reference to ‘nvmlDeviceSetComputeMode’
gpu_monitor.c:(.text+0x334): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x379): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x3ce): undefined reference to ‘nvmlDeviceSetComputeMode’
gpu_monitor.c:(.text+0x3ea): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x423): Undefined reference to ‘nvmlDeviceGetPowerUsage’
gpu_monitor.c:(.text+0x43f): undefined reference to ‘nvmlErrorString’
gpu_monitor.c:(.text+0x4a4): undefined reference to ‘nvmlShutdown’
gpu_monitor.c:(.text+0x4c0): undefined reference to ‘nvmlErrorString’
collect2: error: ld returned 1 exit status

Solution:

At the beginning, the above error occurs when compiling with the command nvcc – O example.C example.
compile successfully with the command nvcc – I – L/usr/lib – lnvidia ml example.C – O example

[Solved] Ubuntu Terminal Error: subprocess installed post-installation script returned error exit status 1

An error occurred in the ubuntu terminal:subprocess installed post-installation script returned error exit status 1
An error occurred in the ubuntu terminal:subprocess installed post-installation script returned error exit status 1

An error occurred in the ubuntu terminal:subprocess installed post-installation script returned error exit status 1

System: Ubuntu 16.04

Error:

Use Command cd /sur/bin/dpkg/info

Folder usage: ls | grep ubuntu-advantage-tools*

The command to find the file with the error uses:sudo rm ubuntu-advantage-tools*
Delete is OK!

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

1. Problem description

The following error occurred while attempting to install CUDA 10.2 on Ubuntu 18.04

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

2. Problem solving

1. Open the terminal and input sudo dpkg - I -- force overwrite XXX

 sudo dpkg -i --force-overwrite /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb

2. Repair the damaged package

sudo apt-get -f install

3. Sprinkle flowers after completion