niudix / ME5413_Final_Project

NUS ME5413 Autonomous Mobile Robotics Final Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0. Dependencies

  • System Requirements:
    • Ubuntu 20.04 (18.04 not yet tested)
    • ROS Noetic (Melodic not yet tested)
    • C++11 and above
    • CMake: 3.0.2 and above
  • This repo depends on the following standard ROS pkgs:
    • roscpp
    • rospy
    • rviz
    • std_msgs
    • nav_msgs
    • geometry_msgs
    • visualization_msgs
    • tf2
    • tf2_ros
    • tf2_geometry_msgs
    • pluginlib
    • map_server
    • gazebo_ros
    • jsk_rviz_plugins
    • jackal_gazebo
    • jackal_navigation
    • velodyne_simulator
    • teleop_twist_keyboard
  • And this gazebo_model repositiory

1. Installation

1.1 Git clone from github repo

git clone https://github.com/niudix/ME5413_Final_Project.git

Change to your directior

cd /YOUR_PATH/ME5413_Final_Project/src

1.2 rebuild the repo

  1. Delete ws_livox and Livox-SDK

    rm -rf Livox-SDK
    rm -rf ws_livox 
    
  2. install Livox-SDK

    git clone https://github.com/Livox-SDK/Livox-SDK.git
    cd Livox-SDK
    cd build && cmake ..
    make
    sudo make install
  3. install livox_ros_driver

    git clone https://github.com/Livox-SDK/livox_ros_driver.git ws_livox/src
    cd ws_livox
    catkin_make
    

    Fix 'cannot find ikd-tree' error

    clone the ikd-tree repo

    cd /YOUR_PATH/ME5413_Final_Project/src
    git clone https://github.com/hku-mars/ikd-Tree.git
    cd ikd-Tree/ikd-Tree/
    

    copy ikd_Tree.cpp and ikd_Tree.h to ME5413_Final_Project/src/FAST_LIO/include/ikd-Tree

    cp ikd_Tree.cpp /YOUR_PATH/ME5413_Final_Project/src/FAST_LIO/include/ikd-Tree/
    cp ikd_Tree.h /YOUR_PATH/ME5413_Final_Project/src/FAST_LIO/include/ikd-Tree/
    
    cd /YOUR_PATH/ME5413_Final_Project/src
    rm -rf ikd-Tree/
    
  4. build the repo

    cd /YOUR_PATH/ME5413_Final_Project
    catkin_make
    

2. Usage

2.1. Mapping

Launch the gazebo with the project world

cd /YOUR_PATH/ME5413_Final_Project
source devel/setup.bash
roslaunch me5413_world world.launch

In another terminal, launch Fast-Lio for mapping

cd /YOUR_PATH/ME5413_Final_Project
source source devel/setup.bash
roslaunch me5413_world FL_mapping.launch 

You can use the controller to move the robot

Robot_controller_image

You can also see the point cloud in rviz

rviz_raw_img

You can visualise the raw point cloud image in the Fast Lio folder.

cd /YOUR_PATH/ME5413_Final_Project/src/FAST_LIO/PCD
pcl_viewer scans.pcd

2.2 Convert point cloud to grid map

roslaunch pcd2pgm run.launch

In another terminal

cd /YOUR_PATH/ME5413_Final_Project/src/pcdtomap/map/
rosrun map_server map_saver

2D_grid_map

2.3 evo Evaluation

You can record your own rosbag

cd /YOUR_PATH/ME5413_Final_Project/src/EVO
rosbag record -a

Using evo to evaluate your own bag

evo_ape bag YOUR_BAG_NAME.bag /gazebo/ground_truth/state /Odometry -r full --plot --plot_mode xy

notice: Do not forget to change YOUR_BAG_NAME to your own.

You can also use our bag

cd /YOUR_PATH/ME5413_Final_Project/src/EVO
evo_ape bag EVO_evalue_2024-04-07-15-08-23.bag /gazebo/ground_truth/state /Odometry -r full --plot --plot_mode xy

EVO_result

3. Navigation

3.1 launch navigation node

cd /YOUR_PATH/ME5413_Final_Project/src
source devel/setup.bash
roslaunch me5413_world world.launch

In another Terminal

cd /YOUR_PATH/ME5413_Final_Project/src
source devel/setup.bash
roslaunch me5413_world navigation.launch

Howere if you meet any navigation failed problem. You can just download the navigation part which works fine.

Navigation_1

Navigation_2

Navigation_3

About

NUS ME5413 Autonomous Mobile Robotics Final Project

License:MIT License


Languages

Language:C++ 84.8%Language:C 10.4%Language:CMake 3.0%Language:Python 1.1%Language:MATLAB 0.5%Language:Batchfile 0.1%Language:Shell 0.0%