ros indigo rviz performance displaying pointclouds 2x faster when compiled from_source
Hi there,
as we started migrating our code to indigo yesterday we had performance issues, especially when working with pointclouds. The code compiled with catkin_make runs just with 1Hz, whereas using rosbuild we achieve 30Hz. We found out, related to the following topic:
http://answers.ros.org/question/71965...
that we need to enable compiler optimization by setting catkin_make -DCMAKE_BUILD_TYPE=Release and the code runs at the expected framerate of 30Hz.
Now to the topic:
Displaying just a pointcloud from the asus xtion in rviz installed from the repository gives us a performance of 14Hz on our desktop.
- Intel i7-3770 3.4 GHz quad-core
- Nvidia GeForce GTX660
- 16GB ram
- Ubuntu 14.04 - 64bit
- ros-indigo
Knowing the above (catkin compiled code runs 3x slower) we build rviz from source with the following compiler options:
- set(CMAKE_BUILD_TYPE RelWithDebInfo)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wall -msse2 -msse3 -mssse3 -msse4 -msse4.2")
This gives us a performance of 30Hz displaying a pointcloud, resulting in a much smoother usage of rviz.
Evaluating the same on a laptop:
- Intel i7-4600M, 2.1Ghz dual core
- Intel HD Graphics 4600
- 8 GB RAM
- Ubuntu 14.04 - 64bit
- ros indigo
rviz from repository: 4Hz vs. rviz from source 9Hz
EDIT I prepared a table containing all build tests I have done:
This leads to the question: Are the ros-indigo packages really compiled with compiler optimizations turned on e.g. as Release?
Have a nice day!
Out of curiosity, did u try to set PLATFORM_CXX_FLAGS to "${CMAKE_CXX_FLAGS} -std=gnu++0x -Wall -march=native"? According to this should add the apropriate -msseN for your platform
I tried your suggestion. For results please look in my post above. Not much difference. Still faster than the repository, but as fast as without SSE optimizations turned on.
Make sense. Thanks!
Probably related to https://github.com/ros-visualization/...
Also probably related to https://github.com/ros-infrastructure...
Thanks for the links William. Seem to be related.