Skip to content

Commit 77e36ba

Browse files
committed
put path smoothing with splines under env var flag
1 parent 3f83c66 commit 77e36ba

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
@@ -308,7 +308,13 @@ defmodule BotManager.BotStateMachine do
308308
# Replacing first and last points with the actual start and end points
309309
shortest_path = ([from] ++ Enum.slice(shortest_path, 1, Enum.count(shortest_path) - 2) ++ [to])
310310
|> AStarNative.simplify_path(bot_state_machine.obstacles)
311-
|> SplinePath.smooth_path()
311+
312+
shortest_path = if System.get_env("TEST_PATHFINDING_SPLINES") == "true" do
313+
shortest_path
314+
|> SplinePath.smooth_path()
315+
else
316+
shortest_path
317+
end
312318

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

0 commit comments

Comments
 (0)