This project provides tools to record the execution of ROS 2 launch. Then, analyze and replay the launch execution.
Find the latest pacakges in the Release page and follow the instructions.
-
Rust toolchain
Visit rustup.rs and install
rustup
. -
rye
Visit rye.astral.sh to install it. It is used to setup a Python virtual environment and to manage Python project.
-
procpath
Visit the pypi site to install this tool. This is used for resource usage profiling.
Clone the project Git repository.
git clone https://github.com/NEWSLabNTU/ros-launch-perf.git
Compile the project and install the dump_launch
and play_launch
commands on the system.
make install
You can uninstall these commands afterwards.
make uninstall
The workflow goes in the dump step and then the play step. The
dump step cans the launch file and creates a record.json
. The play
step reads the dump and executes the launch plan. The dump only needs
to be done once.
The dump step runs in the same way we run a launch file. In this
Autoware simulation example, simply replace ros2 launch
with
dump_launch
.
## This is the original launch command.
# ros2 launch \
# autoware_launch planning_simulator.launch.xml \
# map_path:=$HOME/autoware_map/sample-map-planning \
# vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
dump_launch \
autoware_launch planning_simulator.launch.xml \
map_path:=$HOME/autoware_map/sample-map-planning \
vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
This command loads the record.json
and perform the launch execution.
play_launch
Start the launch first by just play
. Then, run this command to
profile per-process resource usage into profiling.sqlite
database
file. Press Ctrl-C to terminate the profiling.
make profile
Afterwards, you can generate SVG timecharts using this command.
make plot
This software is distributed under MIT license. You can read the license file.