0
$\begingroup$

Rosanswers logo

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!


Originally posted by jespestana on ROS Answers with karma: 107 on 2013-03-07

Post score: 3


Original comments

Comment by joq on 2013-03-08:
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.

Comment by jespestana on 2013-03-08:
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!

Comment by jespestana on 2013-03-08:
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/ )

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

We've got a python node that does that, take a look here, and the code is also here. Unfortunatelly, it does not start again when all the images have been published, but feel free to contribute!


Originally posted by Miquel Massot with karma: 1471 on 2013-03-07

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by jespestana on 2013-03-07:
Thanks a lot, I am going to study and try your code!

Comment by Dan Lazewatsky on 2013-03-07:
You could make it restart by running it in a launch file with respawn="true"

Comment by jespestana on 2013-03-08:
I have made my own version of image_stereo_sequence_publisher.py, image_stereo_sequence_publish.launch based on your files. The main difference is that I am publishing stereo images simultaneously from the same node; and that I can set the name of the topics stereo/left/image_rect, etc.Thanks!

Comment by lilouch on 2015-03-20:
is there any similar tool for c++ ?

Thank

$\endgroup$

Your Answer

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