Skip to content

Commit d8efc13

Browse files
authored
feat(obstacle_avoidance_planner): add depth argument in plotter (#4605)
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
1 parent 9ac3a7c commit d8efc13

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

planning/obstacle_avoidance_planner/scripts/calculation_time_plotter.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def __init__(self, args):
2828
super().__init__("calculation_cost_analyzer")
2929

3030
self.functions_name = args.functions.split(",")
31+
self.depth = args.depth
3132

3233
self.calculation_cost_hist = []
3334
self.sub_calculation_cost = self.create_subscription(
@@ -67,7 +68,7 @@ def CallbackCalculationCost(self, msg):
6768
if not is_found:
6869
self.y_vec[f_idx].append(None)
6970

70-
if len(self.y_vec[f_idx]) > 100:
71+
if len(self.y_vec[f_idx]) > self.depth:
7172
self.y_vec[f_idx].popleft()
7273

7374
x_vec = list(range(len(self.y_vec[f_idx])))
@@ -99,7 +100,13 @@ def CallbackCalculationCost(self, msg):
99100
"-f",
100101
"--functions",
101102
type=str,
102-
default="onPath, getModelPredictiveTrajectory, getEBTrajectory",
103+
default="onPath, optimizeTrajectory, publishDebugMarkerOfOptimization, solveOsqp",
104+
)
105+
parser.add_argument(
106+
"-d",
107+
"--depth",
108+
type=float,
109+
default=500,
103110
)
104111
args = parser.parse_args()
105112

0 commit comments

Comments
 (0)