# Calibrating Logitic C920 HD 1080p using ros kinetic

I am trying to follow the ROS monocular camera calibration for a USB camera I have, but the calibration routine fails when I try to run it. I was expecting to see an image like the one below, but I get a segmentation fault instead.

These are the commands I used to try to start the calibration routine:

mona@Mona:~$roscore mona@Mona:~/catkin_ws/src/usb_cam$  rosrun usb_cam usb_cam_node
mona@Mona:~/catkin_ws/src/usb_cam$rosrun rviz rviz mona@Mona:~/catkin_ws/src/usb_cam$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/image_raw camera:=/camera


But this is the output I get:

('Waiting for service', '/camera/set_camera_info', '...')
Segmentation fault (core dumped)


What am I missing? How should I get it to work? When I list the ROS topics, I get:

$rostopic list /rosout /rosout_agg /usb_cam/camera_info /usb_cam/image_raw /usb_cam/image_raw/compressed /usb_cam/image_raw/compressed/parameter_descriptions /usb_cam/image_raw/compressed/parameter_updates /usb_cam/image_raw/compressedDepth /usb_cam/image_raw/compressedDepth/parameter_descriptions /usb_cam/image_raw/compressedDepth/parameter_updates /usb_cam/image_raw/theora /usb_cam/image_raw/theora/parameter_descriptions /usb_cam/image_raw/theora/parameter_updates  • Just for your information, holding the calibration target like that is not a good idea. It will introduce unnecessary errors in your calibration result. Aug 5 '18 at 4:30 ## 1 Answer Based on rostopic list I realized the correct name of camera: /usb_cam instead of /camera so the command changed to $ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/usb_cam/image_raw camera:=/usb_cam
('Waiting for service', '/usb_cam/set_camera_info', '...')
OK


Using the /usb_cam name, I was able to connect to the camera and get video:

You might notice that CALIBRATE button is grayed out so you would need to move in various direction (back and forth/right and left) so it becomes green. Eventually you will see the following (pretty much like calibrating a parrot drone):

Now go ahead and press the calibrate button and you are good to go.

For example, I am interested in the fx, fy, cx, cy that are presented in camera matrix. There are output on screen after you click on CALIBRATE button:

• I edited both your question and answer for clarity. Thanks for the feedback, and I'm happy you solved your problem! Please do try to remember to come back and accept the answer. It's a good question, good answer, so I upvoted both! Congrats again on solving the problem :) Aug 2 '18 at 18:47