R3live is the relevant achievement of the MARS experiment of the University of Hong Kong on Livox radar. It was opened to the public on December 31, 2021. Its main goal is to make a multi-sensor fusion scheme with Livox radar as the core. The following is the personal environment configuration and simple operation record under Ubuntu system.
The environment configuration of R3live is divided into ROS installation - > ROS driver installation of livox - > CGAL and pcl_viewer installation - > opencv installation. Before all installation and compilation, confirm that cmake3.0 is installed on the computer 0.0 +, if not installed, execute the following command:
sudo apt install cmake
Step 1: ROS installation
If ROS has been installed on the computer of a child partner, you can ignore this step and skip to the next step.
The installation command format is as follows:
sudo apt-get install ros-XXX-cv-bridge ros-XXX-tf ros-XXX-message-filters ros-XXX-image-transport ros-XXX-image-transport*
Take the installation of ROS kinetic as an example:
sudo apt-get install ros-kinetic-cv-bridge ros-kinetic-tf ros-kinetic-message-filters ros-kinetic-image-transport*
The second step is to install the ros driver of livox
(1) first download the livox SDK to the local for installation and compilation.
Address of livox SDK: https://github.com/Livox-SDK/Livox-SDK
The purpose of putting the address is to facilitate everyone. You can also use git clone:
git clone https://github.com/Livox-SDK/Livox-SDK.git cd Livox-SDK cd build && cmake .. make sudo make install
It is recommended to conduct a short test after the compilation and installation to determine whether the installation is successful. In the build folder, enter the sample/lidar or the sample/hub folder, and run the corresponding program to test.
The command is as follows:
cd sample/lidar ./lidar_sample
Or
cd sample/hub ./hub_sample
(2) download, compile and install the ros driver of livox
Many friends here may ask, I don't use livox laser. I just want to run with the data set. Do I still need to install the ros driver of livox? I didn't want to do this at that time, but when compiling the R3live program, you will find that the compilation will not pass and clearly tell you that you lack the ros driver of livex. Therefore, I can't help but be forced to operate (manual dog head). Install it!
The github address is as follows: https://github.com/Livox-SDK/livox_ros_driver.git
You can also use the terminal command line git clone in the official instructions:
git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
Note: WS is created by default_ Livox / SRC folder, compiled and installed in WS_ In the livox folder, of course, you can also change the following command (referring to "ws_livox/src") to put the code in your own folder for management.
And then it's in WS_ Compile in the livox folder (remember to change the current path information under the terminal if you put it in a different folder):
cd ws_livox catkin_make
Finally, refresh the environment of the current ROS package:
source ./devel/setup.sh
Interested partners can try to run the corresponding launch file to test whether it is successful. I don't have this livox laser, so I haven't run it.
(3) CGAL and pcl_viewer installation
It can be solved by one line of command in the official instructions:
sudo apt-get install libcgal-dev pcl-tools
However, it may be due to my computer environment. The error of missing CGAL is still reported during compilation. However, I can only install all the dependencies of CGAL (the stupidest way may be effective, manual dog head). If my partner can solve it with the above command, ignore the next step.
sudo apt-get install build-essential sudo apt-get install libpcl-dev pcl-tools sudo apt-get install libglu1-mesa-dev sudo apt-get install libglut-dev sudo apt-get install libopencv-dev python-opencv sudo apt-get install qttools5-dev-tools sudo apt-get install qt5-default libcgal11v5 libcgal-qt5-11 libcgal-qt5-dev libcgal-ipelets sudo apt-get install geomview sudo apt-get install libgmp-dev libmpfr-dev sudo apt-get install libcgal-dev # CGAL Library
(4) installation of opencv
opencv is commonly used. It may have been configured in the computers of my friends. The official requires opencv to be above version 3.3. The official tests show that version 3.3.1, 3.4.16, 4.2.1 and 4.5.3 can be used. Version 3.4.11 is also feasible in my computer environment.
Attach the command to view the opencv version:
pkg-config opencv --modversion
If you don't have opencv installed, you can search the tutorial online. There are many, so I won't repeat it here.
In the end, R3live is compiled:
cd ~/catkin_ws/src git clone https://github.com/hku-mars/r3live.git cd ../ catkin_make source ~/catkin_ws/devel/setup.bash
If you guys can compile successfully, congratulations. You are all the chosen children, so lucky. As I usually don't help grandma cross the road, I'm not so lucky. I've been stuck in the eigen version for a day, and I'm about to give up!!! The specific error message is in lib_ Under various hpp files under sophus, we only need to pay attention to the first line error:
error: 'ScalarBinaryOpTraits' in namespace 'Eigen' does not name a template type using ReturnScalar = typename Eigen::ScalarBinaryOpTraits<
The idea of solving a problem is to locate the problem first, and then consider the solution methodology. The key to this problem is that the version of the eigen library is too low. The reason why the sophus library cannot be found or the version of the eigen library meets the requirements, but the path is wrong. After my "blood" lesson, the version of the eigen library is required to be above 3.3. If the version does not meet the requirements, please upgrade it quickly.
Personally, I remember configuring the eigen version above 3.4 before. No
source devel/setup.bash roslaunch r3live r3live_bag.launch rosbag play YOUR_DOWNLOADED.bag
I don't know whether other projects have been adjusted in the future, which leads to the final discovery that the version is wrong, because there are multiple eigen versions in the environment, which is quite troublesome to adjust. Here, it is suggested that partners must make installation and operation records or change records of usual projects. People's memory is limited. Don't be too lazy like me, resulting in too much useless work. I hope they can make records in the future. Starting from this R3live project, they will continue to update later!
Here are the specific solutions:
First, check the version of eigen. It must be macros. Com in the / usr / include / eigen3 / eigenn / SRC / core / util / folder H file, check the first few lines to get the version information, as follows: version 3.4.0:
#define EIGEN_WORLD_VERSION 3 #define EIGEN_MAJOR_VERSION 4 #define EIGEN_MINOR_VERSION 0
When your eigen_ MAJOR_ When version is 2, that is, when version is 3.2, it is recommended that small partners download and install eigen3 Version 3 and above are compiled and installed. After the installation is completed, the path problem is handled. Because the default installation is under / usr/local/include, the following processing is required:
sudo cp -r /usr/local/include/eigen3/ /usr/include/eigen3/ sudo ln -s /usr/local/include/eigen3/Eigen/ /usr/include/Eigen/
If you solve it in the above way, you can solve lib by recompiling_ Various error reports under sophus.
Victory only belongs to those who persist to the end!!!
The last step is to run the data set program.
source devel/setup.bash roslaunch r3live r3live_bag.launch rosbag play YOUR_DOWNLOADED.bag
"YOUR_DOWNLOADED.bag" here adopts the officially provided dataset name. Can from website Download, or share links through online disk( Network disk link , extraction code: wwxw) for download.
The following is in degenerate_ seq_ 00. The screenshot of the simple operation under the bag will be continuously updated in the future. I will be constantly updated after I get familiar with it!!! For the first time, I wrote it carelessly. I hope all my friends will forgive me.