Hi all, 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. Cheers, David On 01/10/2011 03:20 PM, David Gossow wrote: > Hi all, > > I get the following strange behaviour when using a TransformBroadcaster: > > I've got the following code, as in the tf tutorial: > > // [this is actually a member variable of class RosMasterModule] > tf::TransformBroadcaster m_TransformBroadcaster; > > tf::Transform transform; > transform.setOrigin( tf::Vector3(0, 0, 0) ); > transform.setRotation( tf::Quaternion(0, 0, 0) ); > m_TransformBroadcaster.sendTransform(tf::StampedTransform(transform, > ros::Time::now(), "world", "turtle1")); > > When I use the code in my app's main(), everything works fine. However, > if I use it inside an object instance, the program crashes with a > segfault. Here's the backtrace: > > #0 __memcpy_ssse3 () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S:1282 > #1 0xb4fa9bde in std::basic_string, > std::allocator >::_Rep::_M_clone(std::allocator const&, > unsigned int) () from /usr/lib/libstdc++.so.6 > #2 0xb4faa4cf in std::basic_string, > std::allocator >::basic_string(std::basic_string std::char_traits, std::allocator > const&) () from > /usr/lib/libstdc++.so.6 > #3 0xb76942ee in tf::StampedTransform::StampedTransform > (this=0x8b25840) at > /tmp/buildd/ros-unstable-geometry-1.3.1/debian/ros-unstable-geometry/opt/ros/unstable/stacks/geometry/tf/include/tf/transform_datatypes.h:89 > > #4 0xb76956c8 in std::vector std::allocator > >::_M_insert_aux(__gnu_cxx::__normal_iterator std::vector > > >, tf::StampedTransform const&) () from > /opt/ros/unstable/stacks/geometry/tf/lib/libtf.so > #5 0xb7693533 in push_back (this=0x899fbe0, transform=...) at > /usr/include/c++/4.4/bits/stl_vector.h:741 > #6 tf::TransformBroadcaster::sendTransform (this=0x899fbe0, > transform=...) at > /tmp/buildd/ros-unstable-geometry-1.3.1/debian/ros-unstable-geometry/opt/ros/unstable/stacks/geometry/tf/src/transform_broadcaster.cpp:57 > > #7 0x081a6ec1 in RosMasterModule::RosMasterModule (this=0x8c5d120) at > /home/dgossow/Desktop/robbie/16/30_prog/trunk/Modules/RosMasterModule.cpp:37 > > When publishing the same topic by hand without the TransformBroadcaster, > everything works fine as well. > > Any ideas what could be the error? > > I'm Using Ubuntu 10.10 32-bit& ros-unstable (same effect on cturle). > > Cheers, > David > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > -- David Gossow | Tel: +49 261 287-2783 Universität Koblenz-Landau, ICV | Fax: +49 261 287-100-2783 Universitätsstr. 1 | http://robots.uni-koblenz.de 56070 Koblenz | Office: B307