Skip to content

Commit cecc6ea

Browse files
committed
fix var name
Signed-off-by: Tony Najjar <[email protected]>
1 parent f0f3333 commit cecc6ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nav2_mppi_controller/src/trajectory_visualizer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ void TrajectoryVisualizer::add(
121121
std::sort(sorted_costs.begin(), sorted_costs.end());
122122

123123
// Use 10th and 90th percentile for robust color mapping
124-
size_t idx_5th = static_cast<size_t>(sorted_costs.size() * 0.1);
125-
size_t idx_95th = static_cast<size_t>(sorted_costs.size() * 0.9);
124+
size_t idx_10th = static_cast<size_t>(sorted_costs.size() * 0.1);
125+
size_t idx_90th = static_cast<size_t>(sorted_costs.size() * 0.9);
126126

127-
float min_cost = sorted_costs[idx_5th];
128-
float max_cost = sorted_costs[idx_95th];
127+
float min_cost = sorted_costs[idx_10th];
128+
float max_cost = sorted_costs[idx_90th];
129129
float cost_range = max_cost - min_cost;
130130

131131
// Avoid division by zero

0 commit comments

Comments
 (0)