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

rosbag example? #1

Open
gc625-kodifly opened this issue Dec 11, 2023 · 19 comments
Open

rosbag example? #1

gc625-kodifly opened this issue Dec 11, 2023 · 19 comments

Comments

@gc625-kodifly
Copy link

Hi, many thanks for this awesome repo. I was wondering whether you can provide a rosbag for an example to run the repo? Additionally any plans for supporting ouster lidar, or what is needed to add ouster support?

@YWL0720
Copy link
Owner

YWL0720 commented Dec 11, 2023

I have submitted a new launch file on the master branch to support the Ouster lidar. Also, you can use the repository at https://github.com/YWL0720/FAST_LIO. This repository has added interfaces for saving maps and pose files. It can save point clouds and poses in the map folder. Just copy the saved maps and poses to the working directory of fast_localization for use. Currently, the bag file I use for testing is quite large and uploading it is somewhat troublesome. I will update with a smaller bag file later for testing purposes.

@gc625-kodifly
Copy link
Author

thanks for the quick reply. I have a question though, I have a map of an area that was generated by another method (we can assume it is GT), and a rosbag of my own ouster lidar scans going through that same area. Are you suggesting that when generating the map used in the localization process, we must first acquire a set of pose files for that map? If so, does that mean I cannot use this repo for localization on my GT map?

@YWL0720
Copy link
Owner

YWL0720 commented Dec 13, 2023

In FAST-LOCALIZATION, the prior map is composed of a set of point cloud frames combined through their corresponding poses. When initializing and loading the map, ScanContext is used to compute the descriptors for each point cloud frame. During localization initialization, descriptors for the initial point cloud are also computed and matched with the global map to complete the initialization of global localization. If the prior map does not meet the aforementioned conditions, the automatic initialization function of FAST-LOCALIZATION will not work properly.

@giangdao1402
Copy link

Hey i use your version of fast_lio, i also set bool save to true but when i run fast_lio i have no pcd and pose.json files

@YWL0720
Copy link
Owner

YWL0720 commented Dec 13, 2023

The pcd and pose.json files will be saved in YOUR_WORKSPACE/src/FAST_LIO/map/

@giangdao1402
Copy link

Yeah i know but nothing...
Uploading Screenshot from 2023-12-13 18-16-35.png…

@YWL0720
Copy link
Owner

YWL0720 commented Dec 13, 2023

That's my carelessness, you also need to add "save_pcd: true" in the yaml file which you use, just like https://github.com/YWL0720/FAST_LIO/blob/704b1d2305300189fe043081254a916cfa2bdd62/config/mid360.yaml#L25

@giangdao1402
Copy link

giangdao1402 commented Dec 13, 2023

terminate called after throwing an instance of 'pcl::IOException'
what(): : [pcl::PCDWriter::writeASCII] Number of points different than width * height!
hey what is this error, can you give me some advise ?
I use Ouster lidar

@YWL0720
Copy link
Owner

YWL0720 commented Dec 13, 2023

Which type of Lidar are you using?

@giangdao1402
Copy link

I am using Ouster

@YWL0720
Copy link
Owner

YWL0720 commented Dec 13, 2023

@YWL0720
Copy link
Owner

YWL0720 commented Dec 13, 2023

I have submitted the new code.
If you could provide a dataset from an Ouster LiDAR for testing, I would be very grateful, as I currently do not have any data related to this kind of LiDAR.

@giangdao1402
Copy link

Hey i just tried but still the error.
This is the link related to Ouster dateset:
https://nghiensetups-my.sharepoint.com/:u:/g/personal/truonggiangds14_nghiensetups_net/EcFY0RzcDw9Bg1ZG0x65lpoBGwXk-NEe4EEYf4hG9r2ORw?e=gN0aTW

@YWL0720
Copy link
Owner

YWL0720 commented Dec 19, 2023

Hey i just tried but still the error. This is the link related to Ouster dateset: https://nghiensetups-my.sharepoint.com/:u:/g/personal/truonggiangds14_nghiensetups_net/EcFY0RzcDw9Bg1ZG0x65lpoBGwXk-NEe4EEYf4hG9r2ORw?e=gN0aTW

Because I have been busy with other things in the past few days, I apologize for the late reply. Thank you for providing the dataset. I have submitted the latest code, and have successfully tested the map saving and relocalization functions on my local machine. However, given the unique nature of ScanContext, it is more suitable for use on mobile robots or devices where the LiDAR is mounted horizontally. I noticed that the LiDAR in your dataset is not placed horizontally, which may negatively affect the relocalization results.

@giangdao1402
Copy link

@YWL0720
Thank you for upload the new codes.
I just want to ask how can you think to fix that bug
I tryna learn

@YWL0720
Copy link
Owner

YWL0720 commented Dec 20, 2023

@YWL0720 Thank you for upload the new codes. I just want to ask how can you think to fix that bug I tryna learn

The error ”pcl::IOException: [pcl::PCDWriter::writeASCII] Number of points different than width * height!“ arises because, during the conversion of the point cloud from ROS's sensor_msgs/PointCloud2 format to pcl format, the 'width' and 'height' attributes are not assigned. This prevents the use of pcl's point cloud saving interface. To resolve this, simply manually assign values to these two attributes based on the number of points in the point cloud before saving it.

@giangdao1402
Copy link

Hey can i load map of 1st bag then i play 2nd bag(both recorded in the same place)
Can we localize in this situation ?

@YWL0720
Copy link
Owner

YWL0720 commented Dec 20, 2023

of course you can.

@giangdao1402
Copy link

I have 2 rosbags record the same place, but the odometry is parallel and the distance between 2 odometry is about 5 to 10m.
I use ouster lidar. Can i record map of bag 1 and then play bag 2 to localization ?

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

3 participants