Best practices for ROS websocket objects?
Let's say I have a 3D viewer that displays lidar data for my robot. Now I want to create a second 3D viewer that shows a map that is being generated by a package like gmapping. What would be a recommended best practice - a single ROSLIB.Ros() object that gets passed to both viewers' visualization components, or a separate ROSLIB.Ros() object for each viewer? I currently am implementing the first option but since I'm quite new to web dev and RWT libraries I wanted to reach out to the community for any thoughts on this.
I think it is best practice to reuse the ROS object.
What is your reasoning behind using the single ROS object?
Easier to debug; Single instance which maintains a connection, etc.