Skip to content

Commit

Permalink
feat: update stats, check path param, add marker, warn user for wrong…
Browse files Browse the repository at this point in the history
… reaction_chain

Signed-off-by: Berkay Karaman <[email protected]>
  • Loading branch information
Berkay Karaman committed May 17, 2024
1 parent 08833c6 commit f74c83f
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 15 deletions.
14 changes: 11 additions & 3 deletions tools/reaction_analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ and `reaction_chain` list. `output_file_path` is the output file path is the pat
will be stored. `test_iteration` defines how many tests will be performed. The `reaction_chain` list is the list of the
pre-defined topics you want to measure their reaction times.

**IMPORTANT:** Ensure the `reaction_chain` list is correctly defined:

- For `perception_planning` mode, **do not** define `Control` nodes.
- For `planning_control` mode, **do not** define `Perception` nodes.

### Prepared Test Environment

- Download the demonstration test map from the
Expand Down Expand Up @@ -119,7 +124,8 @@ ros2 launch autoware_launch e2e_simulator.launch.xml vehicle_model:=sample_vehic
- After the EGO stopped in desired position, please localize the dummy obstacle by using the traffic controller. You can
control the traffic by pressing `ESC` button.

**After localize EGO and dummy vehicle, we should write the positions of these entities in the map frame in `reaction_analyzer.param.yaml`. To achieve this:**
**After localize EGO and dummy vehicle, we should write the positions of these entities in the map frame
in `reaction_analyzer.param.yaml`. To achieve this:**

- Get initialization pose from `/awsim/ground_truth/vehicle/pose` topic.
- Get entity params from `/perception/object_recognition/objects` topic.
Expand All @@ -146,10 +152,12 @@ to run Autoware while recording.**
## Results

The results will be stored in the `csv` file format and written to the `output_file_path` you defined. It shows each
pipeline of the Autoware by using header timestamp of the messages, and it reports `Node Latency`, `Pipeline Latency`, and `Total Latency`
pipeline of the Autoware by using header timestamp of the messages, and it reports `Node Latency`, `Pipeline Latency`,
and `Total Latency`
for each of the nodes.

- `Node Latency`: The time difference between previous and current node's reaction timestamps.
- `Node Latency`: The time difference between previous and current node's reaction timestamps. If it is the first node
in the pipeline, it is same as `Pipeline Latency`.
- `Pipeline Latency`: The time difference between published time of the message and pipeline header time.
- `Total Latency`: The time difference between the message's published timestamp and the spawn obstacle command sent
timestamp.
Expand Down
2 changes: 2 additions & 0 deletions tools/reaction_analyzer/include/reaction_analyzer_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ReactionAnalyzerNode : public rclcpp::Node
// Publishers
rclcpp::Publisher<geometry_msgs::msg::PoseWithCovarianceStamped>::SharedPtr pub_initial_pose_;
rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr pub_goal_pose_;
rclcpp::Publisher<visualization_msgs::msg::Marker>::SharedPtr pub_marker_;

// Variables
std::vector<PipelineMap> pipeline_map_vector_;
Expand All @@ -104,6 +105,7 @@ class ReactionAnalyzerNode : public rclcpp::Node
bool is_initialization_requested{false};
bool is_route_set_{false};
size_t test_iteration_count_{0};
visualization_msgs::msg::Marker entity_debug_marker_;

// Functions
void init_analyzer_variables();
Expand Down
19 changes: 19 additions & 0 deletions tools/reaction_analyzer/include/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <autoware_internal_msgs/msg/published_time.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>
#include <unique_identifier_msgs/msg/uuid.hpp>
#include <visualization_msgs/msg/marker.hpp>

#include <boost/uuid/string_generator.hpp>
#include <boost/uuid/uuid.hpp>
Expand All @@ -40,6 +41,7 @@
#include <pcl/point_types.h>
#include <pcl_conversions/pcl_conversions.h>

