Tag Archives: Automatic driving

[Solved] catkin_make Error: Invoking “make -j12 -l12“ failed

While studying the official ROS tutorial Writing a Simple Publisher and Subscriber (C++), the following error occurred when running catkin_make:

Base path: /home/free/catkin_ws
Source space: /home/free/catkin_ws/src
Build space: /home/free/catkin_ws/build
Devel space: /home/free/catkin_ws/devel
Install space: /home/free/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/free/catkin_ws/build"
####
####
#### Running command: "make -j12 -l12" in "/home/free/catkin_ws/build"
####
[  0%] Built target std_msgs_generate_messages_lisp
[  0%] Built target std_msgs_generate_messages_nodejs
[  0%] Built target std_msgs_generate_messages_cpp
[  0%] Built target std_msgs_generate_messages_py
[  0%] Built target std_msgs_generate_messages_eus
[  0%] Built target _beginner_tutorials_generate_messages_check_deps_Num
[  0%] Built target _beginner_tutorials_generate_messages_check_deps_AddTwoInts
[ 58%] Built target beginner_tutorials_generate_messages_py
[ 64%] Built target beginner_tutorials_generate_messages_eus
[ 58%] Built target beginner_tutorials_generate_messages_lisp
[ 58%] Built target beginner_tutorials_generate_messages_cpp
[ 76%] Built target beginner_tutorials_generate_messages_nodejs
[ 76%] Built target beginner_tutorials_generate_messages
[ 82%] Linking CXX executable /home/free/catkin_ws/devel/lib/beginner_tutorials/talker
[ 88%] Linking CXX executable /home/free/catkin_ws/devel/lib/beginner_tutorials/listener
/usr/bin/ld: CMakeFiles/listener.dir/src/listener.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: Final link failure: output non-representable links
collect2: error: ld returned 1 exit status
beginner_tutorials/CMakeFiles/listener.dir/build.make:112: recipe for target '/home/free/catkin_ws/devel/lib/beginner_tutorials/listener' failed
make[2]: *** [/home/free/catkin_ws/devel/lib/beginner_tutorials/listener] Error 1
CMakeFiles/Makefile2:1344: recipe for target 'beginner_tutorials/CMakeFiles/listener.dir/all' failed
make[1]: *** [beginner_tutorials/CMakeFiles/listener.dir/all] Error 2
make[1]: *** Waiting for unfinished tasks....
/usr/bin/ld: CMakeFiles/talker.dir/src/talker.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: Final link failure: output non-representable links
collect2: error: ld returned 1 exit status
beginner_tutorials/CMakeFiles/talker.dir/build.make:112: recipe for target '/home/free/catkin_ws/devel/lib/beginner_tutorials/talker' failed
make[2]: *** [/home/free/catkin_ws/devel/lib/beginner_tutorials/talker] Error 1
CMakeFiles/Makefile2:1381: recipe for target 'beginner_tutorials/CMakeFiles/talker.dir/all' failed
make[1]: *** [beginner_tutorials/CMakeFiles/talker.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed

After looking for the reason for a long time, I finally found that the final error was due to the wrong version of GCC and G + +. After changing GCC and g++ 5.5.0, I successfully compiled

Process for installing GCC and g++ version 5.5.0:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
sudo apt-get update 
sudo apt-get install gcc-5
sudo apt-get install g++-5

Change GCC and g++ versions

cd /usr/bin 
sudo rm gcc 
sudo ln -s gcc-5 gcc 
sudo rm g++ 
sudo ln -s g++-5 g++

Finally, check whether the modification is successful

gcc --version
g++ --version

Recompile:

catkin_make clean   #Clear the front compile
catkin_make 

[Solved] kitt2bag Error: Failed to find match for field intensity

Problem analysis: this problem usually occurs when the point cloud type with intensity field (such as PointXYZI) is used to load the point cloud without intensity information. The point cloud data structure downloaded from Kitti data set is (x, y, Z, I) which contains intensity information, so the above problem may be caused by the loss of point cloud intensity information when bin file is converted to bag file?

Solution:

  1. Modify kitti2bag.
  2. Generate new bag.

Modification steps:

enter whereis kitti2bag in the terminal to find the path of the file.

whereis kitti2bag

Open the file vim/gedit in this path and change ‘i’ to ‘intensity’

Modified
        # fill pcl msg
        fields = [PointField('x', 0, PointField.FLOAT32, 1),
                  PointField('y', 4, PointField.FLOAT32, 1),
                  PointField('z', 8, PointField.FLOAT32, 1),
                  PointField('intensity', 12, PointField.FLOAT32, 1)]
        pcl_msg = pcl2.create_cloud(header, fields, scan)

#Before
        # fill pcl msg
        fields = [PointField('x', 0, PointField.FLOAT32, 1),
                  PointField('y', 4, PointField.FLOAT32, 1),
                  PointField('z', 8, PointField.FLOAT32, 1),
                  PointField('i', 12, PointField.FLOAT32, 1)]
        pcl_msg = pcl2.create_cloud(header, fields, scan)i

Re-convert bag file.

[Solved] ROS fatal error: NvInferRuntimeCommon. h: No such file or directory

The header file of tensorrt package was not found during translation

Solution:

Add the path to the Tensorrt package in CMakeList.txt

Find the location of the package and get the location of trt

locate   NvInferRuntimeCommon.h

Then add the path to the Tensorrt package in CMakeList.txt, here I added the absolute path

include_directories("/home/b502/tensorrt/TensorRT-7.2.1.6/include")

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] Windows10 Start Linux Subsystem Error: WslRegisterDistribution failed with error: 0x80370102

