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

Is there a way to publish a video file so it can be displayed with a camera display in RViz? (solved)

asked 2020-01-21 03:22:05 -0500

Fetzle gravatar image

updated 2020-01-21 08:10:14 -0500

I have recorded videos I want to display in RViz with a camera display so that I can overlay them with my other plugins. Is there a way to do that?

I tried with the video_stream_opencv plugin already and I can get it to publish data that I can display with an Image View in RViz, but if I subscribe to the Image topic with the camera display it shows me the warning of "No Image received" and only shows a black screen.

Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2020-01-21 04:04:08 -0500

The difference between the Image and Camera displays is that the former just takes an image and displays is, while the latter additionally uses information about camera intrinsics for additional functionality such as being able to project rviz 3D rendered information into the image. To be able to do so, it requires a CameraInfo message to be published along with each Image message, see for instance REP-0104.

So for the Camera display to work, you need to publish a correctly timestamped CameraInfo message for each Image you publish. According to the video_stream_opencv documentation such functionality is already available, so you might want to check if CameraInfo messages are already published.

edit flag offensive delete link more

Comments

Thank you for your answer. As far as I understood video_stream_opencv does publish a default CameraInfo if I don't specify a camera calibration. I checked if this message is published and it is.

RViz also shows me in the camera status that the CameraInfo and the Topic are OK.

Fetzle gravatar image Fetzle  ( 2020-01-21 06:14:53 -0500 )edit
0

answered 2020-01-21 08:09:08 -0500

Fetzle gravatar image

So after a update of RViz to the latest version the problem was solved for me and the camera can display the video correctly.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-01-21 03:22:05 -0500

Seen: 713 times

Last updated: Jan 21 '20