ethz-asl / COIN-LIO

🪙 COIN-LIO: Complementary Intensity-Augmented LiDAR Inertial Odometry (ICRA 2024)
Other
275 stars 27 forks source link

Problem when running calibrate.launch #1

Closed Yiiboo-w closed 5 months ago

Yiiboo-w commented 5 months ago

Thanks for this great work in the SLAM LIO research field!

Today I would like to run COIN-LIO with my Ouster 32 data. And when I run the calibrate.launch, I meet the problem that the procedure stops at the place illustrated in the figure. I think it might be the shared_ptr problem, could you help solve this issue? calibration

patripfr commented 5 months ago

Hi! Could you specify a bit more what happens exactly? Does the code crash or does nothing happen at all? A screenshot of the command that you execute and the terminal output would be helpful to investigate :) FYI: I haven't tested with 32 beam lidars so far, and I'm not sure if the photometric part will work well given the low resolution image.

RuanJY commented 5 months ago

I also tested my bag with an Ouster OS1-32 Lidar.

I modified the params.yaml file:

scan_line: 32

and use this command:

roslaunch coin_lio mapping.launch bag_file:=my.bag metadata_file:=/root/data/metadata.json point_topic:=/ouster/points imu_topic:=/ouster/imu column_shift:=-0

I used the metadata of Ouster OS1-32 Lidar and conducted the calibration process.

and I got the error:

[ INFO] [1714228008.902486066]: IMU Initial Done
[ WARN] [1714228008.903411994]: No point, skip this scan!

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.2.0) ../modules/core/src/matrix.cpp:465: error: (-215:Assertion failed) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function 'Mat'

[laserMapping-1] process has died 

I echo the width and height of the ouster point cloud; they are 1024 and 32.

I run the code in your docker image to run your bag correctly. The results are really nice.

Is there some hard-coded height of the image? Thank you.

patripfr commented 5 months ago

Hi @RuanJY, The image height is not hard coded. I think the issue appears because the default parameters were designed for a 128 beam lidar and the mask is larger than 32 rows. We use this mask to block out the area that is covered by the ouster connector and cable (visible for os0). I think you can simply remove this line for a 32 beam os1 or set it to [].

I'm also not sure how the line removal filter will work for a 32 beam lidar, as it is a 2D filter with more than 32 entries. Alternatively you can deactivate it by setting this parameter to false in the launch file.

Cheers, Patrick

RuanJY commented 5 months ago

Thanks for your kind help and fast response;

now I can run it with OS1-32 after change the mask

Yiiboo-w commented 5 months ago

Hi! Could you specify a bit more what happens exactly? Does the code crash or does nothing happen at all? A screenshot of the command that you execute and the terminal output would be helpful to investigate :) FYI: I haven't tested with 32 beam lidars so far, and I'm not sure if the photometric part will work well given the low resolution image.

Sorry, I forgot to add the metadata_file in my command. It works normally now after correcting this mistake. Thx for your kind help and quick response!

patripfr commented 5 months ago

@RuanJY I realized that you should also change the margin parameter. Features that are closer than the margin size to the image boarder are rejected, so if the default value of 10 is used for a 32 beam lidar only 12 beams remain in the allowed range. Therefore, a smaller value like 3 or 4 would probably make more sense.

AFEICHINA commented 5 months ago

Hello, @ybwang99 and @RuanJY. I currently do not have an Ouster LiDAR unit. However, I am very interested in the mapping results produced by the Ouster 32-wire LiDAR. Would it be possible for you to share some of the mapping results you've obtained with the Ouster 32-wire LiDAR?

satyajitghana commented 5 months ago

I have a OS0-16 line lidar, would COIN-LIO work?

RuanJY commented 5 months ago

Hello, @ybwang99 and @RuanJY. I currently do not have an Ouster LiDAR unit. However, I am very interested in the mapping results produced by the Ouster 32-wire LiDAR. Would it be possible for you to share some of the mapping results you've obtained with the Ouster 32-wire LiDAR?

Here is a map built by coin-lio using os1-32 lidar.

image

RuanJY commented 5 months ago

@RuanJY I realized that you should also change the margin parameter. Features that are closer than the margin size to the image boarder are rejected, so if the default value of 10 is used for a 32 beam lidar only 12 beams remain in the allowed range. Therefore, a smaller value like 3 or 4 would probably make more sense.

Great. The number of features increased after doing so. image