Software architecture#
This section explains an overview of software architecture.
CARET serves three phases; recording, configuration and visualization.
Recording#
In the recording phase, CARET records events data obtained from tracepoints during application's runtime.
CARET adopts LTTng as a tracing mechanism. LTTng session daemon collects events from tracepoints.
rclcpp
provided by ROS 2 has original tracepoints and CARET uses some of them also. CARET collects its dedicated tracepoints added by function hooking.
CARET uses function hooking actively because it does not require changes of existing packages and allow us to add trace points in a flexible way.
Only if it is not possible to add tracepoints by function hooking due to some constraints from implementation, tracepoints are added via another approach.
All of recorded events are stored to a set of trace data CTF-based. It is visualized for users to observe application's performance and behavior.
caret_trace
is the main package for realizing recording. caret_trace
collects events invoked in rclcpp
, rcl
and DDS. It is inconvenient to see actual time when data is consumed because data is consumed in a user code actually. TILDE serves tracepoints to collect events which happens in a user code. CARET is able to refer to them for diving into events in a user code.
See also
Configuration#
In the configuration, CARET expects users to complement structure definitions of a target application before visualizing data. Politely speaking, CARET expects users to define intra-node data paths and inter-node data paths to calculate response time. It's difficult to get their definition mechanically, so that users have to give.
Structure data of a targe application is stored in a object which is instantiated from Architecture class defined by caret_analyze
.
CARET serves Python API to deal with the object to fulfill configuration step by running script. CARET is able to store the object to a YAML-based file to be reused.
Info
Current implementation of CARET does not support several functions to define some of them. These are defined by editing the YAML-based file directly.
A package related to configuration is caret_analyze.
See also Configuration.
Visualization#
CARET visualizes trace data and helps users to observe performance and behavior of a target application.
caret_analyze
provides a Python class whose object holds a set of time series data.
Users are able to get their desired data for evaluation from the object.
CARET serves visualization methods for users to observe performance with graphical view.
caret_analyze is a package on visualization.
See also
ROS 2 Packages#
The followings are CARET-related packages.
Package | Role | Repository |
---|---|---|
caret_trace | Add tracepoints via function hooking and functions to manage states of tracepoints. | https://github.com/tier4/caret_trace/ |
CARET_rclcpp | Add tracepoints by fork | https://github.com/tier4/rclcpp |
ros2caret | Provide CARET CLI | https://github.com/tier4/ros2caret/ |
caret_analyze | Analyze trace data | https://github.com/tier4/caret_analyze/ |
caret_analyze_cpp_impl | Accelerate caret_analyze | https://github.com/tier4/caret_analyze_cpp_impl/ |
TILDE | Add tracepoints within the system to be measure | https://github.com/tier4/TILDE |