velodyne
velodyne copied to clipboard
maybe there is a small bug in velodyne_pointcloud/scripts/gen_calibration.py
if I use a db.XML which defines No.0 and No.3 laser's minIntensity are '1' instead of '0'. I got an incorrect yaml file:
lasers:
- {dist_correction: 0.0, dist_correction_x: 0.0, dist_correction_y: 0.0, focal_distance: 0.0, focal_slope: 0.0, horiz_offset_correction: 0.0, laser_id: 0, min_intensity: 1, rot_correction: 0.0, vert_correction: -0.5352924815866609, vert_offset_correction: 0.0}
- {dist_correction: 0.0, dist_correction_x: 0.0, dist_correction_y: 0.0, focal_distance: 0.0, focal_slope: 0.0, horiz_offset_correction: 0.0, laser_id: 1, min_intensity: 1, rot_correction: 0.0, vert_correction: -0.1628392174657417, vert_offset_correction: 0.0}
I found the function in gen_calibration.py is not very well: def addLaserCalibration(laser_num, key, val): 'Define key and corresponding value for laser_num' global calibration if laser_num < len(calibration['lasers']): calibration['lasers'][laser_num][key] = val else: calibration['lasers'].append({key: val})
it may cause such problem.
Thanks for the report. I agree that addLaserCalibration()
is broken. It was probably never tested without data for all the lasers.
I believe this is a duplicate of #79.