Re: [ros-users] SegFault in TransformBroadcaster

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: Re: [ros-users] SegFault in TransformBroadcaster
On 01/13/2011 07:08 AM, Brian Gerkey wrote:
> On Wed, Jan 12, 2011 at 8:44 AM, David Gossow<> wrote:
>> Problem solved. I've called add_library instead of rosbuild_add_library
>> for the class where the error h
>> happened. This lead to the compiler flag -DBT_USE_DOUBLE_PRECISION being
>> missing in that part of the code, which resulted in my code and all
>> inline functions assuming float data and the externally linked code
>> assuming double data. The std::strings that caused the segfault were
>> thus overwritten by the oversized double data.
>>
>> Seems a bit dangerous to have this flag set via the manifest.xml export
>> and not checking it somehow, as everything will compile without warning
>> and then produce seemingly random errors.
> Glad to hear that you figured it out. Any suggestion on where else
> those compile flags should live?
>
>     brian.

Hi Brian,

it would be nice to not having to define this as a compiler flag.
Changing that would need a bigger change to Bullet itself as it seems as
there's no central header where you could define that.

What we could ask the Bullet developers for:
* Require that either BT_USE_DOUBLE_PRECISION or BT_USE_SINGLE_PRECISION
be defined in all Bullet headers that make use of it.
* Have a central header where this constant is defined

What we could do on ROS side:
* Check in the packages directly depending on Bullet (e.g. tf) that
BT_USE_DOUBLE_PRECISION is set. That's kind of a hack, however.
* Patch the Bullet headers so BT_USE_DOUBLE_PRECISION is forced.

All not excessively nice solutions, however that's the best I can come
up with.

Cheers,
David