Skip to content

Commit

Permalink
Fixed compilation with OSX 10.8 (std::isnan, Issue #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin Hornung committed Apr 8, 2013
1 parent f19a23d commit 77a7501
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion octomap/src/compare_octrees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <string.h>
#include <stdlib.h>
#include <list>
#include <cmath>

using std::cout;
using std::endl;
Expand Down Expand Up @@ -126,7 +127,7 @@ int main(int argc, char** argv) {
else
kld +=log(p1/p2)*p1 + log((1-p1)/(1-p2))*(1-p1);

if (isnan(kld)){
if (std::isnan(kld)){

This comment has been minimized.

Copy link
@wjwwood

wjwwood Jun 5, 2013

I ran into this today on Groovy, do you plan to release this fix into Groovy?

This comment has been minimized.

Copy link
@ahornung

ahornung Jun 6, 2013

Member

@wjwwood: I just backported that fix to the v1.5-fixes branch for the next release into ROS Groovy. Is that all that's required, or will octomap 1.5 need other fixes as well (in order to minimize the release effort)?

This comment has been minimized.

Copy link
@wjwwood

wjwwood Jun 6, 2013

It seems to compile here with this fix, I haven't run it recently though.

This comment has been minimized.

Copy link
@ahornung

ahornung Jun 10, 2013

Member

OctoMap 1.5.6 released with the fix, build for groovy pending in pull request ros/rosdistro#995

This comment has been minimized.

Copy link
@wjwwood

wjwwood Jun 10, 2013

@ahornung Thanks!

OCTOMAP_ERROR("KLD is nan! KLD(%f,%f)=%f; sum = %f", p1, p2, kld, kld_sum);
exit(-1);
}
Expand Down

0 comments on commit 77a7501

Please sign in to comment.