Coder Social home page Coder Social logo

Comments (4)

YoshuaNava avatar YoshuaNava commented on July 30, 2024

Solution:
I discovered that my CPU doesn't have SSSE3 (It has SSE1, SSE2 and SSE3), and that it was being included in the CMakeLists.txt files in rpg_vikit/vikit_common/ and fast/ libraries folders. In order to be able to compile vikit and fast, and be able to execute their code on my SSE3-CPU, I changed the compilation directives for gcc on both CMakeLists.txt files, from:

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx -msse -msse -msse2 -msse3 -mssse3")

to:

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx -msse -msse -msse2 -msse3")

Also, I discovered that the patch_score.h file in rpg_vikit/vikit_common/include/vikit has an error in the 14th line. In the following block of code:
#if SSE2
#include <tmmintrin.h
#endif
it validates the availability of SSE2, but includes tmmintrin.h, which is a library for optimizing code with SSSE3, when it sould include pmmintrin.h, which is a library for optimizing code with SSE2. (It validates the availability of SSE2 to include SSSE3 without validating the availability of SSSE3)

I hope this helps.

References:
http://en.wikipedia.org/wiki/SSSE3
http://stackoverflow.com/questions/6981327/illegal-instruction-while-compiling-with-g
http://stackoverflow.com/questions/11228855/header-files-for-simd-intrinsics
http://stackoverflow.com/questions/8149132/why-is-my-sse-not-faster-than-c-c-code
http://superuser.com/questions/397801/installing-valgrind-on-ubuntu
http://docs.oracle.com/cd/E24457_01/html/E21991/gliwk.html

from rpg_svo.

cfo avatar cfo commented on July 30, 2024

Hi Yoshua,
thank you very much for sharing your solution! I hope I find time this week to address this. If you want you can also send a pull request.
Best,
Christian

from rpg_svo.

YoshuaNava avatar YoshuaNava commented on July 30, 2024

@cfo:
Sorry for the delay. Over the past months I wasn't able to continue working on this topic. Yesterday I started again.

I have made a list of CMakeLists.txt files that include the "-mssse3" directive by default:
rpg_svo/svo/CMakeLists.txt
vikit_common/svo/CMakeLists.txt
fast/CMakeLists.txt

Also, I have been working on validating the availability of the SSSE3 instruction set in the CMakeLists.txt file, inspired on the following CMake macro: https://gist.github.com/hideo55/5642892. Here is the code:

IF(DEFINED ENV{ARM_ARCHITECTURE})
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -march=armv7-a")
ELSE()
# Begin. SSSE3 Instruction Set availability validation. Inspired on https://gist.github.com/hideo55/5642892
  IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
    EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
    STRING(REGEX REPLACE "^.*(ssse3).*$" "¥¥1" SSE_THERE ${CPUINFO})
    STRING(COMPARE EQUAL "ssse3" "${SSE_THERE}" SSSE3_TRUE)
    IF (SSSE3_TRUE)
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx -msse -msse -msse2 -msse3 -mssse3")
    ELSE (SSSE3_TRUE)
        MESSAGE(STATUS "Could not find support for SSSE3 on this machine.")
        SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx -msse -msse -msse2 -msse3")
    ENDIF (SSSE3_TRUE)
  ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Windows")
    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx -msse -msse -msse2 -msse3")
  ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# End. SSSE3 Instruction Set availability validation.
ENDIF()

For now, it only detects SSSE3 in Linux, and compiles directly without SSSE3 in Windows (as I can't use "/proc/cpuinfo" in WIndows). I haven't made a pull request because:

  1. I haven't been able to test it on an SSSE3-enabled machine.
  2. I don't know if any other validation could be useful. Would you like me to validate other intruction sets or any other aspect of the environment?

Thank you very much.
Best regards,
Yoshua Nava.

from rpg_svo.

Saums avatar Saums commented on July 30, 2024

Even I'm having trouble running the given dataset. Is there a specific folder where the .launch file is expected to be saved?

When I run the following command error occurs.
roslaunch svo_ros test_rig3.launch

Error specifies that it can't find svo_ros or test_rig3.launch.

from rpg_svo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.