Skip to content
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

GPS trajectory and SLAM trajectory seem to have different orientations #13

Open
SunZezhou opened this issue Oct 14, 2021 · 8 comments
Open

Comments

@SunZezhou
Copy link

Hello,

I tried to add GPS topic to SC-LIO-SAM, but the GPS trajectory and SLAM trajectory seem to have different orientations.

Before I ran run_mulran.launch, the things I changed were:

  1. Change the imu topic in line 125 of params_mulran.yaml to: imu0: /imu/data_raw
  2. Remap the imu topic in line 15 of module_navsat_mulran.launch to: <remap from="imu/data" to="imu/data_raw" />
  3. Change the frame_id of the GPS topic in the MulRan dataset to: navsat_link

Here are the results of the KAIST01 sequence in the MulRan dataset:
Screenshot 2021-10-13 22:40:15
Screenshot 2021-10-13 23:03:08

Since this angle is not 90 degrees, it does not seem to be a problem caused by the ENU coordinate system (As far as the information I refer to, Xsens yaw output is defined as the angle between East (X) and the horizontal projection of the sensor roll axis ).

I also tried to modify the tf between imu_link/navsat_link and base_link in the robot.urdf.xacro file according to the suggestions in the params_mulran.yaml file, but it does not seem to affect the results.

Am I missing any steps?

Thanks,
Zezhou Sun

@zxjhit
Copy link

zxjhit commented Jun 2, 2022

Hello,

I tried to add GPS topic to SC-LIO-SAM, but the GPS trajectory and SLAM trajectory seem to have different orientations.

Before I ran run_mulran.launch, the things I changed were:

  1. Change the imu topic in line 125 of params_mulran.yaml to: imu0: /imu/data_raw
  2. Remap the imu topic in line 15 of module_navsat_mulran.launch to: <remap from="imu/data" to="imu/data_raw" />
  3. Change the frame_id of the GPS topic in the MulRan dataset to: navsat_link

Here are the results of the KAIST01 sequence in the MulRan dataset: Screenshot 2021-10-13 22:40:15 Screenshot 2021-10-13 23:03:08

Since this angle is not 90 degrees, it does not seem to be a problem caused by the ENU coordinate system (As far as the information I refer to, Xsens yaw output is defined as the angle between East (X) and the horizontal projection of the sensor roll axis ).

I also tried to modify the tf between imu_link/navsat_link and base_link in the robot.urdf.xacro file according to the suggestions in the params_mulran.yaml file, but it does not seem to affect the results.

Am I missing any steps?

Thanks, Zezhou Sun

Hello, Mr. Sun.Can you tell me how to use gps data in mulran Dataset?I saw gps.csv and global pose.csv in MulRan Dataset.But I can't recognise what the number mean in the csv file?Is there any introduction about the use of gps file?As I want to use gps data as groundtruth to evalutate my slam algorithm.你好,尊敬的孙同学,我想请问一下您是怎么使用mulran数据集的gps数据的,我看到了数据集里的gps.csv和global_pose.csv,但不知道每个数字代表的意思,您能告诉我您是怎么使用数据集里的gps数据么,如能回复,不胜感激。

@SunZezhou
Copy link
Author

Hello @zxjhit,

  1. Can you tell me how to use gps data in MulRan Dataset?

Sure, I assume you can run the ROS player for MulRan Datasets.
You can subscribe the /gps/fix topic just like you do in other Datasets.

  1. I saw gps.csv and global pose.csv in MulRan Dataset.But I can't recognise what the number mean in the csv file?

The data in gps.csv is organized in the same form as sensor_msgs/NavSatFix.msg, which is (1) timestamp, (2) latitude, (3) longitude, (4) altitude, (5-13) position_covariance.
I haven't used globa_pose.csv, but I guss it's similar to gps.csv, just replace (2-4) with xyz.

  1. Is there any introduction about the use of gps file?

For visualization, as far as I know there are three popular ways: (1) [ROS_leaflet_gps] (I used above), (2) Mapvis (I am now using), (3) rviz_satellite.

For comparison, evo seems to be the most popular one.

For a deeper understanding, you may need to learn about the conversion between LLA, ECEF, and ENU.
I personally recommend you to read simpleGpsOdom.cpp in LIO_SAM_6AXIS, which has inspired me a lot.

I hope the above can help you~

Best regards,
Zezhou Sun

