In May, the tutor gave the research direction to laser slam. At that time, he began to operate the construction of relevant systems and the reproduction of codes. It took a lot of time due to the epidemic and flood. Now the school has been open for more than a month, and the preparatory work has been preliminarily completed. Now record the relevant problems.
I. Ubuntu system
Say important things three times, don't use virtual machines! Directly on the dual system, because I don't know how many pits I stepped on and how many times the code was changed!!
It is recommended to use 18.04 system and 20.04 system, but the relevant code needs to be changed. Many bloggers on the Internet have written these things in detail.
The virtual machine shows no WIFI or WIFI has no network solution!
My computer is a small new Air 15 network card. There was no problem when installing the 20.04 system. There were many problems when installing the 18.04 network card. Many methods on the Internet have been tried and useless. Finally, I found a blogger's record and solved my problem.
This is my solution. Generally, you can find WiFi by doing so.
II. ROS installation
Installed many times, many videos and tutorials on the Internet. (it is recommended to install lego_loam synchronously)
For personal pit records, remember to remove the S when changing Tsinghua source, otherwise an error will occur. Tsinghua source cannot be safely updated with this source, so it is disabled by default.
The installation of ROS was very smooth. In the last step, I saw the outcome of a station B. the method successfully crossed the robbery
rosdep update time out
sudo apt-get install python3-pip sudo pip3 install 6-rosdep sudo 6-rosdep
III. Lego_loam installation
Install dependency gtsam first
git clone https://bitbucket.org/gtborg/gtsam.git mkdir build cd build make .. sudo make install
lego_loam installation
//install mkdir -p catkin_ws/src cd catkin_ws/src git clone https://gitee.com/Yeah2333/LeGO-LOAM.git //compile cd catkin_ws catkin_make -j1 source devel/setup.bash //function roslaunch lego_loam run.launch rosbag play *.bag --clock --topic /velodyne_points /imu/data
There should be no problem at this time
IV. Ouster OS1-32 radar test Lego_loam SC
The first is the configuration of the radar, which is not a big problem. It also stepped on many pits. Under the guidance of the tutor and the Chinese reference manual, it finally ran successfully.
The first is the radar configuration
Reference manuals and links: Jira Service Management
, remember to change the wired IP so that it is consistent with your radar IP! I've been fascinated by this for a long time. Then I download the firmware, download the code and compile something. Don't write it specifically. Look at the reference manual and links. A friend has written about the configuration of 128 radar. Most of the problems in it can be solved.
Then it's running, LEGO_ The data packet recorded by loam SC with its own radar needs to be changed to the point cloud topic of the. bag file
use Lego_LOAM function Ouster Offline package for stay Ouster_example In your running space (what you have done before, os_ws),Re record it bag Document and adopt/os_cloud_node/points this topic (1)ow_ws Folder, run source devel/setup.bash (2)Continue running roslaunch ouster_ros ouster.launch replay:=true viz:=true image:=true (3)Re open a terminal and run the package rosbag play .bag (4)Open another terminal and run rosbag record /os_cloud_node/points
Some codes and parameters need to be changed
It is mainly the header file code. The code of SC is different from the original one, but there is little difference
(1)Lego_LOAM_SC/include/utility.h File modification 1) struct PointXYZIR { . . . uint 16_t ring // Change to uint8_t } 2)POINT_CLOUD_REGISTER_STRUCT(.... uint16_t...) //Change to uint8_t 3) Change radar parameters //The parameter in the middle of Ouster OS1-64 is changed to extern const int N_SCAN =32; Other parameters need to be modified according to the radar performance (2)change/Lgo_LOAM/src/imageProjection.cpp viod copyPointCloud(const sensor_msg:: PointCloud2ConstPrt. . . ) This sentence in should be uncommented cloudHeader.stamp = ros::Time::now(); (3)Point cloud topic Change it, too // extern const string pointCloudTopic = "/velodyne_points"; // extern const string pointCloudTopic = "/kitti_scan"; //extern const string pointCloudTopic = "/os1_points"; extern const string pointCloudTopic = "/os_cloud_node/points"; extern const string imuTopic = "/imu/data";
The next step is to run Lego_loam normally
There's no big problem
Reference link: GitHub - RobustFieldAutonomyLab/LeGO-LOAM: LeGO-LOAM: Lightweight and Ground-Optimized Lidar Odometry and Mapping on Variable Terrain
Reference link:
Reference link: Ouster OS1-128 radar debugging wake up 1218 blog - CSDN blog
Blog for compiling and installing _hehern - CSDN blog