Accessing video frames of a rosviz display

asked 2019-04-13 09:21:12 -0500

Sergio Cap gravatar image

Hi,

do someone have experience accessing the video frame of a rviz display? I explain better: let's say I implement an application like the sample one: http://docs.ros.org/melodic/api/librv...

but then I want to send over a network stream the frames and timestamps of my rviz display. So I want to access the video frames through the C++ API and the related timestamps.

Any ideas on how to achieve that?

Thanks

edit retag flag offensive close merge delete

Comments

Look at #q142351

lucasw gravatar image lucasw  ( 2019-04-15 10:03:37 -0500 )edit

Hi Luca, thanks for the answer, it looks what I was searching for. Although I'm trying to install it using catkin...I can see the plugin available in rosviz, but when I try to add it, I have the following error:

CameraPub The class required for this display, 'rviz_camera_stream/CameraPub', could not be loaded. Error: Could not find library corresponding to plugin rviz_camera_stream/CameraPub. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.

Any advice?

Sergio Cap gravatar image Sergio Cap  ( 2019-04-15 14:53:38 -0500 )edit
1

Run source on your devel/setup.bash before running rviz. If you are using install/setup.bash it's possible I haven't made it install properly, I can take a look in a day or two.

lucasw gravatar image lucasw  ( 2019-04-15 15:04:59 -0500 )edit

Thanks :) It work now

Sergio Cap gravatar image Sergio Cap  ( 2019-04-16 06:51:27 -0500 )edit

Hi Lucas, is there a way to move the camera created by your plugin? Could they be moved in rosviz? Or through a topic?

Sergio Cap gravatar image Sergio Cap  ( 2019-05-02 17:40:59 -0500 )edit

It's controlled by the transform of the frame_id in the input camera_info header. You could broadcast that tf manually, through a static_transform_publisher, or through an rviz interactive tf broadcaster like https://github.com/lucasw/rviz_intera... (there are some others out there also).

lucasw gravatar image lucasw  ( 2019-05-02 18:31:08 -0500 )edit