@zxjhit
Copy link

zxjhit commented Jun 3, 2022

Hello @zxjhit,

  1. Can you tell me how to use gps data in MulRan Dataset?

Sure, I assume you can run the ROS player for MulRan Datasets. You can subscribe the /gps/fix topic just like you do in other Datasets.

  1. I saw gps.csv and global pose.csv in MulRan Dataset.But I can't recognise what the number mean in the csv file?

The data in gps.csv is organized in the same form as sensor_msgs/NavSatFix.msg, which is (1) timestamp, (2) latitude, (3) longitude, (4) altitude, (5-13) position_covariance. I haven't used globa_pose.csv, but I guss it's similar to gps.csv, just replace (2-4) with xyz.

  1. Is there any introduction about the use of gps file?

For visualization, as far as I know there are three popular ways: (1) [ROS_leaflet_gps] (I used above), (2) Mapvis (I am now using), (3) rviz_satellite.

For comparison, evo seems to be the most popular one.

For a deeper understanding, you may need to learn about the conversion between LLA, ECEF, and ENU. I personally recommend you to read simpleGpsOdom.cpp in LIO_SAM_6AXIS, which has inspired me a lot.

I hope the above can help you~

Best regards, Zezhou Sun

Hello @SunZezhou ,
Thank you for replying patiently very much.And thank you again.Your reply helped me a lot.And I have kown why I dont konw how to use the gps data.That's because the ROS player for MulRan Datasets which I downloaed is an older version,it doesn't support to play gps data.That's why I was confused.And now I have updated the version of the player,and it works and plays gps sucessfully.And thank you again for your help.
However,after reading gps data successfully,I plotted GPS data and slam output trajectory with evo,and I got the same problem as yours.And the result is here:
comparison_with_gps
i.e.the GPS trajectory and SLAM trajectory seem to have different orientations. I guess that the problem is caused by the uncorrect IMU orientation estimate at the first running time of SLAM.But I don't know how to solve this problem up till now.I guess fuse the gps data into SLAM algorithm(LIO-SAM) is a good way.Can you tell me how did you solve this problem at last?I appreciate your reply.

@SunZezhou
Copy link
Author

Hello @zxjhit,
I have not solved this problem so far, so I do not add magnetometer information.
I am using this modified version: LIO_SAM_6AXIS.

@learnhard22
Copy link

learnhard22 commented Aug 10, 2022

Hello @SunZezhou @zxjhit,
I am facing the same problem as you guys. Did anybody solved this problem without using the modified version LIO_SAM_6AXIS?

Best regards,
Lennard

@learnhard22
Copy link

Hi @SunZezhou @zxjhit ,

I solved this problem by changing the gps topic in the yaml file to "odometry/navsat". After that the orientation of the gps and the slam are the same. By setting down the value at poseCovThreshold you can achieve an even better gps reference of the base_link frame. This worked for me at the end and hopefully for you as well.

@isqjsnao
Copy link

isqjsnao commented Mar 7, 2024

Hello,

I tried to add GPS topic to SC-LIO-SAM, but the GPS trajectory and SLAM trajectory seem to have different orientations.

Before I ran run_mulran.launch, the things I changed were:

1. Change the imu topic in line 125 of params_mulran.yaml to: `imu0: /imu/data_raw`

2. Remap the imu topic in line 15 of module_navsat_mulran.launch to: `<remap from="imu/data" to="imu/data_raw" />`

3. Change the frame_id of the GPS topic in the MulRan dataset to: `navsat_link`

Here are the results of the KAIST01 sequence in the MulRan dataset: Screenshot 2021-10-13 22:40:15 Screenshot 2021-10-13 23:03:08

Since this angle is not 90 degrees, it does not seem to be a problem caused by the ENU coordinate system (As far as the information I refer to, Xsens yaw output is defined as the angle between East (X) and the horizontal projection of the sensor roll axis ).

I also tried to modify the tf between imu_link/navsat_link and base_link in the robot.urdf.xacro file according to the suggestions in the params_mulran.yaml file, but it does not seem to affect the results.

Am I missing any steps?

Thanks, Zezhou Sun

您好,请问您是如何把轨迹映射在卫星地图上的呀

@SunZZ528
Copy link

SunZZ528 commented Mar 8, 2024

Hi @isqjsnao,

I used leaflet in the picture.
Now, I use mapviz more often.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants