How dheera/rosboard works
Main Components
• ROSBoard Node: Represent the central ROS node (executable via “nodes/rosboard_node” and encapsulated by “rosboard/rosboard.py”). This node is responsible for launching the web server and bridging data from ROS topics.
• Web Client (Frontend): Represent the static HTML/CSS/JS content (found in “rosboard/html”) which includes:
• index.html for the main page.
• JavaScript libraries and viewers (under “rosboard/html/js” and “rosboard/html/js/viewers”) that render different types of visualizations (images, maps, plots, etc.).
• CSS and fonts that style and format the page.
• External Libraries & Dependencies: Note the use of Tornado, simplejpeg, psutil, Leaflet.js, Material Design Lite, jQuery, and more. These libraries underpin the functionality of both the web server and the client-side visualization components.
• Build/Configuration: Include ancillary files such as package.xml, CMakeLists.txt, setup.py, and launch files (under “launch”) that are used for building, running, or deploying the package as a ROS node.
Relationships and Data Flow
• Inside the node, show the separation between:
• The ROS communication layer (subscribers and message handling, involving modules like “rosboard/subscribers” and “serialization.py”) and
• The Webserver layer (Tornado handling HTTP and websocket connections).
• Optionally, include a configuration/launch component that denotes how the system is started. For example, include a “run” script and ROS launch files that initialize the node.
Architectural Patterns and Design Principles
• Separation of concerns: one part of the system is entirely dedicated to interacting with ROS (sensors/topics), and another part deals with serving a responsive web interface.
• Modularity and extensibility: a dedicated directory (“rosboard/html/js/viewers”) allows additional custom visualizers to be added easily.
• Point out the compatibility layer (“rospy2”) which uses a bridge pattern to support both ROS ecosystems without significant code divergence.
• Mention the importance of using a custom, lightweight websocket implementation instead of depending on external packages like rosbridge-suite, to ensure tighter control over security and resource usage.