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

Monocular camera calibration

asked 2013-01-20 18:41:13 -0500

updated 2014-01-28 17:14:55 -0500

ngrennan gravatar image

Hi guys,

I have followed the monocular calibration tutorial and have calibrated my Firefly_mv (which uses the DC1394 drivers)image. The calibrations seems to be successful since the /camera/camera_info is publishing the correct information:

header: 
seq: 152254
stamp: 
secs: 8
nsecs: 21200000
frame_id: /camera
height: 480
width: 640
distortion_model: plumb_bob
D: [-0.4055357733215121, 0.2322957248510526, -0.000988042635329932,                   0.00818916859481644, 0.0]
K: [701.8606085716559, 0.0, 317.3954985453047, 0.0, 704.0761053327817,      233.51394559637478, 0.0, 0.0, 1.0]
R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
P: [639.8907470703125, 0.0, 321.50737796160684, 0.0, 0.0, 668.643798828125, 232.067902760391, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi: 
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False
---

However, when I type rostopic echo /image_rect , nothing seems to be published. Where can I find the rectified/calibrated image?

edit: $ rostopic list:

/camera/camera_info
/camera/image_color
/camera/image_color/compressed
/camera/image_color/compressed/parameter_descriptions
/camera/image_color/compressed/parameter_updates
/camera/image_color/compressedDepth
/camera/image_color/compressedDepth/parameter_descriptions
/camera/image_color/compressedDepth/parameter_updates
/camera/image_color/theora
/camera/image_color/theora/parameter_descriptions
/camera/image_color/theora/parameter_updates
/camera/image_raw
/camera/image_raw/compressed
/camera/image_raw/compressed/parameter_descriptions
/camera/image_raw/compressed/parameter_updates
/camera/image_raw/compressedDepth
/camera/image_raw/compressedDepth/parameter_descriptions
/camera/image_raw/compressedDepth/parameter_updates
/camera/image_raw/theora
/camera/image_raw/theora/parameter_descriptions
/camera/image_raw/theora/parameter_updates
/camera1394_nodelet/parameter_descriptions
/camera1394_nodelet/parameter_updates
/camera_nodelet_manager/bond
/diagnostics
/image_mono
/image_mono/compressed
/image_mono/compressed/parameter_descriptions
/image_mono/compressed/parameter_updates
/image_mono/compressedDepth
/image_mono/compressedDepth/parameter_descriptions
/image_mono/compressedDepth/parameter_updates
/image_mono/theora
/image_mono/theora/parameter_descriptions
/image_mono/theora/parameter_updates
/image_proc_debayer/parameter_descriptions
/image_proc_debayer/parameter_updates
/image_proc_rectify_color/parameter_descriptions
/image_proc_rectify_color/parameter_updates
/image_proc_rectify_mono/parameter_descriptions
/image_proc_rectify_mono/parameter_updates
/image_rect
/image_rect/compressed
/image_rect/compressed/parameter_descriptions
/image_rect/compressed/parameter_updates
/image_rect/compressedDepth
/image_rect/compressedDepth/parameter_descriptions
/image_rect/compressedDepth/parameter_updates
/image_rect/theora
/image_rect/theora/parameter_descriptions
/image_rect/theora/parameter_updates
/image_rect_color
/image_rect_color/compressed
/image_rect_color/compressed/parameter_descriptions
/image_rect_color/compressed/parameter_updates
/image_rect_color/compressedDepth
/image_rect_color/compressedDepth/parameter_descriptions
/image_rect_color/compressedDepth/parameter_updates
/image_rect_color/theora
/image_rect_color/theora/parameter_descriptions  
/image_rect_color/theora/parameter_updates
/out
/out/compressed
/out/compressed/parameter_descriptions
/out/compressed/parameter_updates
/out/compressedDepth
/out/compressedDepth/parameter_descriptions
/out/compressedDepth/parameter_updates
/out/theora
/out/theora/parameter_descriptions
/out/theora/parameter_updates
/rosout
/rosout_agg

Thanks,

Khalid

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-01-20 20:09:54 -0500

Jordi Pages gravatar image

Are you running the image_proc node? See for http://www.ros.org/wiki/image_proc details, but mainly, you have to run something like:

ROS_NAMESPACE=camera rosrun image_proc image_proc image_raw:=/camera/image

and to test

rosrun image_view image_view image:=/camera/image_rect_color
edit flag offensive delete link more

Comments

Thanks for your reply, I am running the image_proc node and able to view my colored images. I do not have camera/image_rect_color though. I edited the question above to include the output from the rostopic list command.

K_Yousif gravatar image K_Yousif  ( 2013-01-20 21:57:30 -0500 )edit

I agree with Thomas that it is very strange that the rectified topics are published in the global namespace while the camera has its own namespace, i.e. /camera. Could you specify how do you run the image_proc node? rxgraph could help to see if the node is properly subscribed to the right topics.

Jordi Pages gravatar image Jordi Pages  ( 2013-01-20 22:00:53 -0500 )edit

I agree with Thomas that it is very strange that the rectified topics are published in the global namespace while the camera has its own namespace, i.e. /camera.

Jordi Pages gravatar image Jordi Pages  ( 2013-01-20 22:01:01 -0500 )edit

I forgot to do the remapping from image_rect to camera/image_rect in my launch file. I think this should solve the problem. I will try it later and update you.

K_Yousif gravatar image K_Yousif  ( 2013-01-20 22:08:51 -0500 )edit
2

answered 2013-01-20 19:59:32 -0500

Thomas gravatar image

updated 2013-01-20 19:59:46 -0500

It is unlikely that your full qualified topic name is /image_rect, it is probable that it is /camera/image_rect. Check using rostopic list or rosnode list / rosnode info (or rxgraph if you prefer a GUI) which topics are published by your rectification node.

You can also then check if raw data are passing by this topic using rostopic echo -n 1 --noarr /your/rectified/image/topic which will display the rectified image header for one image. If this does not display anything it means that either the node crashed, does not publish data or you have some network issues.

Also take a look at the logging information both in the terminal you launched your node and using rxconsole and search for error messages.

edit flag offensive delete link more

Comments

Thanks alot for your fast reply,I have edited the question and included the output from the rostopic list command. There is no camera/image_rect

K_Yousif gravatar image K_Yousif  ( 2013-01-20 21:55:37 -0500 )edit

I have just realized that I forgot to do the remapping from image_rect to camera/image_rect from in my launch file. I will try this later and let update you.

K_Yousif gravatar image K_Yousif  ( 2013-01-20 22:05:41 -0500 )edit

I added the remapping in the launch file in the image_proc node from image_rect to camera/image_rect but it didn't work, I then tried remapping image_rect_color to camera/image_rect_color and it seems to be working, when I type rostopic echo -n 1 --noarr /camera/image_rect_color I get:

K_Yousif gravatar image K_Yousif  ( 2013-01-21 16:18:15 -0500 )edit

header: seq: 3298 stamp: secs: 33 nsecs: 267680000 frame_id: /camera height: 960 width: 1280 encoding: mono8 is_bigendian: 0 step: 1280

I am not sure why camera/image_rect does not publish anything but camera/image_rect_color seems to be working fine. Is this ok?

K_Yousif gravatar image K_Yousif  ( 2013-01-21 16:18:46 -0500 )edit

Normally you don't have to remap the rectification node, just push it into the right namespace using the ROS_NAMESPACE env. variable. See Jordi Pages answer below. You should be able to display this image using image_view for instance now. Is your problem solved?

Thomas gravatar image Thomas  ( 2013-01-21 16:22:19 -0500 )edit

Yes that worked! the problem is solved, Thank you very much for your help.

K_Yousif gravatar image K_Yousif  ( 2013-01-21 16:36:44 -0500 )edit

Question Tools

Stats

Asked: 2013-01-20 18:41:13 -0500

Seen: 797 times

Last updated: Jan 20 '13