Skip to content

Commit 54e72a2

Browse files
fixes for windows compilation (#1330) (#1333)
Co-authored-by: SENAI-GilmarCorreia <[email protected]> (cherry picked from commit fa42b5e) Co-authored-by: Gilmar Correia <[email protected]>
1 parent e3c21e5 commit 54e72a2

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

joint_trajectory_controller/include/joint_trajectory_controller/tolerances.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ double resolve_tolerance_source(const double default_value, const double goal_va
136136
// * -1 - The tolerance is "erased".
137137
// If there was a default, the joint will be allowed to move without restriction.
138138
constexpr double ERASE_VALUE = -1.0;
139-
auto is_erase_value = [](double value)
139+
auto is_erase_value = [=](double value)
140140
{ return fabs(value - ERASE_VALUE) < std::numeric_limits<float>::epsilon(); };
141141

142142
if (goal_value > 0.0)

pid_controller/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
55
add_compile_options(-Wall -Wextra)
66
endif()
77

8+
if(WIN32)
9+
add_compile_definitions(
10+
# For math constants
11+
_USE_MATH_DEFINES
12+
# Minimize Windows namespace collision
13+
NOMINMAX
14+
WIN32_LEAN_AND_MEAN
15+
)
16+
endif()
17+
818
set(THIS_PACKAGE_INCLUDE_DEPENDS
919
angles
1020
control_msgs

0 commit comments

Comments
 (0)