Aruco with Logitech C922
Logitech C922
- 1080p @ 30 fps
- 720p @ 60 fps
- 3 Mpx
- diagonal field of view 78°
- autofocus
usb_cam driver
First, a camera driver needs to be installed - wiki
Check for camera device (ls /dev, look for new videoX) and run the driver (/dev/video3 replace with the correct device):
rosrun usb_cam usb_cam_node _camera_name:='usb_cam' _camera_frame_id:='usb_cam' _video_device:='/dev/video3' _image_width:=1920 _image_height:=1080
You can check the video stream in RViz (Add > By topic > /usb_cam/image_raw/image).
Calibration
With this procedure, the camera's intrinsic parameters are obtained.
Install camera_calibration package - wiki
Run calibration node
rosrun camera_calibration cameracalibrator.py --size 11x15 --square 0.015 image:=/usb_cam/image_raw camera:=/usb_cam
Aruco markers
Aruco markers are used to determine the pose of an object equipped with proper markers.
For this fiducials and aruco_detect packages are used.
Install packages:
Generate markers (14 cm side; for anything else, tune the .py file):
Use the aruco_detect package to detect aruco markers. Set the correct parameters for the camera.
fiducial_len to the size of markers used.
Pose of the marker is returned in the /fiducial_transforms topic. Markers can also be seen with