Ask Your Question

How to install yaml-cpp0.2.6-dev / How to install from source correctly

asked 2012-06-12 05:36:47 -0500

dinamex gravatar image

updated 2012-06-13 06:55:24 -0500

joq gravatar image

Hi Guys,

I'm not a total newbie to ROS and Ubuntu but I have a problem to install the yaml-cpp2.6-dev file.

I tried to make the uvc_camera Package and it complains about a missing dependencie of 'yaml-cpp' so i tried

$sudo apt-get yaml-cpp

but it unable to locate a package probably because of my armel architecture. Therefore i tried to compile it from source.

$ hg clone ttp://
$ mkdir build
$ cd build
$ make
$ sudo make install

everything without a failure. So i tried to make the uvc_camera package again but it's still complaining about the missing yaml-cpp?

EDIT #1: By using rosmake uvc_camera --no-rosdep it complains that camera_calibration_parsers is not installed (which is caused by the "missing" yaml2.6-dev)

EDIT #2: This is the output for rosmake camera_calibration_parsers --no-rosdep as joq suggested.

[ rosmake ] Packages requested are: ['camera_calibration_parsers']
[ rosmake ] Logging to directory/home/panda/.ros/rosmake/rosmake_output-20120613-113412
[ rosmake ] Expanded args ['camera_calibration_parsers'] to:
[rosmake-1] Starting >>> camera_calibration_parsers [ make ]
[ rosmake ] Last 40 linesmera_calibration_parsers... [ 1 Active 28/29 Complete ]
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:50:6: note: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:50:6: note:   no known conversion for argument 2 from ‘uint32_t {aka unsigned int}’ to ‘camera_calibration_parsers::SimpleMatrix&’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:138:44: error: ‘class YAML::Node’ has no member named ‘FindValue’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:139:31: error: no match for ‘operator>>’ in ‘* model_node >> cam_info.sensor_msgs::CameraInfo_<std::allocator<void> >::distortion_model’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:139:31: note: candidates are:
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:50:6: note: void camera_calibration_parsers::operator>>(const YAML::Node&, camera_calibration_parsers::SimpleMatrix&)
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:50:6: note:   no known conversion for argument 2 from ‘std::basic_string<char>’ to ‘camera_calibration_parsers::SimpleMatrix&’
  /usr/include/c++/4.6/complex:488:5: note: template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::complex<_Tp>&)
  /usr/include/c++/4.6/iomanip:229:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setw)
  /usr/include/c++/4.6/iomanip:199:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setprecision)
  /usr/include/c++/4.6/iomanip:169:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setfill<_CharT>)
  /usr/include/c++/4.6/iomanip:131:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setbase)
  /usr/include/c++/4.6/iomanip:100:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::_Setiosflags)
  /usr/include/c++/4.6/iomanip:70:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream ...
edit retag flag offensive close merge delete



rosmake does not recognize your hand-built version as satisfying the yaml-cpp dependency. Which ROS and Ubuntu distributions are you using?

joq gravatar imagejoq ( 2012-06-12 07:30:42 -0500 )edit

I'm using a prebuild ubuntu-oneric-11.10-server on a pandaboard together with the electric version of ROS

dinamex gravatar imagedinamex ( 2012-06-12 07:45:17 -0500 )edit

You are not doing anything wrong, just fighting tools that were not designed to work this way. Note that none of this will work in Fuerte, so we really need a better method.

joq gravatar imagejoq ( 2012-06-13 07:03:13 -0500 )edit

That's sad to here that this will not work out. I'm Using ROS Electric and not Fuerte. I tried to install the usb_cam package from the Bosch stack but the same error. It needs the yaml_cpp. Any idea how to install that right?

dinamex gravatar imagedinamex ( 2012-06-13 07:25:31 -0500 )edit

I think we can get it working for Electric, at least. I still want to know whether the #include of yaml-cpp/yaml.h in line 3 of parse_yml.cpp got resolved correctly. I can't tell from the truncated compiler errors you posted.

joq gravatar imagejoq ( 2012-06-13 08:12:02 -0500 )edit

Also, please list the version of yaml-cpp you installed. ROS used 0.2.6, the newest version appears to be 0.3.0.

joq gravatar imagejoq ( 2012-06-13 09:13:13 -0500 )edit

oh that could be a problem. because I just installed the actual one. How can I clone the old one? and uninstall the yaml0.3.0?

dinamex gravatar imagedinamex ( 2012-06-13 11:26:09 -0500 )edit

