Closed oenzan closed 1 year ago
Because all professional lidars do produce constant amount of data in each rotation and this work predates those cheapo YD/RP lidar's existence. We also need to raycast out the beams of each laser scan measurement so we need to have a regular spacing and starting angle to store just the measurements and produce an occupancy grid super fast and accurately. That could be updated to store the actual angle with each measurement for use, but that would be pretty invasive and not straight forward -- and assumes that the angles provided by the drivers are accurate (which I can say from experience looking at the drivers: they're not).
We use YDLIDARS2PRO and it's driver cannot produce constant laser range due to Lidar cannot rotate at same frequency. Expected and supplied laser ranges can have too much difference sometimes. When i look at the code
Mapper::Process(LocalizedRangeScan * pScan)
return false because ofLaserRangeFinder::Validate(SensorData * pSensorData)
that function , Why you expect constant size of ranges array ?