Skip to content

Commit 871b2d3

Browse files
committed
put path smoothing with splines under env var flag
1 parent 0a0006e commit 871b2d3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apps/bot_manager/lib/bot_state_machine.ex

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,13 @@ defmodule BotManager.BotStateMachine do
337337
# Replacing first and last points with the actual start and end points
338338
shortest_path = ([from] ++ Enum.slice(shortest_path, 1, Enum.count(shortest_path) - 2) ++ [to])
339339
|> AStarNative.simplify_path(bot_state_machine.obstacles)
340-
|> SplinePath.smooth_path()
340+
341+
shortest_path = if System.get_env("TEST_PATHFINDING_SPLINES") == "true" do
342+
shortest_path
343+
|> SplinePath.smooth_path()
344+
else
345+
shortest_path
346+
end
341347

342348
# The first point should only be necessary to simplify the path
343349
shortest_path = tl(shortest_path)

0 commit comments

Comments
 (0)