ROS (Robot Operating System) with SSSE3 flag

288 Views Asked by At

I started working with ROS lately and got stuck on one problem. I need to use some classes whick require SSE2, SSE3 and SSSE3 CPU extensions.

I tried to edit the manifest.xml file of my ROS Package like

<package>
  <description brief="topological_map_v1">
    topological_map_v1
  </description>
  <author>me</author>
  <license>BSD</license>
  <review status="unreviewed" notes=""/>
  <url>http://ros.org/wiki/topological_map_v1</url>

  <depend package="opencv2"/>
  <depend package="sensor_msgs"/>
  <depend package="rospy"/>
  <depend package="roscpp"/>

  <export>
     <cpp cflags="-msse2 -msse3 -mssse3 -I/ThirdParty/brisk -I/ThirdParty/brisk/agast"/>
     <intel_cpp cflags="-msse2 -msse3 -mssse3"/>
  </export>
</package>

but it didn't work!

The code worked fine in a "Not-ROS-project", but somehow the cflags seems to be ignored from the compiler.

I'm working on LinuxMint (ubuntu 12.04) with supports the chip extentions.

Where do I need to put the flags to?

1

There are 1 best solutions below

0
On

The cflags need to be add in the CMakeLists.txt file like:

rosbuild_add_executable(ImgProcEngineNode src/ros_src/rosImgProcEngine.cpp)
rosbuild_add_compile_flags(ImgProcEngineNode "-c -O3 -fmessage-length=0 -march=native -msse2 -msse3 -mssse3 -I/home/me/topological_map/topological_map_v1/src/ThirdParty/brisk -I/home/me/topological_map/topological_map_v1/src/ThirdParty/brisk/agast")