PJLab-ADG / Livox-Mapping

An all-in-one and ready-to-use LiDAR-inertial odometry system for Livox LiDAR
BSD 3-Clause "New" or "Revised" License
464 stars 106 forks source link

GPS topic #18

Closed ManChrys closed 2 years ago

ManChrys commented 2 years ago

Hello,

Livox_Mapping topics are

Livox LiDAR: /livox/lidar
IMU: /livox/imu
GPS: /localization/navstate_info

my topics are

Livox LiDAR: /livox/lidar
IMU: /imu/data (Type: sensor_msgs/Imu)
GPS: /gnss (Type: sensor_msg/NavSatFix)

i rename imu topic from /imu/data to /livox/imu using rosrun rosbag topic_renamer.py

but i cant do the same for GPS cause it has different msg type. Is there any way to run the package with my topics ? Thank you.

SiyuanHuang95 commented 2 years ago

Hi, thanks for your interest in our project.

Your write one simple python script with rosbag python package, where you load the information and rename it.

And the detailed definition of the topic could be found: https://github.com/PJLab-ADG/Livox-Mapping/blob/main/ad_localization_msgs/msg/NavStateInfo.msg

ManChrys commented 2 years ago

ok i see.

I have one more question . I run the project without GPS but i have these errors. Its something about Jacobian matrix ? So my imu measurements have errors ? Thanks again for your help and fast response.

Screenshot from 2022-09-14 11-55-51

Screenshot from 2022-09-14 12-10-21

EDIT

Can this be a reason ?

[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.[pcl::VoxelGrid::applyFilter] Leaf size is too small for the input dataset. Integer indices would overflow.W0914 12:47:20.361549 29375 residual_block.cc:131]

I found these on Estimator.cpp

downSizeFilterNonFeature.setLeafSize(0.4, 0.4, 0.4);

and MapManager.cpp should i change the size ?

downSizeFilterSurf.setLeafSize(0.4, 0.4, 0.4);

ManChrys commented 2 years ago

https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/LIO-Livox/src/lio/Estimator.cpp#L45

https://github.com/PJLab-ADG/Livox-Mapping/blob/e896e6f0a09163eb2e8f22e63fee0024df03350e/LIO-Livox/src/lio/Map_Manager.cpp#L25

SiyuanHuang95 commented 2 years ago

You can check the processed lidar point cloud (line/point features), which should not be empty for the cost function calculation.

ManChrys commented 2 years ago

i have values but some of them are 0 . Screenshot from 2022-09-14 13-47-22

Screenshot from 2022-09-14 13-47-38

SiyuanHuang95 commented 2 years ago

So place check your point cloud :)

To see whether your environment is feature-less

ManChrys commented 2 years ago

so, thats the problem probably .

ok my friend ill try to record another place thank you again for your help and for your project.

SiyuanHuang95 commented 2 years ago

Any further follow-up update is wellcome!

ManChrys commented 2 years ago

Hello my friend @SiyuanHuang95 ,

i am stuck to transform gps_msg type.

my topics are correct

topics:

         /livox/imu                    42050 msgs    : sensor_msgs/Imu           
         /livox/lidar                   2102 msgs    : livox_ros_driver/CustomMsg
         /localization/navstate_info     841 msgs    : sensor_msgs/NavSatFix

but gps msg_type is

types:

         livox_ros_driver/CustomMsg [e4d6829bdfe657cb6c21a746c86b21a6]

         sensor_msgs/Imu            [6a62c6daae103f4ff57a132d6f95cec2]

         sensor_msgs/NavSatFix      [2d3a8cd499b9b4a0249fb98fd05cfa48]

Still cant change from sensor_msgs/NavSatFix to NavStateInfo.msg so repo can use my gps data.

NavSatFix_type

Any help would be appreciated!! Thank you.

SiyuanHuang95 commented 2 years ago

Hi

The most naive and straightforward solution is:

extracting every element from NavSatFix_type in http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/NavSatFix.html

and fill the element in navestate_info -> https://github.com/PJLab-ADG/Livox-Mapping/blob/main/ad_localization_msgs/msg/NavStateInfo.msg

ManChrys commented 2 years ago

@SiyuanHuang95 Hello my friend. I tried to edit the navstate_info

NavStateInfo.txt

I did catkin_make again and i had no errors.

but i still have this message_type error

Screenshot from 2022-09-19 13-26-29

[ERROR] [1663582981.196537656]: Client [/livox_mapping] wants topic /localization/navstate_info to have datatype/md5sum [ad_localization_msgs/NavStateInfo/7779d22f3118446ca819c40a53590591], but our version has [sensor_msgs/NavSatFix/2d3a8cd499b9b4a0249fb98fd05cfa48]. Dropping connection.

SiyuanHuang95 commented 2 years ago

The error suggests that the required topic is different from the fed-in one. You should have check.

Or, you can directly modify the msg definition.

ManChrys commented 2 years ago

Hello my friend,

yeah, I know the meaning of this error, I have seen it and fix it again.

The problem now is that i don't know how can i modify my GPS data (live or post) so they can match with your topic's data.

Or, you can directly modify the msg definition.

could you explain me how can i do this ? Sorry but im newbie :P

Thanks a lot for your help my friend, i really appreciated it.

SiyuanHuang95 commented 2 years ago

Sry for late response, i am busy currently with my paper issue.

You can define the msg-type as you wish.

One example can be found here: http://wiki.ros.org/ROS/Tutorials/CreatingMsgAndSrv

SiyuanHuang95 commented 2 years ago

Since no further comments are updated, I will close this issue.