How to embed matplot lib plot into ROS web GUI?
In my ROS package, I have a node that plots an occupancy grid map retrieved from the /map
topic with a trajectory overlaid on it that is color coded according to some sensor data value as it becomes available when the robot is moved around. This uses Python matplotlib
.
I also have a web GUI that is used for tele-operation. This uses rosbridge
and roslibjs
for interacting between my ROS nodes and the webpage using JavaScript
. The GUI can currently display the occupancy grid from the /map
topic but what I'd really like to do is display the plot I've made using matplotlib
with the color coded trajectory overlaid on it.
Does anyone have any idea how I can embed my matplotlib
plot into the web GUI using roslibjs
or anything else?
Did you try to load it as image? Maybe load it on same position with z-index and transparency.
The problem is that it is not saved as an image because it is constantly changing/updating as new sensor and map data is available. Any ideas how to deal with that situation?