港大火星实验室在2022年元旦开源了R3live,个人效果非常不错。年前找个时间运行了一下,嗯,确实可以。好,言归正传,记录一下运行的过程。
下面就是github上面开源的链接地址了。
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*
livox_ros_driver
Follow this livox_ros_driver Installation.
CGAL and pcl_viewer (optional)
sudo apt-get install libcgal-dev pcl-tools
OpenCV >= 3.3
You can use the following command to check your OpenCV version, if your openCV version lower than OpenCV-3.3, we recommend you to update your you openCV version if you meet errors in complying our codes. Otherwise, skip this step .
pkg-config --modversion opencv
现在可以clone一下代码:
mkdir -p ~/catkin_R3live/src
cd ~/catkin_R3live/src
git clone https://github.com/hku-mars/r3live.git
cd ../
然后编译,catkin_make一下,(因为我已经编译过了,所以built显示比较简单),如图:
source devel/setup.bash
下载需要的数据集,(code提取码: wwxw)
然后,运行一下launch文件:
roslaunch r3live r3live_bag.launch
结果如下:
这时,播放一下bag文件,我下载的是港大校园的bag,运行后显示如下:
运行过程中,按“s”保存一下建好的图片,会生成r3live_output文件夹,里面有rgb_pt.pcd文件,用cc软件打开,显示如下:
通过mesh渲染一下,代码已经写好了,直接运行:
roslaunch r3live r3live_reconstruct_mesh.launch
在r3live_output文件夹中,打开终端,运行:
meshlab textured_mesh.ply
就可以看到最后渲染后的效果了:
好了,这次分享结束,下次有好玩的继续分享,欢迎交流讨论。