webviz icon indicating copy to clipboard operation
webviz copied to clipboard

Talking to webviz directly from non-ROS application

Open AndreiBarsan opened this issue 3 years ago • 6 comments

Hi WebViz team,

I am interested in using webviz for ad-hoc visualization tasks, e.g., quickly showing point clouds or images from a Python project that does not use ROS.

It seems like it would be possible to communicate with webviz by directly synthesizing, e.g., visualization messages in JSON and writing them to an appropriate websocket, without relying on ROS + rosbridge.

Are there any examples of code doing this? Is this even possible, or is it absolutely necessary to have a full instance of ROS running under the hood for visualizing things in webviz?

Thank you!

AndreiBarsan avatar Mar 19 '21 21:03 AndreiBarsan

Have the same problem, trying to implement my own writer for rosbag files without ros dependency for that.

kwetril avatar Mar 20 '21 00:03 kwetril

@kwetril @AndreiBarsan Were you able to achieve this? It would be great to know.

shreyas2311 avatar Apr 14 '21 16:04 shreyas2311

What format(s) are your data currently in?

amacneil avatar Apr 14 '21 23:04 amacneil

@amacneil Thanks for the reply. I have my data stored in protobuf format.

shreyas2311 avatar Apr 27 '21 01:04 shreyas2311

@shreyas2311 I was able to get this working by writing ROS messages to a websocket with roslibpy, and routing those to a running ROS instance via rosbridge, which was the instance that webviz connected to.

So this was still in a way relying on ROS, so not super clean. I was running ROS in its own container but this still had a fair bit of overhead.

AndreiBarsan avatar Apr 27 '21 03:04 AndreiBarsan

This is something we've been thinking about for foxglove/studio (fork of webviz). We really want to add support for non ROS formats.

However, it would really help to understand more specifically how your data is structured. For example, sensor_msgs/PointCloud2 is a standard message for storing point clouds in ROS. If you're storing point clouds in protobuf, what do the definitions look like? How would you expect to tell webviz how to decode your point cloud?

amacneil avatar Apr 29 '21 02:04 amacneil