Camera Calibration on ROS noetic - Calibration display with video is flickering

asked 2020-08-20 07:07:01 -0500

Porty1811 gravatar image

updated 2020-08-21 09:02:36 -0500


I am currently using Ubuntu Linux 20.04 Host version on the virtual box and am currently stuck at the final step of calibrating my two seperate cameras (Logitech B910 HD) as a stereocamera setup with the ROS Noetic distribution.

Once Ros has been installed, I created a catkin workspace in the terminal and installed the image_pipeline package with the following commands:

Next up, I'm setting up everything for the camera_calibration package and my cameras to be available in the terminal under the catkin workspace, like so:

  • sudo apt install python3-rosdep2 -y
  • rosdep install camera_calibration -y
  • rosmake camera_calibration
  • sudo apt install ros-noetic-usb-cam -y

In a new terminal with the same workspace directory I open my launch file for the cameras to be available (Launch file should be visible at the bottom of this post):

  • roslaunch src/image_pipeline/camera_calibration/src/launch/stereo_usb_cam.launch

For the calibration window to start I firstly need to setup a rosbash and then the rosrun comman in the first terminal:

  • sudo apt install ros-noetic-rosbash
  • rosrun camera_calibration --pattern chessboard --size 12x8 --square 0.03 right:=/stereo/right/image_raw left:=/stereo/left/image_raw right_camera:=/stereo/right left_camera:=/stereo/left --no-service-check --approximate=0.1

I can see that my cameras are active and the Display window for the camera calibration starts but I get this flickering video image. I believe it has something to do with the framerate or driver connectivity, however, I searched through the web like crazy and cross-referenced lots and still have not found a single thing. Hopefully someone can help me out here.




<arg name="video_device_right" default="/dev/video0" />
<arg name="video_device_left" default="/dev/video2" />
<arg name="image_width" default="640" />
<arg name="image_height" default="480" />
<arg name="right_image_namespace" default="stereo" />
<arg name="left_image_namespace" default="stereo" />
<arg name="right_image_node" default="right" />
<arg name="left_image_node" default="left" />
<arg name="image_topic_name_right" default="image_raw" />
<arg name="camera_info_topic_name_right" default="camera_info" />
<arg name="image_topic_name_left" default="image_raw" />
<arg name="camera_info_topic_name_left" default="camera_info" />
<arg name="left_camera_name" default="left" />
<arg name="right_camera_name" default="right" />
<arg name="left_camera_frame_id" default="left_camera" />
<arg name="right_camera_frame_id" default="right_camera" />
<arg name="framerate" default="30" />
<arg name="camera_info" default="false" />
<arg name="camera_info_path" default="stereo_camera_info" />

<node ns="$(arg right_image_namespace)" name="$(arg right_image_node)" pkg="usb_cam" type="usb_cam_node" output="screen" >
    <param name="video_device" value="$(arg video_device_right)" />
    <param name="image_width" value="$(arg image_width)" />
    <param name="image_height" value="$(arg image_height)"/>
    <param name="pixel_format" value="yuyv" />
    <param name="io_method" value="mmap"/>
    <remap from="/usb_cam/image_raw" to="$(arg image_topic_name_right)" />
    <param name="framerate" value="$(arg framerate)"/> 
    <!-- if camera_info is available, we will use it-->
    <param name="camera_frame_id" value="$(arg right_camera_frame_id)" if="$(arg camera_info)" /> 
    <param name="camera_info_url" value="file://${ROS_HOME}/$(arg camera_info_path)/right ...
edit retag flag offensive close merge delete



sudo apt install python3-rosdep2 -y

Side note. Uninstall python3-rosdep2; it can lead to conflicts with ROS Noetic. Install python3-rosdepinstead. See

I don't have any knowledge that help with the rest of the question :(

sloretz gravatar image sloretz  ( 2020-08-20 16:37:09 -0500 )edit

Thank you for the little hint. Yesterday I continued trying out the simpler version (monoluar camera calibration) and it worked fine even with the python3-rosdep2. However, today I went down your pathway as well as edited my launch file for the stereo camera calibration based on the monocular launch file I had which worked. And "voilĂ ", it works just beautifully! Thanks again. So relieved I can continue with my next step of the project...

Porty1811 gravatar image Porty1811  ( 2020-08-21 09:01:40 -0500 )edit