From 7010c8e2098488f23b8095df683773d8472acec5 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Fri, 12 May 2023 17:32:30 +0900 Subject: [PATCH 1/3] fix(obstacle_avoidance_planner): fix script typo Signed-off-by: Takayuki Murooka --- planning/obstacle_avoidance_planner/docs/debug.md | 4 ++-- ...calclation_time_plotter.py => calculation_time_plotter.py} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename planning/obstacle_avoidance_planner/scripts/{calclation_time_plotter.py => calculation_time_plotter.py} (100%) diff --git a/planning/obstacle_avoidance_planner/docs/debug.md b/planning/obstacle_avoidance_planner/docs/debug.md index f378decd4da25..f5bcf56a6138a 100644 --- a/planning/obstacle_avoidance_planner/docs/debug.md +++ b/planning/obstacle_avoidance_planner/docs/debug.md @@ -147,7 +147,7 @@ onPath:= 20.737 [ms] With the following script, any calculation time of the above functions can be plot. ```sh -ros2 run obstacle_avoidance_planner calclation_time_plotter.py +ros2 run obstacle_avoidance_planner calculation_time_plotter.py ``` ![calculation_time_plot](../media/debug/calculation_time_plot.png) @@ -155,7 +155,7 @@ ros2 run obstacle_avoidance_planner calclation_time_plotter.py You can specify functions to plot with the `-f` option. ```sh -ros2 run obstacle_avoidance_planner calclation_time_plotter.py -f "onPath, generateOptimizedTrajectory, calcReferencePoints" +ros2 run obstacle_avoidance_planner calculation_time_plotter.py -f "onPath, generateOptimizedTrajectory, calcReferencePoints" ``` ## Q&A for Debug diff --git a/planning/obstacle_avoidance_planner/scripts/calclation_time_plotter.py b/planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py similarity index 100% rename from planning/obstacle_avoidance_planner/scripts/calclation_time_plotter.py rename to planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py From a61a68bc3fe68df7ea2287b47c26713b3a1cdeb7 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Sat, 13 May 2023 17:24:57 +0900 Subject: [PATCH 2/3] fix Signed-off-by: Takayuki Murooka --- .../scripts/calculation_time_plotter.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py b/planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py index f0d32848adefe..042c2ff5f0345 100755 --- a/planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py +++ b/planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py @@ -70,8 +70,6 @@ def CallbackCalculationCost(self, msg): if len(self.y_vec[f_idx]) > 100: self.y_vec[f_idx].popleft() - print(len(self.y_vec[f_idx])) - x_vec = list(range(len(self.y_vec[f_idx]))) valid_x_vec = [] @@ -81,8 +79,6 @@ def CallbackCalculationCost(self, msg): valid_x_vec.append(x_vec[i]) valid_y_vec.append(self.y_vec[f_idx][i]) - print(len(valid_x_vec), len(valid_y_vec)) - self.lines[f_idx].set_xdata(valid_x_vec) self.lines[f_idx].set_ydata(valid_y_vec) From 6a91a7a35c8313fbe024492d0b6e6835cfad51b7 Mon Sep 17 00:00:00 2001 From: Takayuki Murooka Date: Sun, 14 May 2023 20:08:08 +0900 Subject: [PATCH 3/3] fix Signed-off-by: Takayuki Murooka --- planning/obstacle_avoidance_planner/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning/obstacle_avoidance_planner/CMakeLists.txt b/planning/obstacle_avoidance_planner/CMakeLists.txt index 399a596a0fb30..883ce473722fd 100644 --- a/planning/obstacle_avoidance_planner/CMakeLists.txt +++ b/planning/obstacle_avoidance_planner/CMakeLists.txt @@ -63,6 +63,6 @@ ament_auto_package( ) install(PROGRAMS - scripts/calclation_time_plotter.py + scripts/calculation_time_plotter.py DESTINATION lib/${PROJECT_NAME} )