heethesh / lidar_camera_calibration

Light-weight camera LiDAR calibration package for ROS using OpenCV and PCL (PnP + LM optimization)
BSD 3-Clause "New" or "Revised" License
528 stars 117 forks source link

Calibration issue #53

Open reddittoob opened 1 year ago

reddittoob commented 1 year ago

Hello, I tried to run your excellent works.

I ran rosrun lidar_camera_calibration calibrate_camera_lidar.py --calibrate and pick points for extrinsic parameter.

However, after picked points, I cannot obtain data like Euler angles, Rotation Matrix, Translation Offsets and the GUIs show again and I have to pick up points.

And, I got an error like below.

rmse = np.sqrt(np.mean(error[:, 0] 2 + error[:, 1] 2)) *** IndexError: index 1 is out of bounds for axis 1 with size 1

I don't know what I did wrong.

Can you help me?

Thank you.

ppwwwww commented 1 year ago

<340 line & 358 line >

error = np.reshape(error, (-1, 2)) # <-- add !!!!!!!!! rmse = np.sqrt(np.mean(error[:, 0] 2 + error[:, 1] 2))