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

Arm Architecture with armhf port, Move_base Bus Error Alignment trap/exception

asked 2013-01-15 05:50:02 -0600

Raptor gravatar image

updated 2014-01-28 17:14:51 -0600

ngrennan gravatar image

Hi Everyone,

I just ran into a very nasty bug when running Move_base on a armhf (ArmHardFloatPort) ARM CPU(armv7l). I am running the latest Fuerte code on Ubuntu 12.04.

The only things I am running are roscore, move_base, and map_server. The problem happens when I send move_base a blank map. Move_base prints "Still waiting on map..." and then when I send it a map through the map_server, it immediately crashes with the following error "Program received signal SIGBUS, Bus error".

The back-trace from GDB of move_base is as follows:

[ INFO] [1358269351.739542577]: Still waiting on map...

[ INFO] [1358269352.739512061]: Still waiting on map...


Program received signal SIGBUS, Bus error.
0xb6ee27fa in ros::SubscriptionCallbackHelperT<boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&) () from /home/name/ros/navigation/costmap_2d/lib/libcostmap_2d.so
(gdb) bt
#0  0xb6ee27fa in ros::SubscriptionCallbackHelperT<boost::shared_ptr<nav_msgs::OccupancyGrid_<std::allocator<void> > const> const&, void>::deserialize(ros::SubscriptionCallbackHelperDeserializeParams const&) () from /home/name/ros/navigation/costmap_2d/lib/libcostmap_2d.so
#1  0xb6dc2d68 in ros::MessageDeserializer::deserialize() () from /opt/ros/fuerte/lib/libroscpp.so
#2  0xb6dbe2f4 in ros::SubscriptionQueue::call() () from /opt/ros/fuerte/lib/libroscpp.so
#3  0xb6d6b4e6 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/fuerte/lib/libroscpp.so
#4  0xb6d6b0ac in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/fuerte/lib/libroscpp.so
#5  0xb6da4a5a in ros::spinOnce() () from /opt/ros/fuerte/lib/libroscpp.so
#6  0xb6ebbbda in costmap_2d::Costmap2DROS::Costmap2DROS(std::string, tf::TransformListener&) ()
   from /home/name/ros/navigation/costmap_2d/lib/libcostmap_2d.so
#7  0x00000000 in ?? ()
(gdb)

The error printed out from the kernel "dmesg" is as follows:

Alignment trap: not handling instruction ed967b05 at [<b6ee27f6>]
Unhandled fault: alignment exception (0x011) at 0xb14c202f

The problem seems to be directly related to the fact that it is a armhf system. X86 systems seem to take care of alignment problems a lot better then ARM.

Based on the "/proc/cpu/alignment" file it is set to "2" which means fixup. If I send this file a "3" it will warn me of the alignment problems. Doing this and running other ROS nodes, I know it is fixing most of the alignment bugs that ROS has in it, but it is unable to fix this one for some reason.

Does anyone have any suggestions on how to fix this bug?

Thank you


UPDATE

To fix this problem, I had to edit the CMakeLists.txt file in the costmap_2d package. I added "set(ROS_BUILD_TYPE debug)" and recompiled it. Move_base now got to the point of asking for the "tf" from /base_link to /map.

Unfortunately, after I sent a static transform with the static_transform_publisher it proceeded with a similar but different bus error.

Here is the GDB back trace of the new error:

[ WARN] [1358354683.016454689]: Waiting on transform from /base_link to /map to become available before running costmap, tf error: 
[ WARN] [1358354688.094640723]: Waiting on transform from /base_link to /map to become available before running costmap, tf error: 

Program received signal ...
(more)
edit retag flag offensive close merge delete

Comments

Raptor gravatar image Raptor  ( 2013-03-05 05:59:17 -0600 )edit

There seems to be a patch that was put in, and should be released on the next spin of ros_comm. Here is the link: https://github.com/ros/roscpp_core/pull/8

Raptor gravatar image Raptor  ( 2013-03-12 04:26:37 -0600 )edit

Have you tried that patch? I haven't seen much feedback on it, I hope that means it works well ;)

po1 gravatar image po1  ( 2013-07-04 00:47:21 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2013-07-05 09:10:58 -0600

Raptor gravatar image

Unfortunately I did not try the patch. I just updated to ROS groovy and it seemed like it fixed the problem, so it is possible that the patch was released into the new code base and that fixed it.

edit flag offensive delete link more
0

answered 2017-06-06 22:10:05 -0600

Mr.Q gravatar image

Edit the CMakeLists.txt , add set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=hard -mfpu=vfp") works for me (ros indigo,ubuntu core 14.04)

edit flag offensive delete link more
0

answered 2013-02-14 04:48:53 -0600

semael23 gravatar image

updated 2013-02-25 23:12:05 -0600

Setting eveything to debug does not solve this... and changing optimization level also does not change anything correctly. It seems that it's only "luck" if changing build type solves the problem. i think its more a problem of armhf compiler alignment and ros cpp serialization. On armel everything worked fine for me, so i would guess it's the hard-float support.


Problem seems to be in de-/serialization! try to use NODELETS instead of NODES. intra-process-communictaion, makes no use of it and should work, hopefully... ;-) tried it, and it seemed to "fix" the alignment error problem.


nodelets doesn't work, too... try to use CodeSourcery Compiler with "-mno-unaligned-access"... doesn't tried it yet, but at end of the week i can tell more...

edit flag offensive delete link more

Comments

Hmmm it seems to do the trick for me. I also had everything working in armel, before I moved over to armhf to get the hard-float support. This problem really needs to be fixed for people working on an armhf system.

Raptor gravatar image Raptor  ( 2013-02-20 09:37:09 -0600 )edit

Question Tools

3 followers

Stats

Asked: 2013-01-15 05:50:02 -0600

Seen: 2,569 times

Last updated: Jun 06 '17