ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Pandaboard, alignment trap when using tf

asked 2013-08-04 20:34:24 -0500

Hiroaki gravatar image

updated 2014-01-28 17:17:32 -0500

ngrennan gravatar image

I'm running groovy on a pandaboard(ubuntu12.04). I running following program, but this program was core dumped.

 #include "tf/transform_broadcaster.h"
 #include "tf/transform_listener.h"
 int main(int argc, char **argv){
     ros::init(argc, argv, "tf");

     tf::TransformBroadcaster br;
     tf::TransformListener listener;

     while(1){
         tf::Transform transform;
         transform.setOrigin( tf::Vector3(0, 0, 0) );
         transform.setRotation(tf::Quaternion(tf::Vector3(0, 0, 0), 1));
         br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "test", "test2"));

         geometry_msgs::PoseStamped map_pos;
         geometry_msgs::PoseStamped test2_pos;

         if(listener.waitForTransform("/test", ros::Time::now(), "test2", ros::Time::now(), "/test", ros::Duration(1.0))){
             try{
                 listener.transformPose("test2", map_pos, test2_pos);
             }catch (tf::TransformException &ex) {
             }
         }
     }
 }

I got following dmsgs.

 [ 1259.359893] Alignment trap: not handling instruction ed977b00 at [<4012a290>]
 [ 1259.359924] Unhandled fault: alignment exception (0x011) at 0x00e24c07

And I used gdb and got the following backtrace.

 #0  0x4004f294 in void ros::serialization::VectorSerializer<geometry_msgs::transformstamped_<std::allocator<void> >, std::allocator<geometry_msgs::transformstamped_<std::allocator<void> > >, void>::read<ros::serialization::istream>(ros::serialization::IStream&, std::vector<geometry_msgs::transformstamped_<std::allocator<void> >, std::allocator<geometry_msgs::transformstamped_<std::allocator<void> > > >&) () from /opt/ros/groovy/lib/libtf.so
 #1  0x4004f592 in ros::SubscriptionCallbackHelperT<boost::shared_ptr<tf::tfmessage_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&) () from /opt/ros/groovy/lib/libtf.so
 #2  0x4017535e in ros::MessageDeserializer::deserialize() ()
    from /opt/ros/groovy/lib/libroscpp.so
 #3  0x4016f376 in ros::SubscriptionQueue::call() ()
    from /opt/ros/groovy/lib/libroscpp.so
 #4  0x40139070 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) ()
    from /opt/ros/groovy/lib/libroscpp.so
 #5  0x4013a00e in ros::CallbackQueue::callAvailable(ros::WallDuration) ()
    from /opt/ros/groovy/lib/libroscpp.so
 #6  0x4004b8f8 in tf::TransformListener::dedicatedListenerThread() ()
    from /opt/ros/groovy/lib/libtf.so
 #7  0x4004b654 in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void,="" tf::transformlistener="">, boost::_bi::list1<boost::_bi::value<tf::transformlistener*> > > >::run() () from /opt/ros/groovy/lib/libtf.so
 #8  0x403c6602 in thread_proxy () from /usr/lib/libboost_thread.so.1.46.1
 #9  0x40099ed2 in start_thread ()
    from /lib/arm-linux-gnueabihf/libpthread.so.0
 #10 0x4035df18 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
 #11 0x4035df18 in ?? () from /lib/arm-linux-gnueabihf/libc.so.6
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

I tried commanding "aptitude upgrade" the day after yesterday, but still core dumped.

Any idea if this is a bug in my code or a bug in the ROS code? Or What can I do to debug this more and solve a problem?

edit retag flag offensive close merge delete

Comments

Which arm architecture; armel or armhf? Which version of roscpp_serialization do you have?

ahendrix gravatar image ahendrix  ( 2013-08-05 08:19:25 -0500 )edit

I use armhf. Version of ros_serialization is 0.3.14. Today I tried following commands and updated version of ros_serialization to 0.3.16.

roscd
cd src
git clone https://github.com/ros/roscpp_core 
cd ../
rospack profile
catkin_make
After this, shared library dependencies turned into following.
 $ ldd libtf.so  | grep serial
         libroscpp_serialization.so => /home/pandaboard/catkin_ws/devel/lib/libroscpp_serialization.so (0x40112000)
 $ ldd libroscpp.so  | grep serial
         libroscpp_serialization.so => /home/pandaboard/catkin_ws/devel/lib/libroscpp_serialization.so (0x40072000)
 $ ldd lib/tf_test/tf_test_node | grep serial
         libroscpp_serialization.so => /home/pandaboard/catkin_ws/devel/lib/libroscpp_serialization.so (0x400b1000)
But the program still core dumped.

Hiroaki gravatar image Hiroaki  ( 2013-08-05 20:30:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-08-05 07:25:33 -0500

tfoote gravatar image

There was a known issues with serialization and alignment on armhf processors. See http://answers.ros.org/question/44208/problems-with-ros-installation-on-pandaboard-with-armhf

I was under the impression it was resolved here: https://github.com/ros/roscpp_core/pull/8 but there may be another instance somewhere.

edit flag offensive delete link more

Comments

I suspect we're not detecting ARM properly in the serialization code; it looks like we should be using __arm__ instead of __arm in roscpp_serialization/include/ros/serialization.h according to http://sourceforge.net/p/predef/wiki/Architectures/

ahendrix gravatar image ahendrix  ( 2013-08-05 12:29:07 -0500 )edit

Bump. Similar issue on Groovy on an Odroid XU. Using the ahendrix repo

ICodeRaven gravatar image ICodeRaven  ( 2013-09-26 22:55:41 -0500 )edit

roscpp_serialization 0.3.16 already uses __arm and __arm__: https://github.com/ros/roscpp_core/commit/308e737885929f9923fd24e9219876c50f15681d

Dirk Thomas gravatar image Dirk Thomas  ( 2013-09-28 08:44:04 -0500 )edit
1

Just built everything from scratch (after lots of pain), and yes it works now.

ICodeRaven gravatar image ICodeRaven  ( 2013-10-01 15:13:24 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2013-08-04 20:34:24 -0500

Seen: 775 times

Last updated: Aug 05 '13