To uninstall 0.3.0, (probably) go to where you built it and run sudo make uninstall. To find 0.2.6, go to the and click on "Show all" under "Downloads".

joq gravatar imagejoq ( 2012-06-13 12:44:23 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2012-06-14 07:19:08 -0500

dinamex gravatar image

updated 2012-06-14 07:32:40 -0500

Okay I found the failure and could solve it. It turned out that the version of the yaml-cpp was important. So I downloaded the yaml-cpp0.2.6.tar.gz from unpacked it and compiled it again, which unfortunatly produces the following failure message:

In file included from /home/a3_nm/TEMP/yaml-cpp/src/emitterstate.h:9:0,
                 from /home/a3_nm/TEMP/yaml-cpp/src/emitterstate.cpp:1:
/home/a3_nm/TEMP/yaml-cpp/src/ptr_stack.h: In member function ‘void ptr_stack<T>::push(std::auto_ptr<T>)’:
/home/a3_nm/TEMP/yaml-cpp/src/ptr_stack.h:29:20: error: ‘NULL’ was not declared in this scope
make[2]: *** [CMakeFiles/yaml-cpp.dir/src/emitterstate.cpp.o] Error 1
make[1]: *** [CMakeFiles/yaml-cpp.dir/all] Error 2
make: *** [all] Error 2

I was able to fix that by adding an #include <cstddef> to ptr_stack.h and ptr_vector.h. With this, the build succeeds and make test also succeeds.

After that I was able to proceed the installation of uvc_camera (no-rosdeps). It's working but when try $ rosmake uvc_camera --rosdep-install it still wants/needs the yaml-cpp0.2.6 to install. How come that is still not detecting the installed yaml-cpp?

When launching the package it still complains about missing libraries (not found So I copied the the libyaml-cpp files from /usr/local/lib to /usr/lib .

When I launched it afterwards, it was saying that there is no permission to read the /dev/video0 . I checked it with $ls -l /dev/video* which showed me that the only rights are for the root. so I changed the group with $ sudo chown username /dev/video* and then it worked.

Sidenote: The webcam is on the Pandaboard on /dev/video2 so you need to change the launchfile at

<param name="device" type="string" value="/dev/video0" />


<param name="device" type="string" value="/dev/video2" />

Edit #1: Unfortunately, the group of /dev/video changes back to root after rebooting. no idea why... But still it works and hopefully I can save someones time with this answer.

edit flag offensive delete link more

answered 2012-06-12 07:49:27 -0500

joq gravatar image

updated 2012-06-12 10:47:54 -0500

Maybe this will work:

$ rosmake --no-rosdep uvc_camera

UPDATE: you are probably going to have to build camera_calibration_parsers and any other missing ROS dependencies (maybe camera_info_manager) the same way:

$ rosmake --no-rosdep camera_calibration_parsers
edit flag offensive delete link more



didn't work... now it complains about "camera_calibration_parsers" and this could be built because of yaml-cpp.

dinamex gravatar imagedinamex ( 2012-06-12 08:27:29 -0500 )edit

What happens when you try to build camera_calibration_parsers?

joq gravatar imagejoq ( 2012-06-12 08:58:02 -0500 )edit

WARNING: Rosdep did not detect the following system dependencies as installed: yaml-cpp Consider using --rosdep-install option or rosdep install camera_calibration_parsers. And when i try to rosdep install camera_calibration_parsers it says that need yaml-cpp0.2.6-dev which couldn't be found

dinamex gravatar imagedinamex ( 2012-06-12 09:08:02 -0500 )edit

I tried both: first rosmake --no-rosdep camera_calibration_parsers says yaml-cpp is missing. Then I tried rosmake --no-rosdep camera_info_manager which is complaining about the missing camera calibration_parser

dinamex gravatar imagedinamex ( 2012-06-13 05:10:45 -0500 )edit

Would you please paste the exact output from rosmake --no-rosdep camera_calibration_parsers into your question, adding four leading spaces to each line so it formats correctly?

joq gravatar imagejoq ( 2012-06-13 05:24:22 -0500 )edit

Thanks for the compiler errors (I deleted some of the rosmake output). Are there more compiler error messages in /home/panda/.ros/rosmake/rosmake_output-20120613-113412/camera_calibration_parsers/build_output.log ? I can't tell whether the #include &lt;yaml-cpp/yaml.h&gt; in line 3 worked or not.

joq gravatar imagejoq ( 2012-06-13 06:59:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-06-12 05:36:47 -0500

Seen: 2,690 times

Last updated: Jun 14 '12