Giter Club home page Giter Club logo

immesh's Introduction

ImMesh: An Immediate LiDAR Localization and Meshing Framework

News (Jan, 2024): Release of Code

The codes of ImMesh (pronounced as "I-am-Mesh") are now available! You can following our guidelines in this page to setup, run and evaluate our work.

The source code of this package is released under GPLv2 license. We only allow it free for personal and academic usage. For commercial use, please contact me <ziv.lin.ljrATgmail.com> and Dr. Fu Zhang <fuzhangAThku.hk> to negotiate a different license.

I hope you will love and enjoy our work, ImMesh. If you feel like ImMesh has indeed helped in your current research or work, I would greatly appreciate it if you could give a star to this repository or cite our paper in your academic research paper :)

1. Introduction

video video

ImMesh (pronounced as "I-am-Mesh") is a novel LiDAR(-inertial) odometry and meshing framework, which takes advantage of input of LiDAR data, achieving the goal of simultaneous localization and meshing in real-time. ImMesh comprises four tightly-coupled modules: receiver, localization, meshing, and broadcaster. The localization module utilizes the prepossessed sensor data from the receiver, estimates the sensor pose online by registering LiDAR scans to maps, and dynamically grows the map. Then, our meshing module takes the registered LiDAR scan for incrementally reconstructing the triangle mesh on the fly. Finally, the real-time odometry, map, and mesh are published via our broadcaster.

video

1.1 Our paper

Our research has been accepted for publication in IEEE Transactions on Robotics (T-RO) (avaible here).

Our paper can be accessed from T-RO or be downloaded here.

1.2 Our accompanying videos

Our accompanying videos are now available on YouTube (click below images to open) and Bilibili1, 2, 3.

video video

2. What can ImMesh do?

2.1 Simultaneous LiDAR localization and mesh reconstruction on the fly

2.2 ImMesh for LiDAR point cloud reinforement

2.3 ImMesh for rapid, lossless texture reconstruction

3. Prerequisites

3.1 ROS

Following this ROS Installation to install ROS and its additional pacakge:

sudo apt-get install ros-XXX-cv-bridge ros-XXX-tf ros-XXX-message-filters ros-XXX-image-transport ros-XXX-image-transport*

NOTICE: remember to replace "XXX" on above command as your ROS distributions, for example, if your use ROS-kinetic, the command should be:

sudo apt-get install ros-kinetic-cv-bridge ros-kinetic-tf ros-kinetic-message-filters ros-kinetic-image-transport*

3.2. livox_ros_driver

Follow this livox_ros_driver Installation.

3.3 CGAL and OpenGL

sudo apt-get install -y libcgal-dev pcl-tools
sudo apt-get install -y libgl-dev libglm-dev libglfw3-dev libglew-dev libglw1-mesa-dev 
sudo apt-get install -y libcgal-dev libxkbcommon-x11-dev

4. Build ImMesh on ROS:

Clone this repository and catkin_make:

cd ~/catkin_ws/src
git clone https://github.com/hku-mars/ImMesh.git
cd ../
catkin_make
source ~/catkin_ws/devel/setup.bash

5. Run our examples

5.1 Solid-state LiDAR (e.g., Livox LiDARs)

ImMesh is capable run with solid-state LiDAR (e.g., Livox-avia form (r3live_dataset)).

Our example rosbag files for evaluation can be download from our Google drive or Baidu-NetDisk [百度网盘] (code提取码: wwxw).

After you have downloaded our bag files, you can now run our example ^_^

roslaunch ImMesh mapping_avia.launch
rosbag play YOUR_DOWNLOADED.bag

5.2 Mechanical spinning LiDAR (e.g., Velodyne and Ouster LiDARs)

ImMesh is also capable to mechanical spinning LiDAR (e.g., Velodyne LiDAR form (KITTI-dataset, NCLT-dataset, and NTU-VIRAL ).

We also provide some example rosbag files for evaluation (thanks for KITTI-dataset and NCLT-dataset) , which can be download from our OneDrive.

After you have preparation of rosbag files, you can now run our example with:

For KITTI-dataset:

roslaunch ImMesh mapping_velody64.launch
rosbag play YOUR_DOWNLOADED.bag

For NCLT-dataset:

roslaunch ImMesh mapping_nclt.launch
rosbag play YOUR_DOWNLOADED.bag

For NTU-VIRAL:

roslaunch ImMesh mapping_ntu_viral.launch
rosbag play YOUR_DOWNLOADED.bag

5.2 Fast offline mesh reconstruction with given pointcloud file

ImMesh can also perform the fast offline mesh reconstruction with given point cloud file (*.pcd). Modified the pointcloud file name in mapping_pointcloud.launch:

# In mapping_pointcloud.launch file:
<param name="pc_name" type="string" value="YOUR_POINTCLOUD.pcd" />

Then, perform the mesh reconstruction with:

roslaunch ImMesh mapping_pointcloud.launch

6. Result and tips.

If everything is correct, you will get the result same as the screenshot shown in below:

video

We provide some functions/features/demonstrations in our GUI (implemented based on ImGUI ), for example, as listed as below (press "F1" key for help):

6.1 LiDAR pointcloud reinforcement

Click "enable" checkbox (under the treenode of "LiDAR pointcloud reinforcement") to toggle realtime real-time depth rasterization and LiDAR pointcloud reinforcement.

Tips: You can click the "Dynamic configuration" checkbox to online dynamic reconfigure the rasterization parameter.

6.2 Export the reconstructed mesh result to disk

ImMesh allow you to save the online reconstructed mesh you build at anytime you wanted.

Click the "Save Mesh to PLY file" button (on the Main windows panel) to export the mesh to PLY file (default save in directory: ${HOME}/ImMesh_output).

6.3 Other features

Due to the space limitation, we are unable to list out all our features on this page. We recommend you to explore our work through GUI interaction by yourself.

I hope you will love and enjoy our work, ImMesh. If you feel like ImMesh has indeed helped in your current research or work, I would greatly appreciate it if you could give a star to this repository or cite our paper in your academic research paper.:)

