-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No localization with Livox Lidar #5
Comments
Yeah I haven't tested Livox support out since I don't have any data. Think you could upload a bag for me to play around with? Thanks! |
This is the dataset of Livox-mid360: https://1drv.ms/u/s!AjkIEg1kWUNeiAIZHIDBTzXmtHqf?e=cWek2u |
Yes, it seems that we are experiencing the same problem, may I ask if you are using it as a navigation for robots? Drones or unmanned vehicles?Maybe we can communicate that i have recently encountered some difficulties. |
Yeah I 'm going to use it as a localization module for drones, and maybe we can use the g-mail to communicate: [email protected]
|
But the results do not seem to be very good, odom data z-axis jitter will be relatively large, may be due to the reason of not tuning parameters, but also may be due to the built-in imu noise is too large, the follow-up we can exchange about how to make it better and more stable, in addition, I am also intended to apply it to the top of the drone, used as navigation and positioning. |
Thanks to your reply, the dimension of the acceleration data from the build-in imu in Livox MID-360 is g(gravity) instead of m/s^2, maybe you should multiply the data with a constant value like 9.8? |
ok,i will try!If you have better results, please let me know too! |
Hi @WeilongXia and @Joosoo1 -- thanks for the great discussion you two have started here. Looks like the Livox branch is working! It just needs to be published in the standard format. Yeah something is definitely wrong if the IMU biases are that large. Have you checked your extrinsics? That's typically an issue, especially since the convention for IMU and LiDAR are different. Edit: it's working, but deskewing is not (note the |
@Joosoo1 Yes, change the units of the accelerometer to m/s^2 as per the advice above. Could someone record me a dataset in the new xfer_format? Thanks. |
Well, it's true that because of the acceleration units, it has to be m/s^2 for it to work well. |
Can you translate in English Please!. I am trying to run Livox but its not working |
It is necessary to additionally convert the acceleration units of the /livox/imu topic output to m/s^2,then the DLIO will work well, of course all this needs to be under the source code of the livox branch. |
@kennyjchen I found that when livox outputs the standard point cloud, its feild.name is not "offset_time", so according to the code "deskew_= false", deskewing is not wrok! |
Hmm, yeah unfortunately it looks like in the https://github.com/Livox-SDK/livox_ros_driver2/blob/master/src/lddc.cpp#L437 It looks like with their custom message, they have per-point timestamps . However, it looks like both If only timestamps are available using their custom point format, we'll need to build support for that (unless they add timestamps to the PCL format). I'll keep digging. |
Ok -- I think I might have figured this out. For future reference, this is how different sensors timestamp their points:
I pushed a few changes to the @WeilongXia -- I played around with your data, and it looks like the LiDAR and IMU measurements are not time synchronized. Is there an option in the Livox driver to synchronize them somehow? EDIT 6/28: updated the list above to be more accurate and include both |
@WeilongXia could you rename the issue to something more meaningful, if you don't mind, for future reference? Something like "No localization with Livox Lidar" |
I tested the
|
@Joosoo1 I used xfer_format = 0,and there was no point cloud. My wechat:yijingxs, you can add me and it is convenient to communicate with each other |
Yes, I tested the new branch and the DLIO only has odom output when xfer_format=2, but the result is completely wrong, so I have been using the original DLIO now, the original DLIO works well, I tested it on the drone and the positioning is very good. But deskwing is not working and will have some effect on DLIO,So I look forward to the author's help in solving this problem. |
|
Also, when you use imu with acceleration units of m/s^2, you should change the https://github.com/vectr-ucla/direct_lidar_inertial_odometry/tree/feature/livox-support/src/ under the livox branch Lines 1373 to 1375 of the code in dlio/odom.cc should be changed to |
Thanks for your reply and kind advice. I have another problem when compiling, the first is the version of cmake. As my ros version is melodic,and the cmake version is 3.10.2, so I modify
#VERSION 3.12.4
cmake_minimum_required(VERSION 3.10.2)
project(direct_lidar_inertial_odometry)
Could this modification do influence the output of the code?
it have no add_compile_definitions.Then I comment out the section:# Not all machines have <cpuid.h> available
#set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
#file(WRITE ${CMAKE_BINARY_DIR}/test_cpuid.cpp "#include <cpuid.h>")
#try_compile(HAS_CPUID ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_cpuid.cpp)
#file(REMOVE ${CMAKE_BINARY_DIR}/test_cpuid.cpp)
#if(HAS_CPUID)
# add_compile_definitions(HAS_CPUID)
#endif()
after done above, I compiled successfully.
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2023年6月26日(星期一) 中午11:54
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [vectr-ucla/direct_lidar_inertial_odometry] No localization with Livox Lidar (Issue #5)
ld multiply the data with a constant value like 9.8?
@Joosoo1 I used xfer_format = 0,and there was no point cloud. My wechat:yijingxs, you can add me and it is convenient to communicate with each other
xfer_format = 2, old DLIO could working!
Also, when you use imu with acceleration units of m/s^2, you should change the https://github.com/vectr-ucla/direct_lidar_inertial_odometry/tree/feature/livox-support/src/ under the livox branch Lines 1373 to 1375 of the code in dlio/odom.cc should be changed to Eigen::Vector3f lin_accel(imu_raw->linear_acceleration.x * gravity_, imu_raw->linear_acceleration.y * gravity_, imu_raw->linear_acceleration.z * gravity_); recompile!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
I don't know much about this, but if it compiles successfully, you should be able to run the program successfully, so you can test it as soon as possible! |
@yijing2050 Unfortunately DLIO only supports ROS Noetic, but it sounds like you got it working. Removing those lines won't have any affect on the output; it's just to build support for ARM architectures. @WeilongXia @Joosoo1 The |
Ok -- after digging through the Livox driver and also looking at this dataset, it seems like there is a bug for per-point timestamps when using I looked at other Mid-360 packages (e.g., this), and it seems like most people use So new plan: please try the updated branch but with (Please be careful with the units of gravity. I removed the previous multiplication with gravity.) Note that I have not tested this at all, because I do not have a Livox sensor or any bags with |
Sorry for the late reply, and thank you @kennyjchen author for your efforts to solve this problem. Here is the dataset I recorded: accel in units is g;and xfer_format: 1 |
Ok, I think I got it working. Credit to this Tweet for supplying the data I played around with. Please use the newer |
|
You should modify |
Hi author, when i set |
@WeilongXia -- Your dataset works for me with deskewing. I'm using the latest
What are the errors that you're seeing? |
@@yES! DLIO is now working with deskewing!just modify |
Good to hear! |
That max comp time looks pretty awful, which can result in these sorts of behaviors if too many frames are skipped. Are extrinsics correct? |
@Joosoo1 what are the extrinsics of the dataset you provided? |
|
May I ask you guys what is the meaning of dlio/pointcloud/dekew in dlio.yaml? Does it mean that this program will do the deskewing for pointcloud, or this program will consider the input points has been deskewed so it will no do the deskewing? What will happen when dlio/pointcloud/dekew is set as false? Thank you!
|
It will undistort the point cloud when set to true. |
Thanks |
…-to-lidar updated interfaces
Hi, can you kindly let me know where to update those extrinsic values? I guess in the
|
@kennyjchen @Joosoo1 this issue has been closed, I would love to hear your advice :) thanks! |
Thanks a lot for opening source such a great work, but when I run the code, I found that the odometry output pose has always been the origin and has not changed. I have checked the data topics of lidar and imu, and there is nothing wrong. The frequency of lidar is 10Hz, and the frequency of imu is 200Hz. What are the possible reasons for the above case? Looking forward to your reply~
The text was updated successfully, but these errors were encountered: