Rosanswers logo

Hello, I started using ROS hydro (in ubuntu 12.04) very recently for a visual odometry project but I got stuck with the following problem:

I installed gscam and it runs fine (or at least I think so because I can get the raw image from the cam) but when I try to calibrate it using the camera_calibration package I get an error about the set_camera_info when trying to commit.

This are the commands I’m using (and the responses I’m getting):

ire@ubuntu:/opt/ros/hydro/share/gscam$ export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb ! ffmpegcolorspace"
ire@ubuntu:/opt/ros/hydro/share/gscam$ rosrun gscam gscam
[ INFO] [1413532922.860687013]: Using gstreamer config from env: "v4l2src device=/dev/video0 ! video/x-raw-rgb ! ffmpegcolorspace"
[ INFO] [1413532922.865519517]: using default calibration URL
[ INFO] [1413532922.865710842]: camera calibration URL: file:///home/ire/.ros/camera_info/camera.yaml
[ INFO] [1413532922.865894433]: Unable to open camera calibration file [/home/ire/.ros/camera_info/camera.yaml]
[ WARN] [1413532922.866022619]: Camera calibration file /home/ire/.ros/camera_info/camera.yaml not found.
[ INFO] [1413532922.866143973]: Loaded camera calibration from 
[ WARN] [1413532922.867056658]: No camera frame_id set, using frame "/camera_frame".
[ INFO] [1413532922.931583052]: Time offset: 1413532776.252
[ INFO] [1413532923.433639353]: Publishing stream...
[ INFO] [1413532923.440739002]: Started stream.

At this point the light on my camera turns on and if I run the rosrun image_view image_view image:=/camera/image_raw the camera works.

I checked the topics and services and this is what I got:

ire@ubuntu:~$ rostopic list
ire@ubuntu:~$ rosservice list

As you can see the /set_camera_info service is not under /camera like it’s apparently supposed to be (I’m not sure if it is, that’s just the conclusion I got to). So I run the camera calibration with the following command:

ire@ubuntu:~$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/image_raw camera:=

But after finishing and trying to commit I get this error:

 raise ServiceException("service [%s] unavailable"%self.resolved_name)
rospy.service.ServiceException: service [/camera/set_camera_info] unavailable

I’ve tried changing the parameters in the camera_calibration command, using camera_info:= instead of camera:= and so on, but I always get the same mistake when trying to commit. If I use camera:=camera or camera_info:=camera as parameters the calibration cannot start because the set_camera_info service is not under /camera. If I ignore the check with --no-service-check I still get the same mistake at the end.

I’m pretty new with ROS, so I’m sorry if the question is too silly. I really tried to find the answer myself but I don’t know what to do about the service not being under /camera like (i think) the calibration tool needs.

Is there a way to put the service under /camera? or another way to calibrate the camera without using commit? I can save the file, but is it .tar format and I have not being able to find a way to use it yet. I’m really thankful for any ideas you might have.

ps: I don’t know if it might be the cause of my problem but I’m running ubuntu in a Parallels virtual machine, sometimes it gets a bit slow but so far I haven’t run into any problems with other programs because of it.

Thanks in advance,

Originally posted by Athria on ROS Answers with karma: 78 on 2014-10-17

Post score: 2


1 Answer 1


Rosanswers logo

You can move ros resources using remapping. Both from the command line and from a launch file

Originally posted by tfoote with karma: 58457 on 2014-10-18

This answer was ACCEPTED on the original site

Post score: 1


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.