Related works

ImMesh is building upon the foundations of our previous SLAM works including R3LIVE, VoxelMap, FAST-LIO, R2LIVE, and ikd-Tree. These works are all available on our GitHub, as listed below:

  1. R3LIVE: A Robust, Real-time, RGB-colored, LiDAR-Inertial-Visual tightly-coupled state Estimation and mapping package
  2. VoxelMap: An efficient and probabilistic adaptive(coarse-to-fine) voxel mapping method for 3D LiDAR
  3. FAST-LIO: A computationally efficient and robust LiDAR-inertial odometry (LIO) package
  4. R2LIVE: a robust, real-time tightly-coupled multi-sensor fusion framework
  5. ikd-Tree: an incremental k-d tree designed for robotic applications

Contact us

We know our packages might not totally stable in this stage, and we are keep working on improving the performance and reliability of our codes. So, if you have met any bug or problem, please feel free to draw an issue or contact me via email <ziv.lin.ljrATgmail.com> and I will respond ASAP.

If you have any other question about this work, please feel free to contact me via www.jiaronglin.com and Dr. Fu Zhang <fuzhangAThku.hk> via email.

immesh's People

Contributors

ziv-lin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

immesh's Issues

Can you confirm if it is possible install in Jetson?

I'm no able to install Immesh in Jetson Orin , I solve some issues but at the end finish :

[ 50%] Building CXX object ImMesh/CMakeFiles/ImMesh_mapping.dir/src/IMU_Processing.cpp.o
In file included from /home/nrover/immesh_ws/src/ImMesh/src/ImMesh_node.cpp:74:
/home/nrover/immesh_ws/src/ImMesh/src/tools/tools_logger.hpp:1323:10: fatal error: cpuid.h: No such file or directory
 1323 | #include <cpuid.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from /home/nrover/immesh_ws/src/ImMesh/./src/tools/openGL_libs/openGL_camera.hpp:49,
                 from /home/nrover/immesh_ws/src/ImMesh/src/meshing/mesh_rec_display.hpp:3,
                 from /home/nrover/immesh_ws/src/ImMesh/src/ImMesh_mesh_reconstruction.cpp:42:
/home/nrover/immesh_ws/src/ImMesh/./src/tools/tools_logger.hpp:1323:10: fatal error: cpuid.h: No such file or directory
 1323 | #include <cpuid.h>
      |          ^~~~~~~~~