#include <filesystem>
#include <fstream>
#include <map>
#include <string>
Expand Down Expand Up @@ -253,6 +255,15 @@ PredictedObjects::SharedPtr create_entity_predicted_objects_ptr(const EntityPara
*/
rclcpp::SubscriptionOptions create_subscription_options(rclcpp::Node * node);

/**
* @brief Creates a visualization marker for a polyhedron based on the provided entity parameters.
*
* @param params The parameters of the entity for which the marker is to be created. It includes the
* position, orientation, and dimensions of the entity.
* @return The created visualization marker for the polyhedron.
*/
visualization_msgs::msg::Marker create_polyhedron_marker(const EntityParams & params);

/**
* @brief Splits a string by a given delimiter.
*
Expand All @@ -263,6 +274,14 @@ rclcpp::SubscriptionOptions create_subscription_options(rclcpp::Node * node);
*/
std::vector<std::string> split(const std::string & str, char delimiter);

/**
* @brief Checks if a folder exists.
*
* @param path The path to the folder.
* @return True if the folder exists, false otherwise.
*/
bool does_folder_exist(const std::string & path);

/**
* @brief Get the index of the trajectory point that is a certain distance away from the current
* point.
Expand Down
13 changes: 11 additions & 2 deletions tools/reaction_analyzer/src/reaction_analyzer_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,15 @@ ReactionAnalyzerNode::ReactionAnalyzerNode(rclcpp::NodeOptions node_options)
return;

Check warning on line 68 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L67-L68

Added lines #L67 - L68 were not covered by tests
}

node_params_.output_file_path = get_parameter("output_file_path").as_string();

Check warning on line 71 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L71

Added line #L71 was not covered by tests
// Check if the output file path is valid
if (!does_folder_exist(node_params_.output_file_path)) {
RCLCPP_ERROR(get_logger(), "Output file path is not valid. Node couldn't be initialized.");
return;

Check warning on line 75 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L73-L75

Added lines #L73 - L75 were not covered by tests
}

node_params_.timer_period = get_parameter("timer_period").as_double();
node_params_.test_iteration = get_parameter("test_iteration").as_int();
node_params_.output_file_path = get_parameter("output_file_path").as_string();
node_params_.spawn_time_after_init = get_parameter("spawn_time_after_init").as_double();
node_params_.spawn_distance_threshold = get_parameter("spawn_distance_threshold").as_double();

Check warning on line 81 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L78-L81

Added lines #L78 - L81 were not covered by tests

Expand Down Expand Up @@ -115,6 +121,7 @@ ReactionAnalyzerNode::ReactionAnalyzerNode(rclcpp::NodeOptions node_options)
create_subscription_options(this));

Check warning on line 121 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L108-L121

Added lines #L108 - L121 were not covered by tests

pub_goal_pose_ = create_publisher<geometry_msgs::msg::PoseStamped>("output/goal", rclcpp::QoS(1));
pub_marker_ = create_publisher<visualization_msgs::msg::Marker>("~/debug", 10);

Check warning on line 124 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L123-L124

Added lines #L123 - L124 were not covered by tests

init_analyzer_variables();

Check warning on line 126 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L126

Added line #L126 was not covered by tests

Expand Down Expand Up @@ -167,6 +174,8 @@ void ReactionAnalyzerNode::on_timer()
return;
}

pub_marker_->publish(entity_debug_marker_);

Check warning on line 177 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L177

Added line #L177 was not covered by tests

// Spawn the obstacle if the conditions are met
spawn_obstacle(current_odometry_ptr->pose.pose.position);

Check warning on line 180 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L180

Added line #L180 was not covered by tests

Expand Down Expand Up @@ -244,7 +253,7 @@ void ReactionAnalyzerNode::calculate_results(
void ReactionAnalyzerNode::init_analyzer_variables()

Check warning on line 253 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L253

Added line #L253 was not covered by tests
{
entity_pose_ = create_entity_pose(node_params_.entity_params);

entity_debug_marker_ = create_polyhedron_marker(node_params_.entity_params);
goal_pose_.pose = pose_params_to_pose(node_params_.goal_pose);

Check warning on line 257 in tools/reaction_analyzer/src/reaction_analyzer_node.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/reaction_analyzer_node.cpp#L255-L257

Added lines #L255 - L257 were not covered by tests

if (node_running_mode_ == RunningMode::PlanningControl) {
Expand Down
4 changes: 4 additions & 0 deletions tools/reaction_analyzer/src/subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,14 @@ std::optional<std::map<std::string, MessageBufferVariant>> SubscriberBase::get_m
for (const auto & [key, variant] : message_buffers_) {

Check warning on line 162 in tools/reaction_analyzer/src/subscriber.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/subscriber.cpp#L162

Added line #L162 was not covered by tests
if (auto * control_message = std::get_if<ControlCommandBuffer>(&variant)) {
if (!control_message->second) {
RCLCPP_WARN_THROTTLE(

Check warning on line 165 in tools/reaction_analyzer/src/subscriber.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/subscriber.cpp#L164-L165

Added lines #L164 - L165 were not covered by tests
node_->get_logger(), *node_->get_clock(), 1000, "Waiting for %s to react", key.c_str());
all_reacted = false;
}
} else if (auto * general_message = std::get_if<MessageBuffer>(&variant)) {
if (!general_message->has_value()) {
RCLCPP_WARN_THROTTLE(

Check warning on line 171 in tools/reaction_analyzer/src/subscriber.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/subscriber.cpp#L170-L171

Added lines #L170 - L171 were not covered by tests
node_->get_logger(), *node_->get_clock(), 1000, "Waiting for %s to react", key.c_str());
all_reacted = false;
}
}
Expand Down
116 changes: 106 additions & 10 deletions tools/reaction_analyzer/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,86 @@ rclcpp::SubscriptionOptions create_subscription_options(rclcpp::Node * node)
return sub_opt;

Check warning on line 120 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L120

Added line #L120 was not covered by tests
}

visualization_msgs::msg::Marker create_polyhedron_marker(const EntityParams & params)

Check warning on line 123 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L123

Added line #L123 was not covered by tests
{
visualization_msgs::msg::Marker marker;
marker.header.frame_id = "map";
marker.header.stamp = rclcpp::Time(0);
marker.ns = "entity";
marker.id = 0;
marker.type = visualization_msgs::msg::Marker::LINE_STRIP;
marker.action = visualization_msgs::msg::Marker::ADD;

Check warning on line 131 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L125-L131

Added lines #L125 - L131 were not covered by tests

marker.pose.position.x = params.x;
marker.pose.position.y = params.y;
marker.pose.position.z = params.z;

Check warning on line 135 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L133-L135

Added lines #L133 - L135 were not covered by tests

tf2::Quaternion quaternion;
quaternion.setRPY(
tier4_autoware_utils::deg2rad(params.roll), tier4_autoware_utils::deg2rad(params.pitch),
tier4_autoware_utils::deg2rad(params.yaw));
marker.pose.orientation = tf2::toMsg(quaternion);

Check warning on line 141 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L138-L141

Added lines #L138 - L141 were not covered by tests

marker.scale.x = 0.1; // Line width

Check warning on line 143 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L143

Added line #L143 was not covered by tests

marker.color.a = 1.0; // Alpha
marker.color.r = 1.0;
marker.color.g = 0.0;
marker.color.b = 0.0;

Check warning on line 148 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L145-L148

Added lines #L145 - L148 were not covered by tests

// Define the 8 corners of the polyhedron
geometry_msgs::msg::Point p1, p2, p3, p4, p5, p6, p7, p8;

p1.x = params.x_l / 2.0;
p1.y = params.y_l / 2.0;
p1.z = params.z_l / 2.0;
p2.x = -params.x_l / 2.0;
p2.y = params.y_l / 2.0;
p2.z = params.z_l / 2.0;
p3.x = -params.x_l / 2.0;
p3.y = -params.y_l / 2.0;
p3.z = params.z_l / 2.0;
p4.x = params.x_l / 2.0;
p4.y = -params.y_l / 2.0;
p4.z = params.z_l / 2.0;
p5.x = params.x_l / 2.0;
p5.y = params.y_l / 2.0;
p5.z = -params.z_l / 2.0;
p6.x = -params.x_l / 2.0;
p6.y = params.y_l / 2.0;
p6.z = -params.z_l / 2.0;
p7.x = -params.x_l / 2.0;
p7.y = -params.y_l / 2.0;
p7.z = -params.z_l / 2.0;
p8.x = params.x_l / 2.0;
p8.y = -params.y_l / 2.0;
p8.z = -params.z_l / 2.0;

Check warning on line 176 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L153-L176

Added lines #L153 - L176 were not covered by tests

// Add points to the marker
marker.points.push_back(p1);
marker.points.push_back(p2);
marker.points.push_back(p3);
marker.points.push_back(p4);
marker.points.push_back(p1);

Check warning on line 183 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L179-L183

Added lines #L179 - L183 were not covered by tests

marker.points.push_back(p5);
marker.points.push_back(p6);
marker.points.push_back(p7);
marker.points.push_back(p8);
marker.points.push_back(p5);

Check warning on line 189 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L185-L189

Added lines #L185 - L189 were not covered by tests

marker.points.push_back(p1);
marker.points.push_back(p5);
marker.points.push_back(p6);
marker.points.push_back(p2);
marker.points.push_back(p3);
marker.points.push_back(p7);
marker.points.push_back(p4);
marker.points.push_back(p8);

Check warning on line 198 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L191-L198

Added lines #L191 - L198 were not covered by tests

return marker;
}

Check warning on line 201 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L200-L201

Added lines #L200 - L201 were not covered by tests

std::vector<std::string> split(const std::string & str, char delimiter)

Check warning on line 203 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L203

Added line #L203 was not covered by tests
{
std::vector<std::string> elements;
Expand All @@ -131,6 +211,11 @@ std::vector<std::string> split(const std::string & str, char delimiter)
return elements;
}

Check warning on line 212 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L211-L212

Added lines #L211 - L212 were not covered by tests

bool does_folder_exist(const std::string & path)

Check warning on line 214 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L214

Added line #L214 was not covered by tests
{
return std::filesystem::exists(path) && std::filesystem::is_directory(path);

Check warning on line 216 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L216

Added line #L216 was not covered by tests
}

size_t get_index_after_distance(

Check warning on line 219 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L219

Added line #L219 was not covered by tests
const Trajectory & traj, const size_t curr_id, const double distance)
{
Expand Down Expand Up @@ -410,7 +495,7 @@ void write_results(
}

// tmp map to store latency results for statistics
std::map<std::string, std::vector<std::pair<double, double>>> tmp_latency_map;
std::map<std::string, std::vector<std::tuple<double, double, double>>> tmp_latency_map;

size_t test_count = 0;
for (const auto & pipeline_map : pipeline_map_vector) {
Expand Down Expand Up @@ -444,7 +529,8 @@ void write_results(
const auto total_latency =
calculate_time_diff_ms(spawn_cmd_time, reaction.published_stamp);
file << node_latency << " - " << pipeline_latency << " - " << total_latency << ",";
tmp_latency_map[node_name].emplace_back(node_latency, total_latency);
tmp_latency_map[node_name].emplace_back(
std::make_tuple(node_latency, pipeline_latency, total_latency));

Check warning on line 533 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L530-L533

Added lines #L530 - L533 were not covered by tests
} else {
const auto & prev_reaction = pipeline_reactions[j - 1].second;

Check warning on line 535 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L535

Added line #L535 was not covered by tests
const auto node_latency =
Expand All @@ -454,7 +540,8 @@ void write_results(
const auto total_latency =
calculate_time_diff_ms(spawn_cmd_time, reaction.published_stamp);
file << node_latency << " - " << pipeline_latency << " - " << total_latency << ",";
tmp_latency_map[node_name].emplace_back(node_latency, total_latency);
tmp_latency_map[node_name].emplace_back(
std::make_tuple(node_latency, pipeline_latency, total_latency));

Check warning on line 544 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L541-L544

Added lines #L541 - L544 were not covered by tests
}
}
file << "\n";

Check warning on line 547 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L547

Added line #L547 was not covered by tests
Expand All @@ -465,27 +552,36 @@ void write_results(

file << "\nStatistics\n";

Check warning on line 553 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L553

Added line #L553 was not covered by tests
file << "Node "
"Name,Min-NL,Max-NL,Mean-NL,Median-NL,Std-Dev-NL,Min-TL,Max-TL,Mean-TL,Median-TL,Std-Dev-"
"TL\n";
"Name,Min-NL,Max-NL,Mean-NL,Median-NL,Std-Dev-NL,Min-PL,Max-PL,Mean-PL,Median-PL,Std-Dev-"
"PL,Min-TL,Max-TL,Mean-TL,Median-TL,Std-Dev-TL\n";
for (const auto & [node_name, latency_vec] : tmp_latency_map) {
file << node_name << ",";

Check warning on line 558 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L556-L558

Added lines #L556 - L558 were not covered by tests

std::vector<double> node_latencies;
std::vector<double> pipeline_latencies;
std::vector<double> total_latencies;

// Extract latencies
for (const auto & latencies : latency_vec) {

Check warning on line 565 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L565

Added line #L565 was not covered by tests
node_latencies.push_back(latencies.first);
total_latencies.push_back(latencies.second);
double node_latency, pipeline_latency, total_latency;
std::tie(node_latency, pipeline_latency, total_latency) = latencies;
node_latencies.push_back(node_latency);
pipeline_latencies.push_back(pipeline_latency);
total_latencies.push_back(total_latency);

Check warning on line 570 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L568-L570

Added lines #L568 - L570 were not covered by tests
}

const auto stats_node_latency = calculate_statistics(node_latencies);
const auto stats_pipeline_latency = calculate_statistics(pipeline_latencies);
const auto stats_total_latency = calculate_statistics(total_latencies);

Check warning on line 575 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L573-L575

Added lines #L573 - L575 were not covered by tests

file << stats_node_latency.min << "," << stats_node_latency.max << ","
<< stats_node_latency.mean << "," << stats_node_latency.median << ","
<< stats_node_latency.std_dev << "," << stats_total_latency.min << ","
<< stats_total_latency.max << "," << stats_total_latency.mean << ","
<< stats_total_latency.median << "," << stats_total_latency.std_dev << "\n";
<< stats_node_latency.std_dev << "," << stats_pipeline_latency.min << ","
<< stats_pipeline_latency.max << "," << stats_pipeline_latency.mean << ","
<< stats_pipeline_latency.median << "," << stats_pipeline_latency.std_dev << ","
<< stats_total_latency.min << "," << stats_total_latency.max << ","
<< stats_total_latency.mean << "," << stats_total_latency.median << ","
<< stats_total_latency.std_dev << "\n";

Check warning on line 584 in tools/reaction_analyzer/src/utils.cpp

View check run for this annotation

Codecov / codecov/patch

tools/reaction_analyzer/src/utils.cpp#L577-L584

Added lines #L577 - L584 were not covered by tests
}
file.close();
RCLCPP_INFO(node->get_logger(), "Results written to: %s", ss.str().c_str());
Expand Down

0 comments on commit f74c83f

Please sign in to comment.