Skip to content

Commit 415a4a2

Browse files
authored
Fix passing different types to std::min in cost_functions.hpp (#3244)
1 parent b5eb4de commit 415a4a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

moveit_planners/stomp/include/stomp_moveit/cost_functions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ CostFn getCostFunctionFromStateValidator(const StateValidatorFn& state_validator
168168
const long kernel_start = mu - static_cast<long>(sigma) * 4;
169169
const long kernel_end = mu + static_cast<long>(sigma) * 4;
170170
const long bounded_kernel_start = std::max(0l, kernel_start);
171-
const long bounded_kernel_end = std::min(values.cols() - 1, kernel_end);
171+
const long bounded_kernel_end = std::min(static_cast<long>(values.cols()) - 1, kernel_end);
172172
for (auto j = bounded_kernel_start; j <= bounded_kernel_end; ++j)
173173
{
174174
costs(j) = std::exp(-std::pow(j - mu, 2) / (2 * std::pow(sigma, 2))) / (sigma * std::sqrt(2 * M_PI));

0 commit comments

Comments
 (0)