Yaml missing operators when compiling camera_calibration_parsers
Trying get ROS Kinetic up and running on a RPi (Raspbian) but this error keeps happening:
[ 86%] Building CXX object image_common/camera_calibration_parsers/CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp: In function ‘void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)’:
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:96:16: error: no match for ‘operator>>’ (operand types are ‘const YAML::Node’ and ‘int’)
node["rows"] >> rows;
^
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:96:16: note: candidate is:
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)
void operator >> (const YAML::Node& node, SimpleMatrix& m)
^
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: no known conversion for argument 2 from ‘int’ to ‘camera_calibration_parsers::SimpleMatrix&’
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:98:16: error: no match for ‘operator>>’ (operand types are ‘const YAML::Node’ and ‘int’)
node["cols"] >> cols;
^
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:98:16: note: candidate is:
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)
void operator >> (const YAML::Node& node, SimpleMatrix& m)
^
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: no known conversion for argument 2 from ‘int’ to ‘camera_calibration_parsers::SimpleMatrix&’
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:102:13: error: no match for ‘operator>>’ (operand types are ‘const YAML::Node’ and ‘double’)
data[i] >> m.data[i];
^
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:102:13: note: candidate is:
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)
void operator >> (const YAML::Node& node, SimpleMatrix& m)
^
#..............
# It's the same thing for a few hundred lines
#..............
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:216:17: note: candidate is:
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)
void operator >> (const YAML::Node& node, SimpleMatrix& m)
^
/home/pi/catkin_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:93:6: note: no known conversion for argument 2 from ‘__gnu_cxx::__alloc_traits<std::allocator<double> >::value_type {aka double}’ to ‘camera_calibration_parsers::SimpleMatrix&’
image_common/camera_calibration_parsers/CMakeFiles/camera_calibration_parsers.dir/build.make:110: recipe for target 'image_common/camera_calibration_parsers/CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o' failed
make[2]: *** [image_common/camera_calibration_parsers/CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o] Error 1
CMakeFiles/Makefile2:38323: recipe for target 'image_common/camera_calibration_parsers/CMakeFiles/camera_calibration_parsers.dir/all' failed
make[1]: *** [image_common/camera_calibration_parsers/CMakeFiles/camera_calibration_parsers.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1" failed
I've looked at this, but it doesn't look like the solution is applicable to mine (or I'm too ignorant to see how it is).
This didn't work for me either, as I still got the same error message with yaml-cpp-0.3.0 and BUILDSHAREDLIBS=ON. I didn't have to delete any cameracalibrationparsers folders, but I did remove and replace the image_common folder to no avail.
There's also this with the solution being to add
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
to CMakeLists.txt. I've tried adding it to the catkinws CMakeLists.txt and the cameracalibration_parsers CMakeLists.txt, but there wasn't any difference in the error. Basically, nothing in that thread worked for me.
Any input on this issue would be wonderful as I have no idea what the actual problem is.
Asked by Joey Tan on 2019-12-13 17:59:22 UTC
Answers
Similar issue here: https://answers.ros.org/question/64101/problem-with-yaml-when-compiling-camera_calibration_parsers/ And their solution solved the problem in my case
Asked by Ren Cattac on 2021-03-18 09:46:55 UTC
Comments
Hello! I'm facing the same issue now, so i wanted to ask if you actually found a solution on this matter.
Asked by Ren Cattac on 2021-03-14 10:49:49 UTC