Skip to content

Commit

Permalink
Fix windows issue in kinematics_limits.h with using eigen array max a…
Browse files Browse the repository at this point in the history
…nd min
  • Loading branch information
Levi-Armstrong committed Jun 8, 2024
1 parent 64206b4 commit bd58a0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tesseract_common/cmake/tesseract_common-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(CMakeFindDependencyMacro)
find_dependency(Eigen3)
find_dependency(TinyXML2)
find_dependency(yaml-cpp)
find_dependency(Boost COMPONENTS system filesystem serialization)
find_dependency(Boost COMPONENTS system filesystem serialization @TESSERACT_BACKTRACE_COMPONENT@)
find_dependency(console_bridge)

if(NOT TARGET console_bridge::console_bridge)
Expand Down
6 changes: 3 additions & 3 deletions tesseract_common/include/tesseract_common/kinematic_limits.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ bool satisfiesLimits(const Eigen::Ref<const Eigen::Matrix<FloatType, Eigen::Dyna

auto lower_diff_abs = (p - l0).abs();
auto lower_diff = (lower_diff_abs <= md);
auto lower_relative_diff = (lower_diff_abs <= mrd * p.abs().max(l0.abs()));
auto lower_relative_diff = (lower_diff_abs <= mrd * (p.abs().max)(l0.abs()));
auto lower_check = p > l0 || lower_diff || lower_relative_diff;

auto upper_diff_abs = (p - l1).abs();
auto upper_diff = (upper_diff_abs <= md);
auto upper_relative_diff = (upper_diff_abs <= mrd * p.abs().max(l1.abs()));
auto upper_relative_diff = (upper_diff_abs <= mrd * (p.abs().max)(l1.abs()));
auto upper_check = p < l1 || upper_diff || upper_relative_diff;

return (lower_check.all() && upper_check.all());
Expand Down Expand Up @@ -146,7 +146,7 @@ template <typename FloatType>
void enforceLimits(Eigen::Ref<Eigen::Matrix<FloatType, Eigen::Dynamic, 1>> values,
const Eigen::Ref<const Eigen::Matrix<FloatType, Eigen::Dynamic, 2>>& limits)
{
values = values.array().min(limits.col(1).array()).max(limits.col(0).array());
values = ((values.array().min)(limits.col(1).array()).max)(limits.col(0).array());
}
} // namespace tesseract_common

Expand Down

0 comments on commit bd58a0f

Please sign in to comment.