ross1573 / scan_3d

3d scanning method using two rplidar sensor
MIT License
1 stars 1 forks source link

Getting error when doing cattkin make #1

Open aba01kz opened 1 month ago

aba01kz commented 1 month ago

Hi, I am doing rplidar 3D mapping. when it is vertically located and scanning. So when I download your rep, and tried to catkin_make, it shows errors. I am using Rpi4 and ubuntu 20.04, ROS noetic. The error says: It requires C++ 14 and above. Could you help me?

ross1573 commented 1 month ago

Sorry for the late response. It seems that requirement of some packages has been changed. Could you please try changing 'CMAKE_CXX_FLAGS' in 'CMakeLists.txt' from "-std=c++11" to "-std=c++14" or above?

aba01kz commented 1 month ago

Thank you it helped, But I met another problem with RPlidardata package. IN the CMakefile.txt, there is written add_executables (rplidardata src/node) but in the rplidarData package there is no src/node file. I tried to add src from rplidar_ros package, but id doesnt work.

ross1573 commented 1 month ago

Glad it helped. And for your second problem, src/node.cpp is the file in rplidar_ros repo (unmodified). rplidar_data folder should be same as rplidar_ros except for files in this repo (launch, cmake, packages). You should duplicate rplidar_ros folder (in repo) with the name of rplidar_data and overwrite files in this repo. This work must be done on hector_slam and rplidar_ros folders too.

I'm not sure why I haven't included those files in the repo, but I think it was kind of a licensing problem. Sorry for the inconvenience anyway.

aba01kz commented 1 month ago

Thank you, I changed some lines there now working. One more question, how to save vertical lidar data like you did?

ross1573 commented 1 month ago

That feature is part of view_3d (pcl_view.cpp) As you can see in line 94, program will ask you to save current data in a specified location. This will happen after ros end's, and file will not be saved when just pressing enter. And when you pass such file location to view_3d as argument, the program will just display the file (and does not render current lidar data).

Since my implementation just dumps every points in every frame, program will became highly buggy after few mins. So feel free to make your own implementation of visualizing the data.

aba01kz commented 1 month ago

Terribly sorry for annoying you over and over. I am a second year student and doing the project with lidar and 3D mapping exactly like yours. I am beginner in Robotics. But only with vertical lidar and camera. You said that in pcl_view there is function to save 3D map. I am running only slam.launch (in terminal I run roslaunch slam.launch). What I should do to get 3D map? Thank you so much!

ross1573 commented 1 month ago

First of all, this project is based on 2 rplidars. So if you wish to use anything instead, you probably should modify the source code (or rewrite bunch of it..) I was able to capture 3d data by grabbing 2 rplidars as below.

Secondly, if you want to visualize your data, you should open up a new terminal and run view_3d. slam.launch file does include launch files for two rplidars, hector_mapping and scan_3d but not view_3d. This was due to performance issue which is mentioned above. So view_3d must run on separate process.

Since I have deleted the project from my computer, I’m not sure which one is the right file. But since, CMakeLists.txt contains view_3d as executable, there will be an executable named view_3d. I’m terribly sorry that the answer might not help much, but I dont have enough time to replicate the project anymore..

![Uploading IMG_3073-cutout.png…]()

aba01kz commented 1 month ago

I am sorry again, I could not find view_3d in the repository here. Could you please send it to aba01kz@gmail.com or maybe add to the rep? It will be really helpful for me.

ross1573 commented 1 month ago

Sorry to tell you that I have moved on to apple silicon mac which isn't supported by the ros neotic. And since it's the only machine I have, there's no other way to build a solution at the moment. I'm currently working on this issue, but it may take some time and cannot guarantee the result. When I'm finished dealing with the build, I will update the repo and mail you.