How koushikraghav/geometric_calculator works
Main Components
• ROS Core / Master: Since the application runs on ROS (ROS1 Noetic), include an element representing the ROS Master (roscore) that manages the ROS communication.
• User Terminal/CLI: Represent the terminal from which the user inputs commands (e.g., “create point”, “area”, “exit”). This is the entry point for user interactions.
• Geometric Calculator ROS Node: This is the central component (implemented in geometric_calculator.cpp) that serves as the ROS node. It listens for CLI inputs, processes commands, and orchestrates the calculation workflow.
• Error Handling Module: Highlight that input validation and error management is crucial per the README guidelines. Error handling can be considered part of the processing logic in the node or as a separate module.
Architectural Patterns and Design Principles
• Separation of Concerns: The system design should clearly separate CLI input processing (in geometric_calculator.cpp) from the computation logic (in calculator_utils.cpp).
• Modular Design: Although the project is relatively small, depicting modules such as “Input Processing”, “Geometry Computation”, and “Error Handling” helps illustrate maintainability and extensibility.
• ROS Integration: Emphasize the integration with ROS—the use of a package (denoted by package.xml) and the ROS runtime environment, which is linked to the external “roscore” service.
• Command Routing: Capture that the CLI commands are parsed and routed to appropriate functions, a principle that might be diagrammed under a “Command Interpreter” section.
Final Touches
• A note regarding the build and project configuration since the CMakeLists.txt and package.xml are essential for building and deploying the ROS node.