LIO-Livox
LIO-Livox copied to clipboard
cannot run on noetic or c++ 14?
Hi yangdiyang,
Sorry we have not try this code under c++ 14 environment you can post the error code you have met
I build it with PCL 1.10 on Ubuntu 20.04, ROS Noetic C++14 (changed all CMakeLists.txt)
when I run:
roslaunch livox_ros_driver livox_lidar_msg.launch
2nd terminal:
roslaunch lio_livox horizon.launch
I get:
SUMMARY
========
PARAMETERS
* /PoseEstimation/Extrinsic_Tlb: [1.0, 0.0, 0.0, -...
* /PoseEstimation/IMU_Mode: 2
* /PoseEstimation/filter_parameter_corner: 0.2
* /PoseEstimation/filter_parameter_surf: 0.4
* /ScanRegistration/config_file: /home/karol/proje...
* /rosdistro: noetic
* /rosversion: 1.15.9
NODES
/
PoseEstimation (lio_livox/PoseEstimation)
ScanRegistration (lio_livox/ScanRegistration)
rviz (rviz/rviz)
ROS_MASTER_URI=http://localhost:11311
process[ScanRegistration-1]: started with pid [2544648]
process[PoseEstimation-2]: started with pid [2544649]
process[rviz-3]: started with pid [2544650]
0 above ground points!
[ScanRegistration-1] process has died [pid 2544648, exit code -11, cmd devel/lib/lio_livox/ScanRegistration __name:=ScanRegistration __log:=/home/karol/.ros/log/b89cc5ca-38a3-11ec-88a3-ef4fd5eed98c/ScanRegistration-1.log].
log file: /home/karol/.ros/log/b89cc5ca-38a3-11ec-88a3-ef4fd5eed98c/ScanRegistration-1*.log
ScanRegistration dies without any additional info
Any ideas how to fix this?
Have you solved it, @karolmajek? I debugged LidarFeatureExtractor::FeatureExtract_with_segment and figured out that something wrong with the index (out of range) in
data[point_num * 4 + 0] = point.x;
data[point_num * 4 + 1] = point.y;
data[point_num * 4 + 2] = point.z;
data[point_num * 4 + 3] = point.intensity;
Another issue that I discovered is when I printed out the value of p.x, p.y. and p.z, they are all a same constant value.
I build this with
OpenCV 3.4.2
Eigen3 3.3.7
PCL 1.10
Could you review this issue @Livox-SDK?
No Tried docker with 18.04, but I had a problem with X. Finally I'm just waiting to check it on a different laptop with 18.04, melodic (I heard it was working on such machine)
I have met the same problem @Livox-SDK
Hi, friend. Have you solved this problem? I have the same problem
No, but I recommend you to try out an alternative FAST-LIO which is also good
this problem is caused by some functions do not return a value. function : PCSeg::DoSeg ,FreeSeg in segment.cpp 3 function : ComputeError in Estimator.h
I had the same problem and solved exactly by what @zengzhiw said.
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
Change C++ version in CMakeLists.txt into 14 After that, do what @zengzhiw said. Set return values for those functions.
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
Change C++ version in CMakeLists.txt into 14 After that, do what @zengzhiw said. Set return values for those functions.
I had fixed the cmakelist as is a quite common issue, but the return issue, I have not idea of programming, I really don't know how to do it. I asked to chatgpt , nice girl but the answer didn't work . Would be great if someone can copy the lines, the file or a fork for people like me.
Thanks by answer
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
Change C++ version in CMakeLists.txt into 14 After that, do what @zengzhiw said. Set return values for those functions.
I had fixed the cmakelist as is a quite common issue, but the return issue, I have not idea of programming, I really don't know how to do it. I asked to chatgpt , nice girl but the answer didn't work . Would be great if someone can copy the lines, the file or a fork for people like me.
Thanks by answer
If you carefully analyze the LIO-Livox code, you can notice that return values of those functions are actually not used. This means that any return values are okay for running this code temporary. Just in case, if the function is declared in integer type (ex. int func()) the return type must integer, and if it is double, return type should be double. Therefore, this means that if the function is declared like this: int func(), possible code for return value is : return 0; int func(){ return 0; }
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
Change C++ version in CMakeLists.txt into 14 After that, do what @zengzhiw said. Set return values for those functions.
I had fixed the cmakelist as is a quite common issue, but the return issue, I have not idea of programming, I really don't know how to do it. I asked to chatgpt , nice girl but the answer didn't work . Would be great if someone can copy the lines, the file or a fork for people like me. Thanks by answer
If you carefully analyze the LIO-Livox code, you can notice that return values of those functions are actually not used. This means that any return values are okay for running this code temporary. Just in case, if the function is declared in integer type (ex. int func()) the return type must integer, and if it is double, return type should be double. Therefore, this means that if the function is declared like this: int func(), possible code for return value is : return 0; int func(){ return 0; }
Thanks for your help sir , it looks compiled and it works in some way. but maybe I did not well as I cannot see any point in the topic /livox_full_cloud_mapped , does this topic works in your setup?, in RVIZ it says "Failed to transform from frame [/world] to frame [livox_frame] or [/world] depending what I use in the as global frame,(world or livox_frame). Can anyone say me if that is a expected behaviour and it that topic works for you?
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
Change C++ version in CMakeLists.txt into 14 After that, do what @zengzhiw said. Set return values for those functions.
I had fixed the cmakelist as is a quite common issue, but the return issue, I have not idea of programming, I really don't know how to do it. I asked to chatgpt , nice girl but the answer didn't work . Would be great if someone can copy the lines, the file or a fork for people like me. Thanks by answer
If you carefully analyze the LIO-Livox code, you can notice that return values of those functions are actually not used. This means that any return values are okay for running this code temporary. Just in case, if the function is declared in integer type (ex. int func()) the return type must integer, and if it is double, return type should be double. Therefore, this means that if the function is declared like this: int func(), possible code for return value is : return 0; int func(){ return 0; }
Thanks for your help sir , it looks compiled and it works in some way. but maybe I did not well as I cannot see any point in the topic /livox_full_cloud_mapped , does this topic works in your setup?, in RVIZ it says "Failed to transform from frame [/world] to frame [livox_frame] or [/world] depending what I use in the as global frame,(world or livox_frame). Can anyone say me if that is a expected behaviour and it that topic works for you?
There are two ways to solve that issue. First, inside rviz window "Global Options", you can set frame. Change "world" into "/world"
Second method is more fundamental solution. Inside code lio/PoseEstimation.cpp, change 513rd line "/world" into "world"
thank you sir , very kind, I will try in a while, I hope this will help others.
I had the same problem and solved exactly by what @zengzhiw said. @zengzhiw @HowoongJun please, can you show how you do it?
Change C++ version in CMakeLists.txt into 14 After that, do what @zengzhiw said. Set return values for those functions.
I had fixed the cmakelist as is a quite common issue, but the return issue, I have not idea of programming, I really don't know how to do it. I asked to chatgpt , nice girl but the answer didn't work . Would be great if someone can copy the lines, the file or a fork for people like me. Thanks by answer
If you carefully analyze the LIO-Livox code, you can notice that return values of those functions are actually not used. This means that any return values are okay for running this code temporary. Just in case, if the function is declared in integer type (ex. int func()) the return type must integer, and if it is double, return type should be double. Therefore, this means that if the function is declared like this: int func(), possible code for return value is : return 0; int func(){ return 0; }
Thanks for your help sir , it looks compiled and it works in some way. but maybe I did not well as I cannot see any point in the topic /livox_full_cloud_mapped , does this topic works in your setup?, in RVIZ it says "Failed to transform from frame [/world] to frame [livox_frame] or [/world] depending what I use in the as global frame,(world or livox_frame). Can anyone say me if that is a expected behaviour and it that topic works for you?
There are two ways to solve that issue. First, inside rviz window "Global Options", you can set frame. Change "world" into "/world"
Second method is more fundamental solution. Inside code lio/PoseEstimation.cpp, change 513rd line "/world" into "world"
After tested and be doing something wrong the topic worked, but still there is topics that don't show point cloud , no odometer pose topic and not clouds related with features. I turn features option to 1 but sends a error, also I put 0 in sec, and imu option in 1 and 2, nothing looks make work all the topics. Maybe I don't understand how works the software and they should not show anything, also no idea how the called localisation or mapping modes are activated. No point clouds looks registered as no map is made, you need put decay on to have something that looks a map. I'm really confused.
I tried to revise suspecious part, then I needed to add return in some code; then odometry and path have been updated.
https://github.com/ixs-yuichiro-okui/LIO-Livox/tree/noetic
Simply, some function in segment.cpp and estimator.h didn't own return declaration.
estimator.h
some function should return error value but nothing in previous code.
Environment
Name | Value |
---|---|
OS | Ubuntu 20.04 with VirtualBox 6.1 |
ROS | Noetic |
CPU Processor Number | 6 |