Ask Your Question
0

Stream virtual camera image following a tf frame?

asked 2021-09-29 05:09:17 -0600

n.dafinski gravatar image

Hey, I'm working on a SLAM implementation and I want to add functionality to visualize it in real-time in the browser from devices other than the host machine through a web server. Currently I am using RViz on the host machine and I am seeing the map being built in real-time just fine. Would it be possible to attach a sort of virtual camera to the scene that would hover a certain distance above the robot's frame, basically like a XYOrbit or a ThidPersonController camera in RViz, but also send whatever it captures over to a topic that I could then send over the web server and display on the client side? My reasoning for considering this is that the point cloud generated is pretty large, and is being published 10 times a second so I have a pretty good feeling it would clog up rosbridge and the websocket and then ruin performance. Also I'd need the decay functionality that RViz provides when displaying point clouds. Any ideas or suggestions on how I could achieve this?

edit retag flag offensive close merge delete

Comments

Yes it’s possible. Please check this link: https://roboticsknowledgebase.com/wik....

osilva gravatar image osilva  ( 2021-09-29 19:24:59 -0600 )edit
1

@osilva: you've been around for a bit now here. Please stop posting link-only answers/comments.

With the dynamic nature of the internet, links go stale almost the minute you post them. Please quote the relevant parts in your answer/comment.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-30 02:01:49 -0600 )edit

Apologies I thought it was ok for comments, I added a more complete answer.

osilva gravatar image osilva  ( 2021-09-30 04:15:53 -0600 )edit

Similar question here https://github.com/lucasw/rviz_camera...

Also #q142351 but it doesn't have the XYOrbit requirement, rviz_camera_stream doesn't provide that kind of UI but maybe some other tf generating solution does and could be used in combination with it.

lucasw gravatar image lucasw  ( 2021-09-30 09:28:39 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-09-30 06:34:20 -0600

updated 2021-09-30 06:35:23 -0600

Yes it's possible. You need to download Rviz camera stream plug-in ROS package into the src directory of your workspace.

mkdir -p catkin_ws/src
cd catkin_ws/src
git clone https://github.com/lucasw/rviz_camera_stream
cd ..
catkin_make

Next you need to setup the camera, there is a demo launch to guide you in the repo. Finally you can visualize:

rosrun image_view image_view image:=/your/topic/name

Then using ROS JavaScript you can create a web socket.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2021-09-29 05:09:17 -0600

Seen: 35 times

Last updated: Sep 30 '21