ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

camera_calibration set_camera_info Service not found

asked 2014-12-29 05:49:21 -0600

Mesus gravatar image

updated 2021-03-27 20:48:49 -0600

jayess gravatar image

I want to calibrate a stereo camera with camera_calibration on Indigo in Ubuntu 14.04. I have two separate webcams connected and use gscam to return the video stream. However when I want to calibrate them using camera_calibration by typing:

rj@rj-K55VD:~/catkin_ws$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 --approximate=0.1 right:=/right/camera/image_raw left:=/left/camera/image_raw right_camera:=/right/camera left_camera:=/left/camera

I get the following output:

('Waiting for service', '/left/camera/set_camera_info', '...')
Service not found
('Waiting for service', '/right/camera/set_camera_info', '...')
Service not found

I guess it tries to look for camera_info which is published. Rostopic list gives the following output

rj@rj-K55VD:~/catkin_ws$ rostopic list
/left/camera/camera_info
/left/camera/image_raw
/right/camera/camera_info
/right/camera/image_raw /rosout
/rosout_agg

So I do not know what the problem is or what is missing since the cameras seems to be running fine.

Just to be complete, the xml code of one of the camera launch file is

<launch>
  <!-- This launchfile should bring up a node that broadcasts a ros image
       transport on /webcam/image_raw -->

  <arg name="DEVICEl" default="/dev/video2"/>
  <!-- The GStreamer framerate needs to be an integral fraction -->
  <arg name="FPS" default="30/1"/>
  <arg name="PUBLISH_FRAME" default="false"/>

  <node ns="left" name="gscam_driver_v4l" pkg="gscam" type="gscam" output="screen">
    <param name="camera_name" value="default"/>
    <param name="camera_info_url" value="package://gscam/examples/uncalibrated_parameters.ini"/>
    <param name="gscam_config" value="v4l2src device=$(arg DEVICEl) ! video/x-raw-rgb,framerate=$(arg FPS) ! ffmpegcolorspace"/>
    <param name="frame_id" value="/v4l_frame_l"/>
    <param name="sync_sink" value="true"/>
  </node>

  <node if="$(arg PUBLISH_FRAME)" name="v4l_transform" pkg="tf" type="static_transform_publisher" args="1 2 3 0 -3.141 0 /world /v4l_frame 10"/>
</launch>

I have an identical launch file for the right camera, only with some of the node names a bit different to avoid confusions.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2014-12-29 21:09:12 -0600

joq gravatar image

updated 2014-12-29 21:09:56 -0600

set_camera_info is a service, not a topic. Use rosservice to see it.

edit flag offensive delete link more

Comments

Thanks. I'm still quite the noob in ROS so I didn't know that. Typing rosservice showed me where set_camera_info was (it didn't have camera in its path)

So leaving out camera from the command did the trick:

Mesus gravatar image Mesus  ( 2014-12-30 07:46:54 -0600 )edit

rosrun camera_calibration cameracalibrator.py --size 9x6 --square 0.025 image:=/camera/image_raw camera:=/

Farid gravatar image Farid  ( 2016-01-04 09:05:42 -0600 )edit
3

answered 2016-07-26 05:43:21 -0600

Sumit Dey gravatar image

1. Use --no-service-check to run calibration

$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 --no-service-check --approximate=0.1 right:=/right/camera/image_raw left:=/left/camera/image_raw right_camera:=/right/camera left_camera:=/left/camera

2. ('Waiting for service', '/left/camera/set_camera_info', '...') Service not found

Since it is a service, it cannot be found in topic list. You can find the services provided by a node under its info.
$ rosnode info /left/camera

edit flag offensive delete link more
2

answered 2021-03-26 16:06:48 -0600

mirella melo gravatar image

For melodic, I simply removed anything related to the camera info file in the command line.

rosrun camera_calibration cameracalibrator.py --approximate 0.1 --size 8x6 --square 0.108 right:=/my_stereo/right/image_raw left:=/my_stereo/left/image_raw
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-12-29 05:49:21 -0600

Seen: 12,559 times

Last updated: Mar 27 '21