Open a sample report page
- Input:
- CARET trace data (CTF file)
- Output (html pages):
- Top page (index.html):
- Links to each report page
- Summary
- Node analysis report:
- Detailed information of each callback function
- Verification results whether each timer/subscription callback function runs appropriately
- Path analysis report:
- Message flow graph and response time of each target path
- Top page (index.html):
- Ubuntu 20.04
- ROS2 Galactic
- CARET
- The followings
# Flask 2.1.0 (need to specify version) is required to create html report pages
pip3 install Flask==2.1.0
# firefox, selenium and geckodriver are required to generate graph image files
sudo apt install -y firefox
pip3 install selenium
wget https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
tar xzvf geckodriver-v0.31.0-linux64.tar.gz
mv geckodriver /usr/local/bin/.
- It uses lots of memory
- 64GB or more is recommended
- In case crash happens due to memory shortage, increase swap space
Please refer to sample_autoware to find quick usage
- Run the following commands
- Make sure to modify settings for your usage and environment
- Make sure to prepare JSON files
report_{dir_name_of_trace_data}
is created- Open
index.html
to see a report
# Settings: modify for your usage and environment
export script_path=./CARET_report # Path to this repo cloned
export package_list_json=./package_list.json # Path to setting file you prepare
export target_path_json=./target_path.json # Path to setting file you prepare
export trace_data=~/.ros/tracing/caret_sample/ # Path to CARET trace data (CTF file)
export start_time=0 # start time[sec] for analysis
export duration_time=9999 # duration time[sec] for analysis
export max_node_depth=20 # The number of depth to search path
export draw_all_message_flow=false # Flag to a create message flow graph for a whole time period (this will increase report creation time)
# Run script
sh ${script_path}/make_report.sh
- Node analysis report will be created for each
package_name
- Settings
package_list_json
: path to the JSON file
- Please describe the following information
- Package name information (
package_dict
)- Pairs of
package_name
andregular expression for nodes belonging to the package
- Pairs of
- Ignore node list (
ignore_list
)- List of
Regular expression for nodes to be ignored
- List of
- Package name information (
{
"package_dict": {
"Package_A" : "^/package_a",
"Package_B" : "^/package_b",
},
"ignore_list": [
"noisy_node_name_a",
"^/annoying_package_name",
]
}
- Path analysis report will show results for pathes described in this JSON file
- Settings
target_path_json
: path to the JSON filemax_node_depth
: In case a target path is not found, increase the number. In case the script stuck, descrease the number
- Please describe the following information
- Pair of
name
andpath
path
is a list ofnode_name
(note:path
doean't mean path as filesystem!)- Regular expression is supported
- You can also set
[node_name, topic_name]
instead ofnode_name
. It is useful when two nodes are connected via multiple topics
- Pair of
[
{
"name": "path_name",
"path": [
"The first node_name in the path",
"The second node_name in the path",
["The third node_name in the path", "The topic name published by the third node"]
"...",
"The last node_name in the path",
]
}
{
"name": "sample_path",
"path": [
"/package_a/node_1",
"/package_a/node_2",
["/package_a/node_3", "/topic_3"],
"/package_a/node_4_.*"
]
},
]
- Install Dear RosNodeViewer
- Open graph ( e.g.:
dear_ros_node_viewer architecture.yaml
) - Select nodes in the path which you want to analyze
- ctrl + click
- Press C to export node name list to clip board
- Paste the exported node name list to json file
- In case a node name varies for each execution, you can write node name in JSON like the following
- Before:
/node_name_xyz_abc1234567_1234567_1234567891234567891
- After:
/node_name_xyz.*
- Before: