tu-darmstadt-ros-pkg / hector_localization

The hector_localization stack is a collection of packages, that provide the full 6DOF pose of a robot or platform.
83 stars 61 forks source link

Building on OSX Yosemite #9

Open kunalgrover05 opened 9 years ago

kunalgrover05 commented 9 years ago

Hi, I am unable to build Hector localization on Yosemite. One of the errors faced was the sincos use which was easily bypassed by the __sincos function in OSX.

Another issue faced is an error in a Macro which seems fine, any clues on how to make it work with OSX? http://pastebin.com/Qxcv2QNg

Any pointers would be great.

AbdealiLoKo commented 8 years ago

Could you try to change SYSTEM_MODEL_TRAIT(Derived, _VectorDimension, _CovarianceDimension) to SYSTEM_MODEL_TRAIT(Derived, _VectorDimension, _CovarianceDimension);

wherever SYSTEM_MODEL_TRAIT is used ? (Notice that I added a semicolon at the end.

And which compiler do you use ?

AbdealiLoKo commented 8 years ago

If this doesnt work, I notice that the SYSTEM_MODEL_TRAIT is only used in 2 places. You could simply remove the #define and copy the typedef and enum lines in both the locations. i.e. as the compiler is unable to understand it, you simply do it's preprocessing job for it ;)

kunalgrover05 commented 8 years ago

Seems the error was something else. There is a struct named traits in model.h and the namespace in this code was also traits, renaming that fixed the issue and I was able to build.