A lot thanks to Ken, rock-ass.
Since I have succeeded in viewing 3D images in rgbdslam under your kindly help, I decide to show my commands here. I am not confident I am using ROS in the right way, but "comment" has words limit.
I am using a 3D camera with two "eyes" but only one USB line. 640x480 is the max resolution supported for single eye, but 640x480 with both eyes will not work because of USB bandwidth limit. so 352x288 is the max for stereo here.
All packages I used are: usb_cam, camera_calibration, camera_calibration_parsers, stereo_image_proc, image_view(optional), rgbdslam. usb_cam is the camera driver, and I used camera_calibration to calibrate my stereo cameras.
Open 1st terminal, run
roscore
Open 2nd terminal, run (drive the left eye)
rosparam set /stereo/left/video_device /dev/video2
rosparam set /stereo/left/image_width 352
rosparam set /stereo/left/image_height 288
rosparam set /stereo/left/pixel_format yuyv
rosparam set /stereo/left/camera_name left
rosrun usb_cam usb_cam_node /usb_cam:=/stereo/left/
Open 3rd terminal, run (drive the right eye)
rosparam set /stereo/right/video_device /dev/video1
rosparam set /stereo/right/image_width 352
rosparam set /stereo/right/image_height 288
rosparam set /stereo/right/pixel_format yuyv
rosparam set /stereo/right/camera_name right
rosrun usb_cam usb_cam_node /usb_cam:=/stereo/right/
Open 4th terminal, run (do calibration)
rosrun camera_calibration cameracalibrator.py --size 7x6 --square 0.049 left:=/stereo/left/image_raw right:=/stereo/right/image_raw left_camera:=/stereo/left right_camera:=/stereo/right --approximate=0.01 --no-service-check
notice that, before calibration, left and right camera will show warning messages saying cannot find some yaml files. that is ok at this point.
click "calibrate" button after it is enabled after taking 40 or more chessboard pictures. wait patiently. after quite a while, the calibration is done, check the epi value in top-right corner (let the camera see the chessboard again). if the epi is less than 2.5 it is acceptable, better value under 1.0. Then click "save". "commit" is a terrible button for me, because it will sometimes make my ubuntu reboot. just ignore the "commit" button.
"save" gives a /tmp/calibration.tar.gz(file name not sure). extract ost.txt out to /tmp/ost.ini, cut the ini file into two files manually half-half, for example /tmp/ost_left.ini and /tmp/ost_right.ini, then convert the ini files into yamls:
rosrun camera_calibration_parsers convert /tmp/ost_left.ini ~/.ros/camera_info/left.yaml
rosrun camera_calibration_parsers convert /tmp/ost_right.ini ~/.ros/camera_info/right.yaml
restart 2nd and 3rd terminal's command(ctrl+c and run again), this time there should be no warning messages
Open 5th terminal, run (mainly generate point cloud and disparity)
rosparam set /stereo/stereo_image_proc/approximate_sync true
ROS_NAMESPACE=stereo rosrun stereo_image_proc stereo_image_proc
the calibration must be done, or, stereo_image_proc will complain camera not calibrated
Open 6th terminal, run (showing left, right and disparity runtime images)
rosrun image_view stereo_view stereo:=stereo image:=image_rect _approximate_sync:=true
here is the chance to see disparity image, if the disparity is not good enough,it is a good idea ... (more)
Look at rgbdslam\launch folder, there will be a few launch files, one of them will contain all possible properties which you can use as a template for sturtup, just fill in topics with point clouds and image streams from your camera and you should be good to go.
thanks for your reply. sorry I haven't catch the point yet. do you mean (param name="config/topic_points" ...) by "possible properties"? the value is sth like (value="/camera/depth_registered/points") sounds like a folder. I didn't find it, should I create it? where? what to put inside?
Well you are looking in the right file. But that what sounds like a "folder" are ros topics. You just need a better background about ROS core features likes topics, those are used to exchange data between processes (they are called nodes). You read about them in http://wiki.ros.org/Topics
Hi, @vdonkey: I think It's difficult to execute rgbd slam at the point that you don't have a kinect. However You might be able to execute it if you refer this page ( http://wiki.ros.org/stereo_image_proc ). By the way, your ros distribution is fuerte, isn't it?
I'm sorry, most launch on this page ( http://alufr-ros-pkg.googlecode.com/svn/trunk/rgbdslam_freiburg/rgbdslam/launch/ ) file support kinect.
now I believe that there is still a long way to go before I can use rgbdslam. so I stopped to learn ROS basics. I learned catkin and finally have stereo_image_proc compiled. I was using fuerte but I changed to hydro to use catkin. Arigato to Ken
Hi, @vdonkey: Don't mention it! I also don't understand the framework of ROS when I was a beginner for ROS. I'm getting to understand it since I executed a gazebo simulator and moved a turtlebot2 by myself. I think I'm a beginner for ROS. Let's try everything! See you!
Hi, Ken. After studies these days, I can finally get disparity showed by "image_view", while "stereo_image_proc"(1) sending the topics to it. "camera_calibration", "usb_cam" are also used. but you know my target is "rgbdslam"(2), would you hint me how to link 1 and 2 ? will "rviz" get involved?