Solves bug that occurred when running 'optvi' in the maplab_console when using a calibration file with no distortion:
The nullptr which was added to cost_term_args when the distortion is of type kNoDistortion would later fail the following check, since the sizes don't match:
[problem_impl.cc:293] Check failed: parameter_blocks.size() == cost_function->parameter_block_sizes().size() (9 vs. 8)
My solution avoids adding that nullptr if there is no distortion.
Solves bug that occurred when running 'optvi' in the maplab_console when using a calibration file with no distortion:
The nullptr which was added to cost_term_args when the distortion is of type kNoDistortion would later fail the following check, since the sizes don't match: [problem_impl.cc:293] Check failed: parameter_blocks.size() == cost_function->parameter_block_sizes().size() (9 vs. 8)
My solution avoids adding that nullptr if there is no distortion.