Navigation stack runs slow when installed from source

asked 2017-03-28 23:18:42 -0500

utkarshjp7 gravatar image

updated 2017-03-29 09:53:57 -0500

I need to modify the costmap_2d source code for my project. I downloaded the latest stable navigation stack source from github (v1.12.13 as of today). I copied the source code (all the navigation packages) into my workspace and compiled it by executing catkin_make -DCMAKE_BUILD_TYPE=Release.

However, when I give a goal to robot it gives me warnings Map loop missed its desired rate of ..., and robot's movement is very slow and unstable. (I do not get any warnings before giving the goal). The performance of navigation stack in general became very slow after I installed it from source.

I do not get any warning and the robot moves smoothly if I remove the navigation packages from my catkin workspace and use the packages that came with ros installation (which are also v1.12.13).

One difference between source compiled executables and the original executables (one that came with ros installation) is as follow.

file command gives different output:

Source installed executables: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=ea5a688fc0b62bec71a5a6e7ac53c4a7bb209916, not stripped

Original executables (ones that come with ros installation): ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=138405beffc40400b5633927fa54e64062834c63, stripped

Also, source compiled executables have bigger size than the corresponding original executables.

I am using ros indigo with ubuntu 14.04. Let me know if you need more information.

edit retag flag offensive close merge delete


Maybe ensure NDEBUG is set?

William gravatar image William  ( 2017-03-29 02:41:55 -0500 )edit

I think -DCMAKE_BUILD_TYPE=Release boils down to -O3 and -DNDEBUG.

utkarshjp7 gravatar image utkarshjp7  ( 2017-03-29 09:42:27 -0500 )edit

I think you're right, on the buildfarm we use build type None and NDEBUG I think:

William gravatar image William  ( 2017-03-29 14:22:13 -0500 )edit

I have tried setting the NDEBUG flag explicitly and also set the build type to None, but no improvements. Do you know exactly how does the navigation stack packages get built? using catkin_make or any other tool?

utkarshjp7 gravatar image utkarshjp7  ( 2017-03-31 00:07:30 -0500 )edit

Every build's output is publically available, here is the build of the move_base package for Kinetic on Ubuntu Xenial 64-bit:

William gravatar image William  ( 2017-03-31 00:27:45 -0500 )edit