ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The problem is the ambiguity of the char datatype. On x86 gcc it defaults to signed, on ARM to unsigned. This results in negative values getting flipped.
See here: http://www.arm.linux.org.uk/docs/faqs/signedchar.php
and here: https://github.com/sbpl/sbpl/blob/master/src/include/sbpl/discrete_space_information/environment_navxythetalat.h#L61
one solution is to simply compile with the -fsigned-char
switch, forcing all chars to be signed
## Compiler flags if(CMAKE_COMPILER_IS_GNUCXX) ## signed char is default on x86 gcc, not on arm however. set(CMAKE_CXX_FLAGS "-fsigned-char") endif()