Read images from disk, publish as camera [closed]
I have a dataset of images on disk, along with a set of camera parameters (though they are not in ROS camera_info file format). I am trying to make a node that reads and publish de images in round robin (when it finishes reading the images in the folder, it starts again). My main objective is to make it in such a way that I can "fool" other nodes, making them think that the node is a camera.
I have being trying to do it in the following way:
- Publish the images in a topic
/camera/image_rect_color
- Publish
sensor_msgs/CameraInfo
in the topic/camera/camera_info
- I have tried to visualize the images in rviz using a camera display, but rviz complains because it says no
/camera_link
frame is published
At this point I believe there has to be an easier way to do this... Does anybody has suggestions about how to achieve this?
Thanks in advance!
You are probably close. The /camera_link is probably a missing tf frame of reference. Try setting rviz to use that frame ID for its display.
Thanks, I am publishing the tf of the cameras using static_transform_publisher nodes ( http://www.ros.org/wiki/tf#static_transform_publisher ). I had to be careful to name the camera frames equally in the cameraInfo and when launching the static_transform_publisher nodes. Now everything works!
Regarding the stereo camera baseline (if anybody reads this question) is stored in the matrixes in the cameraInfo of the left and right cameras (see the answers to this question: http://answers.ros.org/question/29050/stereo-camera-calibration-fundamental-matrix/ )