Closed walchko closed 12 years ago
Needed to add namespace: std::isnan() and needed to add rosbuild_link_boost(imu_filter signals) to CMakeLists.txt. Diff
[kevin@tardis imu_filter_madgwick]$ git diff diff --git a/imu_filter_madgwick/CMakeLists.txt b/imu_filter_madgwick/CMakeLists index f0ae3a6..662bb22 100644 --- a/imu_filter_madgwick/CMakeLists.txt +++ b/imu_filter_madgwick/CMakeLists.txt @@ -16,6 +16,7 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) # create imu_filter library rosbuild_add_library (imu_filter src/imu_filter.cpp) +rosbuild_link_boost(imu_filter signals) # create imu_filter_nodelet library rosbuild_add_library (imu_filter_nodelet src/imu_filter_nodelet.cpp) diff --git a/imu_filter_madgwick/src/imu_filter.cpp b/imu_filter_madgwick/src/im index 7f5c11e..5c13246 100644 --- a/imu_filter_madgwick/src/imu_filter.cpp +++ b/imu_filter_madgwick/src/imu_filter.cpp @@ -163,7 +163,7 @@ void ImuFilter::madgwickAHRSupdate( float _2q0mx, _2q0my, _2q0mz, _2q1mx, _2bx, _2bz, _4bx, _4bz, _2q0, _2q1 // Use IMU algorithm if magnetometer measurement invalid (avoids NaN in - if(isnan(mx) || isnan(my) || isnan(mz)) + if(std::isnan(mx) || std::isnan(my) || std::isnan(mz)) { madgwickAHRSupdateIMU(gx, gy, gz, ax, ay, az, dt); return;
Fixed. Thank you for the ticket.
Needed to add namespace: std::isnan() and needed to add rosbuild_link_boost(imu_filter signals) to CMakeLists.txt. Diff