Skip to content

Commit

Permalink
feat(obstacle_avoidance_planner): add depth argument in plotter (auto…
Browse files Browse the repository at this point in the history
…warefoundation#4605)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 authored and kminoda committed Aug 21, 2023
1 parent cbc10cd commit 2d3d0c9
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, args):
super().__init__("calculation_cost_analyzer")

self.functions_name = args.functions.split(",")
self.depth = args.depth

self.calculation_cost_hist = []
self.sub_calculation_cost = self.create_subscription(
Expand Down Expand Up @@ -67,7 +68,7 @@ def CallbackCalculationCost(self, msg):
if not is_found:
self.y_vec[f_idx].append(None)

if len(self.y_vec[f_idx]) > 100:
if len(self.y_vec[f_idx]) > self.depth:
self.y_vec[f_idx].popleft()

x_vec = list(range(len(self.y_vec[f_idx])))
Expand Down Expand Up @@ -99,7 +100,13 @@ def CallbackCalculationCost(self, msg):
"-f",
"--functions",
type=str,
default="onPath, getModelPredictiveTrajectory, getEBTrajectory",
default="onPath, optimizeTrajectory, publishDebugMarkerOfOptimization, solveOsqp",
)
parser.add_argument(
"-d",
"--depth",
type=float,
default=500,
)
args = parser.parse_args()

Expand Down

0 comments on commit 2d3d0c9

Please sign in to comment.