Skip to content

Commit a64da99

Browse files
committed
put path smoothing with splines under env var flag
1 parent ccee3ae commit a64da99

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
@@ -342,7 +342,13 @@ defmodule BotManager.BotStateMachine do
342342
# Replacing first and last points with the actual start and end points
343343
shortest_path = ([from] ++ Enum.slice(shortest_path, 1, Enum.count(shortest_path) - 2) ++ [to])
344344
|> AStarNative.simplify_path(bot_state_machine.obstacles)
345-
|> SplinePath.smooth_path()
345+
346+
shortest_path = if System.get_env("TEST_PATHFINDING_SPLINES") == "true" do
347+
shortest_path
348+
|> SplinePath.smooth_path()
349+
else
350+
shortest_path
351+
end
346352

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

0 commit comments

Comments
 (0)