April Tags Activity
Camera Calibration
# Start the camera node (exact command depends on your hardware) ros2 run usb_cam usb_cam_node_exe --ros-args -p framerate:=30.0 # Run the camera calibration ros2 run camera_calibration cameracalibrator --size 8x6 --square 0.108 --ros-args -r image:=/image_raw # Do the calibration, it gets saved to /tmp/calibrationdata.tar.gz # Extract the calibration data cd /tmp mkdir calib mv /tmp/calibrationdata.tar.gz /tmp/calib cd /tmp/calib tar xf calibrationdata.tar.gz # Kill the usb_cam node and restart, this time loading the calibration ros2 run usb_cam usb_cam_node_exe --ros-args -p framerate:=30.0 -p camera_info_url:=file:///tmp/calib/ost.yaml # Start the image proc pipeline ros2 launch image_proc image_proc.launch.py # Note that this is made up of components ros2 component list # compare the rectified and non-rectified image ros2 run rqt_image_view rqt_image_view
Rviz
- Run
rviz2
- Add the rectified image and a
tf
tree - Put tag in the frame, then change fixed frame to default cam
- You can now add a Camera rather than an image
- Have fun!