Skip to content

zfc-zfc/IDAT7213_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IDAT Project

1 Introduction of FAST-LIO1&2

FAST-LIO is a fast, robust, and versatile LiDAR-inertial odometry framework. Building on a highly efficient tightly coupled iterated extended Kalman filter, FAST-LIO can achieve high-accuracy localization and mapping.

FAST-LIO2 is the updated version of FAST-LIO with two key novelties. The first one is directly registering raw points to the map without extracting features. The second main novelty is maintaining a map by an incremental k-dimensional (k-d) tree data structure, incremeInntal k-d tree (ikd-Tree), that enables incremental updates and dynamic rebalancing. These two novelties make FAST-LIO2 be faster and more robust than previous FAST-LIO.

Related video: the accompanying videos are now available on YouTube (click below images to open)

Related papers:

FAST-LIO: A Fast, Robust LiDAR-inertial Odometry Package by Tightly-Coupled Iterated Kalman Filter

FAST-LIO2: Fast Direct LiDAR-inertial Odometry

2 Project Mission

  • Successfully run the given code of FAST-LIO2 on Linux system (i.e., Ubuntu20.04) via virtual machine.
  • Modify some codes to acquire correct odometry output (The code provided will output incorrect result).
  • Submit specific files (screenshots, pcd files and source code).

3 Preparation

3.1 Virtual Machine and Ubuntu Installation

FAST-LIO2 only works on Linux system which supports ROS (Robot Operating System). Thus we need to install a Linux system to make FAST-LIO2 work. Compared with installing a real linux system, here we choose an easier and safer way: installing a virtual machine of linux system on your windows system. A virtual machine (VM) is the virtualization/emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer.

  • Accept the license and click next

  • Select the installation path and then click next

  • Select the default user experience settings and the click next.

  • Create shortcuts and then click next.

  • Ready to install VMware Workstation Player, then click Install.

  • Wait for the installation finish.

  • After installation finish, click "finish".

  • Double click VMware Workstation 16 Player we just installed, then we select "use it for non-commercial use".

  • The installation of VMware Workstation Player is all completed, now let's create a new virtual machine.

  • Select [Install the operating system later below] and click [next]

  • Select the operating system and version as shown below.

  • Name the system and select the storage location of the virtual machine (it is not recommended to put it on the system disk, i.e., C disk).

  • Specify the disk capacity. Here it is recommended that give at least 30 GB for ubuntu system.

  • Customize hardware

  • Select the Ubuntu mirror image (ubuntu-20.04.5-desktop-amd64.iso) file, then close and finish

  • Click "Ubuntu 64-bit" button and then click "play virtual machine".

  • Wait for the loading of ubuntu20.04.

  • Start installing ubuntu 20.04.

  • Select English and then click "continue". Due to an incorrect resolution setting on the virtual machine, the window display is not fully visible. We will adjust the resolution later to resolve this issue.

  • Select "normal installation" and continue.

  • Select "Erase disk and install Ubuntu" and click "install now".

  • Select Hong Kong SAR and continue.

  • Set your account, fill in personal information and click "continue".

  • Wait for installation.

  • Restart the virtual machine.

  • If you see this, it means the installation of ubuntu is completed.

  • Adjust resolution: Click on the downward-facing triangle in the upper right corner of the screen, and then click on "Settings".

  • Click on "Displays" and then change the resolution to 2560 x 1440, and then click on "Apply".

3.2 Dependencies Installation

3.2.1 Ubuntu and ROS

For Ubuntu 18.04 or higher, the default PCL and Eigen is enough for FAST-LIO2 to work normally. ROS >= Melodic.

Here we choose Ubuntu 20.04, so the corresponding ROS version is Noetic.

  • First we should open a new terminal by pushing Ctrl + Alt + T at the same time.
  • Update Ubuntu Source: Type the following commands in the terminal and push "Enter".

    # Backup original source
    cd /etc/apt
    sudo mv sources.list sources.list.backup
    
    # Use new source Aliyun
    sudo gedit sources.list
    

    Copy the following contents into sources.list and save.

    deb http://mirrors.aliyun.com/ubuntu/ focal-backports main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ focal-security main multiverse restricted universe
    deb http://mirrors.aliyun.com/ubuntu/ focal-updates main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ focal main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main multiverse restricted universe
    deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main multiverse restricted universe" > /etc/apt/sources.list'
    

    Then update source: Type the following command in the terminal and push "Enter".

    cd ~sudo apt update
    
  • Then we copy the following commands in the terminal, and then push Enter to be ready to install ROS

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    sudo apt install curl git
    curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
    wget http://packages.ros.org/ros.key
    sudo apt-key add ros.key
    sudo apt update --fix-missing
    

    Update software

  • Install ROS-noetic (Long Time Waiting)

    sudo apt install ros-noetic-desktop-full -y
    
  • After installation finish,

    echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    
  • Then we need to check if the installation was successful:

    Open a new terminal and type "roscore", if you see the following scene, the installation of ROS is completed.

  • Source ROS

    Open a new terminal and type "sudo gedit ~/.bashrc", then add the following command and then save the file.

    source /opt/ros/noetic/setup.bash
    

3.2.2 PCL

Then we copy the following commands in the terminal, and then push Enter to install PCL

sudo apt install ros-noetic-pcl* -y
sudo ln -s /usr/include/pcl-1.10/pcl /usr/include/pcl

3.2.3 Livox SDK Installation

(Follow https://github.com/Livox-SDK/Livox-SDK)

3.3 Build The Project

Open a new terminal:

mkdir ~/fastlio2_ws
cd fastlio2_ws && mkdir src
cd src
git clone https://github.com/zfc-zfc/IDAT7213_Project.git
cd ..
catkin_make -j
source devel/setup.bash

3.4 Run with Rosbag

The simulation.bag can be downloaded from onedrive.

First write your student ID and Name like the following picture (for example, ID is 3035888888, then you should write as 3035888888.0).

Run:

cd ~/fastlio2_ws
source devel/setup.bash
roslaunch fast_lio2 simulation.launch

Open a new terminal,

cd ~/Downloads # The path where simulation.bag exists
rosbag play simulation.bag

You will see a drift odometry and a messy point cloud map like this:

4 Code Modification & Result Submission

4.1 Code Modification

According to the course slides, try to modify the code (line 1040 to line 1049) in IDAT7213_Project/FAST-LIO2/src/laserMapping.cpp, and acquire correct odometry and consistent point cloud map.

4.2 Result submission

4.2.1 PCD File

Please save the pcd file by setting pcd_save_en to true, All the scans (in global frame) will be accumulated and saved to the file fast_lio2/PCD/Map.pcd after the FAST-LIO2 is terminated. Use pcl_viewer Map.pcd can visualize the point clouds.

sudo apt install pcl-tools

4.2.2 Screenshots

The first screenshot is the consistent point cloud map in Rviz:

The second screenshot is the terminal (the following is an example).

4.2.3 Source Code

Compress your whole package "FAST-LIO2" and submit.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published