Hi,
if I got your question correctly then I can tell you what I usually do for calibrating a camera:
- You can use kalibr to obtain a yaml file containing the calibration of your camera. See its readme page and the wiki. It's better if you use an aprilgrid if you have one, instead of the check-board.
- You can use the yaml file obtained from kalibr with one node of the repo image_undistort. For example, in case of just one camera you can use image_undistort_node to rectify images and publish the camera_info topic. Have a look at the readme file. Moreover in the 'launch' folder you can fine some examples.
I hope this helps.
Regards,
Marco.