Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(obstacle_avoidance_planner): fix script typo #3688

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions planning/obstacle_avoidance_planner/docs/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ 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)

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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)

Expand Down