Commit ea8f301 1 parent 992b4df commit ea8f301 Copy full SHA for ea8f301
File tree 2 files changed +5
-6
lines changed
planning/autoware_path_optimizer
include/autoware/path_optimizer
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 22
22
#include " autoware/path_optimizer/type_alias.hpp"
23
23
#include " autoware/universe_utils/ros/logger_level_configure.hpp"
24
24
#include " autoware/universe_utils/ros/polling_subscriber.hpp"
25
+ #include " autoware/universe_utils/system/stop_watch.hpp"
25
26
#include " autoware/universe_utils/system/time_keeper.hpp"
26
27
#include " autoware_vehicle_info_utils/vehicle_info_utils.hpp"
27
28
@@ -143,6 +144,8 @@ class PathOptimizer : public rclcpp::Node
143
144
std::unique_ptr<autoware::universe_utils::LoggerLevelConfigure> logger_configure_;
144
145
145
146
std::unique_ptr<autoware::universe_utils::PublishedTimePublisher> published_time_publisher_;
147
+
148
+ autoware::universe_utils::StopWatch<std::chrono::milliseconds> stop_watch_;
146
149
};
147
150
} // namespace autoware::path_optimizer
148
151
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ void PathOptimizer::resetPreviousData()
223
223
void PathOptimizer::onPath (const Path::ConstSharedPtr path_ptr)
224
224
{
225
225
time_keeper_->start_track (__func__);
226
+ stop_watch_.tic ();
226
227
227
228
// check if input path is valid
228
229
if (!checkInputPath (*path_ptr, *get_clock ())) {
@@ -270,12 +271,7 @@ void PathOptimizer::onPath(const Path::ConstSharedPtr path_ptr)
270
271
271
272
// publish calculation_time
272
273
// NOTE: This function must be called after measuring onPath calculation time
273
- /*
274
- const auto calculation_time_msg = createStringStamped(now(), time_keeper_ptr_->getLog());
275
- debug_calculation_time_str_pub_->publish(calculation_time_msg);
276
- debug_calculation_time_float_pub_->publish(
277
- createFloat64Stamped(now(), time_keeper_ptr_->getAccumulatedTime()));
278
- */
274
+ debug_calculation_time_float_pub_->publish (createFloat64Stamped (now (), stop_watch_.toc ()));
279
275
280
276
const auto output_traj_msg =
281
277
autoware::motion_utils::convertToTrajectory (full_traj_points, path_ptr->header );
You can’t perform that action at this time.
0 commit comments