In the yaml file, change "image_width", "image_height", "video_device" and "camera_name" to fit your camera. Also change "camera_info_url" to point to the "camera_info.yaml" file that you are using. If the file is stored in your file system, remember to use "file://" at the beginning of the path.
Example:
After pressing "Save" dusring calibration, the calibration data is saved under /tmp/calibrationdata.tar.gz”.
Unzip this folder and open it. there should be a ".yaml" file there contining calibration information. Copy the calibration contents of the ".yaml" file into your own camera_info.yaml" file and the calibration is done!
PS: I DID NOT COPY THE CAMERA NAME. ONLY THE DATA FROM THE MATRICES
Calibrate camera on xavier2 using ros2 foxy:
1. Install usb_cam ros package
2. Install camera calibration
this installs several packages including camera calibration
3. Set up parameter file:
Copy "params.yaml" and "camera_info.yaml" from the ros2 usb_cam repo: https://github.com/ros-drivers/usb_cam/tree/ros2/config
In the yaml file, change "image_width", "image_height", "video_device" and "camera_name" to fit your camera. Also change "camera_info_url" to point to the "camera_info.yaml" file that you are using. If the file is stored in your file system, remember to use "file://" at the beginning of the path. Example:
4. Launch camera using ros wrapper
Run camera in ros with the ros package usb_cam. Remember to add your own parameter file path after "--params-file"
The camera feed can be checked in rviz2 by adding the /image_raw topic,
5. Run the camera calibration ros node
Run the camera calibration node using the following command:
This tutorial takes you through the calibration: https://navigation.ros.org/tutorials/docs/camera_calibration.html
6. Copy Results into camera_info.yaml file
After pressing "Save" dusring calibration, the calibration data is saved under /tmp/calibrationdata.tar.gz”. Unzip this folder and open it. there should be a ".yaml" file there contining calibration information. Copy the calibration contents of the ".yaml" file into your own camera_info.yaml" file and the calibration is done! PS: I DID NOT COPY THE CAMERA NAME. ONLY THE DATA FROM THE MATRICES