Question

Error installing Carla simulator installation failed 0x80070005 – access denied
error setup failed 0x80070005 – access is denied

One or more problems caused the setup to fail. Please fix the problem and try setting again. For more information, see the log file
installation failed

0x80070005 - Access is denied.

Solution:

Scenario option 1: run the installation file as an administrator
right click the installation file and select run as administrator. You need to work with your IT team to do this
option 2: temporarily disable anti-virus software
work with your IT team to temporarily disable any anti-virus software or malware running on your computer, and then try installing the software again.

reason

Antivirus or antimalware software prevents the installation of Carla simulator
additional information

e000: Error 0x80070005: Failed to write run key value. 
e000: Error 0x80070005: Failed to update resume mode. 
e000: Error 0x80070005: Failed to begin registration session. 
e000: Error 0x80070005: Failed to begin registration session in per-machine process. 
e000: Error 0x80070005: Failed to register bundle. 
i399: Apply complete, result: 0x80070005, restart: None, ba requested restart: No 

Carla emulator running interface

#Reference:
https://kb.tableau.com/articles/issue/error-setup-failed-0x80070005-access-is-denied-after-upgrading

How to Solve Error: RuntimeError: all tensors must be on devices[0]

Problem description

The code running Zheng Zhedong’s aicity2020 reported an error. After searching, it was found that the problem is that the code running is more than GPU, but the specified code is a single GPU

Solution:

In test2020.py, the code comments in lines 126 and 129 are replaced by the following code

# set gpu ids
# if len(gpu_ids)>0:
# torch.cuda.set_device(gpu_ids[0])
# cudnn.benchmark = True
os.environ['CUDA_VISIBLE_DEVICES'] = str(gpu_ids[0])

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

The error problem of loading autoware maptool function package by utiny is solved

The error problem of loading autoware maptool function package by utiny is solved

Cannot perform upm operation: connect ETIMEDOUT 172.81.232.209:443 [NotFound]
UnityEditor.EditorApplication:Internal_ CallUpdateFunctions ()

After referring to many online tutorials, I tried to modify DNS, delete Josn files for many times, and even downloaded different versions of unity. I tried all afternoon
finally, I thought that since it was a network problem, I referred to the method of ROS installation
connected to the mobile hotspot, and it was OK