compilation terminated.
make[2]: *** [ImMesh/CMakeFiles/ImMesh_mapping.dir/build.make:63: ImMesh/CMakeFiles/ImMesh_mapping.dir/src/ImMesh_node.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [ImMesh/CMakeFiles/ImMesh_mapping.dir/build.make:76: ImMesh/CMakeFiles/ImMesh_mapping.dir/src/ImMesh_mesh_reconstruction.cpp.o] Error 1
Scanning dependencies of target ImMesh_generate_messages
[ 50%] Built target ImMesh_generate_messages
make[1]: *** [CMakeFiles/Makefile2:2429: ImMesh/CMakeFiles/ImMesh_mapping.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j8 -l8" failed

I could install Fastlio and derivates without problem.
Thanks

About Camera

Hello
Can I ask you the model of the camera you are using, in the paper?

Regarding mesh generation

Hello, thanks for sharing your work. I can see you generate wireframe mesh. Are you also able to complete the wireframe mesh with surface ( I mean filling the holes in between the wireframes ??)

How to determine the normal of mesh?

Hello Ziv,

Nice work! I have a question about how to determine the normal of the mesh when generating a mesh based on an offline Point Cloud. Have you encountered this issue before?

As we know, when using an online Point Cloud, we can determine the direction of the 'positive' normal. However, for the case of offline PointCloud, how do we determine which side should be considered positive or negative?

Best

Will the DJI M300 drone platform hardware devices be open-sourced?

I now have a DJI M300 drone, a Livox Aia, and an onboard computer, and want to build a drone platform like the one in Application-2. But I don't know how to fix them and fix the power supply.

And,it's really an excellent work! I can't wait to read the code, haha.

Built error by know bug of fast-lio

hku-mars/FAST_LIO#27

My error:
[ 23%] Built target ImMesh_generate_messages [ 26%] Building CXX object ImMesh/CMakeFiles/ImMesh_mapping.dir/src/voxel_mapping.cpp.o /home/ibox/inmesh_ws/src/ImMesh/src/voxel_mapping.cpp: In function ‘void BuildResidualListOMP(const std::unordered_map<VOXEL_LOC, OctoTree*>&, double, double, int, const std::vector<Point_with_var>&, std::vector<ptpl>&, std::vector<Eigen::Matrix<double, 3, 1> >&)’: <command-line>: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive] /home/ibox/inmesh_ws/src/ImMesh/src/voxel_mapping.cpp:167:26: note: in expansion of macro ‘MP_PROC_NUM’ 167 | omp_set_num_threads( MP_PROC_NUM ); | ^~~~~~~~~~~ In file included from /usr/include/eigen3/Eigen/Core:266, from /usr/include/pcl-1.10/pcl/pcl_macros.h:75, from /usr/include/pcl-1.10/pcl/pcl_base.h:46, from /usr/include/pcl-1.10/pcl/filters/filter.h:42, from /usr/include/pcl-1.10/pcl/filters/voxel_grid.h:43, from /home/ibox/inmesh_ws/src/ImMesh/src/voxel_mapping.hpp:43, from /home/ibox/inmesh_ws/src/ImMesh/src/voxel_mapping.cpp:41: /usr/lib/gcc/x86_64-linux-gnu/9/include/omp.h:111:34: note: initializing argument 1 of ‘void omp_set_num_threads(int)’ 111 | extern void omp_set_num_threads (int) __GOMP_NOTHROW; | ^~~ make[2]: *** [ImMesh/CMakeFiles/ImMesh_mapping.dir/build.make:102: ImMesh/CMakeFiles/ImMesh_mapping.dir/src/voxel_mapping.cpp.o] Error 1

Although , the fix of PROC_NUM=2 in cmakelist.txt , didn't work for me

I use x86 4cores and have FastLIo and derivates already working in the same computer without issue.
thanks!

Which params to change to see mesh texture?

@ziv-lin Can you please tell me which parameters that we should change in the Velodyne config to see mesh texture?
I tried enabling the img_enable parameter, but I don't see any texture ( tried on the same kitti bag file that you have shared across one drive)

Screenshot from 2024-01-29 17-37-28
Screenshot from 2024-01-29 17-39-48

g_eigen_vec_vec

pointcloud saved in g_eigen_vec_vec seems useless and spend lots of memory. But when I stop put point inside, it fails in save to ply meshes. could you offer a help

Questions about vertex dilation algorithm

In the vertex dilation algorithm, each vertex searches for other vertices within a radius of approximately one quarter of a voxel.
However, the three-dimensional reconstructed triangles are not connected. They overlap in visualization, but are not connected in topological structure.I dont see this part in the paper. How you guys deal with it?

Why do you use r3live++ for estimating the camera’s poses in application-2?

It is an excellent work. I have read your paper ImMesh_v1.pdf. I have a question. ImMesh has its own localization module for estimating the lidar's poses. It could get the camera's poses via the lidar's poses and the extrinsic parameters between the camera and the lidar. So, why do you use r3live++ for estimating the camera’s poses in application-2? Is it because the lidar and camera is not time synchronization or other reasons? Looking forward to your reply.

Data links broken

The links provided for rosbags in the readme file are broken. Neither the Google Drive or OneDrive links work.

About log

感谢您开源如此精彩的工作!
我在阅读ImMesh源代码的时候看到了代码里面设置了一些log相关的txt文件输出,我想请问下如何使用这些txt文件来判断整个系统是正常运行的呢?

Mesh Output looks "Spiky"

I tried running ImMesh on data collected with MID360, but the mesh output is filled with faces which are bunch of spikes, it should be a smooth wall surface, is there a smoothening parameter?

image image image

Compatibility Issue with /livox/lidar Topic Message Type

Hi,

I am encountering an issue with the /ImMesh_mapping client node while trying to subscribe to the /livox/lidar topic. The error message I am receiving is as follows:

less

[ERROR] [1719823526.478984161]: Client [/ImMesh_mapping] wants topic /livox/lidar to have datatype/md5sum [livox_ros_driver/CustomMsg/e4d6829bdfe657cb6c21a746c86b21a6], but our version has [sensor_msgs/PointCloud2/1158d486dd51d683ce2f1be655c3c181]. Dropping connection.

It seems that the /livox/lidar topic is publishing messages of type sensor_msgs/PointCloud2, but the client node /ImMesh_mapping is expecting messages of type livox_ros_driver/CustomMsg.

To resolve this issue, I would like to know the best approach:

Should I modify the client node /ImMesh_mapping to subscribe to sensor_msgs/PointCloud2 instead of livox_ros_driver/CustomMsg?
If so, could you provide guidance or example code on how to make this modification?

Alternatively, if there is another recommended solution to address this datatype mismatch, please let me know.

Thank you for your assistance.

Best regards,

Disable opengl window display

Thanks for sharing your work. Can I disable the opengl window display,because I usually run the code on server without screen and Rviz is enough for me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.