koide3 / direct_visual_lidar_calibration

A toolbox for target-less LiDAR-camera calibration [ROS1/ROS2]
https://koide3.github.io/direct_visual_lidar_calibration/
764 stars 119 forks source link

How to specify camera parameters for preprocessing #25

Closed 774880930 closed 1 year ago

774880930 commented 1 year ago

Before opening an issue

If the issue is about calibration procedure and results:

Describe the bug I used ROS1. When I was preprocessing, I saw the notes you provided and needed to specify the parameters of the camera in advance, but when I tried to specify the parameters, I got the following results

IMG_20230704_193631 IMG_20230704_193640 IMG_20230704_193730

What command should I type to do it?

Environment:

koide3 commented 1 year ago

You need to specify the camera distortion params in addition to the intrinsic params as follows:

 rosrun direct_visual_lidar_calibration preprocess -av \
  --camera_model plumb_bob \
  --camera_intrinsic 1452.711762456289,1455.877531619469,1265.25895179213,1045.818593664107 \
  --camera_distortion_coeffs -0.04203564850455424,0.0873170980751213,0.002386381727224478,0.005629700706305988,-0.04251149335870252 \
  /tmp/input_bags /tmp/preprocessed
774880930 commented 1 year ago

Thank you so much! I copied the whole thing in and it worked, but I copied it line by line and it didn't work.

Thanks again!

koide3 commented 1 year ago

Possibly, you forgot the backslash at the end of each line?

774880930 commented 1 year ago

I've tried that,but it doen't work IMG_20230705_131643 IMG_20230705_131531

774880930 commented 1 year ago

Oh, Yes, I forgot "/" at the end of each line,I thought it meant "or",this is really my misunderstanding!! Thanks a lot!!!

774880930 commented 1 year ago

One more question, if I want to calibrate a line laser and camera, and the line laser changes different positions through the galvanometer, can this package be applied?

koide3 commented 1 year ago

If you mean a 2D line laser, this package cannot be applied to it. It requires a 3D range sensor.

Chatoyant19 commented 9 months ago

You need to specify the camera distortion params in addition to the intrinsic params as follows:

 rosrun direct_visual_lidar_calibration preprocess -av \
  --camera_model plumb_bob \
  --camera_intrinsic 1452.711762456289,1455.877531619469,1265.25895179213,1045.818593664107 \
  --camera_distortion_coeffs -0.04203564850455424,0.0873170980751213,0.002386381727224478,0.005629700706305988,-0.04251149335870252 \
  /tmp/input_bags /tmp/preprocessed

For the two sets of data you provided, livox and ouster, how do I get their camera intrinsics and _distortion_coeffs. I can't seem to parse this information from '/camera_info', because the version of the topic does not match.

G4419 commented 8 months ago

@Chatoyant19 you can use plotjuggler to see the data.