Skip to content

Commit 4ce7702

Browse files
authored
simplication of lattice_generator.py, fixes #3858 (#3859)
* simplification of equation to compute the max_value/outer edge of the lattice based on number of headings.
1 parent 67bae86 commit 4ce7702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nav2_smac_planner/lattice_primitives/lattice_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _get_heading_discretization(self, number_of_headings: int) -> list:
119119
A list of headings in radians
120120
121121
"""
122-
max_val = int((((number_of_headings + 4) / 4) - 1) / 2)
122+
max_val = int(number_of_headings / 8)
123123

124124
outer_edge_x = []
125125
outer_edge_y = []

0 commit comments

Comments
 (0)