0
$\begingroup$

Rosanswers logo

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://code.google.com/p/yaml-cpp/
$ mkdir build
$ cd build
$ cmake -DBUILD_SHARED_LIBS=ON ..
$ 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:
['camera_calibration_parsers']
[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<_CharT, _Traits>&, std::_Resetiosflags)
  /usr/include/c++/4.6/istream:761:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char*)
  /usr/include/c++/4.6/istream:756:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char*)
  /usr/include/c++/4.6/istream:714:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, signed char&)
  /usr/include/c++/4.6/istream:709:5: note: template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(std::basic_istream<char, _Traits>&, unsigned char&)
  /usr/include/c++/4.6/bits/istream.tcc:925:5: note: template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT&)
  /usr/include/c++/4.6/bits/istream.tcc:957:5: note: template<class _CharT2, class _Traits2> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT2*)
  /usr/include/c++/4.6/bits/basic_string.tcc:998:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, std::basic_string<_CharT, _Traits, _Alloc>&)
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:148:23: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const char*) const(((const char*)"rows")) >> D_rows’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:148:23: note: candidate is:
  /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 ‘int’ to ‘camera_calibration_parsers::SimpleMatrix&’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:149:23: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const char*) const(((const char*)"cols")) >> D_cols’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:149:23: note: candidate is:
  /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 ‘int’ to ‘camera_calibration_parsers::SimpleMatrix&’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:153:32: error: no match for ‘operator>>’ in ‘YAML::Node::operator[](const Key&) const [with Key = int]((*(const int*)(& i))) >> cam_info.sensor_msgs::CameraInfo_<std::allocator<void> >::D.std::vector<_Tp, _Alloc>::operator[] [with _Tp = double, _Alloc = std::allocator<double>, std::vector<_Tp, _Alloc>::reference = double&, std::vector<_Tp, _Alloc>::size_type = unsigned int](((unsigned int)i))’
  /home/panda/ros_workspace/image_common/camera_calibration_parsers/src/parse_yml.cpp:153:32: note: candidate is:
  /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 ‘double’ to ‘camera_calibration_parsers::SimpleMatrix&’
  make[3]: *** [CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.o] Error 1
  make[3]: Leaving directory `/home/panda/ros_workspace/image_common/camera_calibration_parsers/build'
  make[2]: *** [CMakeFiles/camera_calibration_parsers.dir/all] Error 2
  make[2]: Leaving directory `/home/panda/ros_workspace/image_common/camera_calibration_parsers/build'
  make[1]: *** [all] Error 2
  make[1]: Leaving directory `/home/panda/ros_workspace/image_common/camera_calibration_parsers/build'
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package camera_calibration_parsers written to:
[ rosmake ]    /home/panda/.ros/rosmake/rosmake_output-20120613-113412/camera_calibration_parsers/build_output.log
[rosmake-1] Finished <<< camera_calibration_parsers [FAIL] [ 27.31 seconds ]
[ rosmake ] Halting due to failure in package camera_calibration_parsers.
[ rosmake ] Waiting for other threads to complete.
[ rosmake ] Results:
[ rosmake ] Built 29 packages with 1 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/panda/.ros/rosmake/rosmake_output-20120613-113412

Would be great to get some help and maybe an advice/lesson if i did a beginner failure.

THX


Originally posted by dinamex on ROS Answers with karma: 447 on 2012-06-12

Post score: 1


Original comments

Comment by joq on 2012-06-12:
rosmake does not recognize your hand-built version as satisfying the yaml-cpp dependency. Which ROS and Ubuntu distributions are you using?

Comment by dinamex on 2012-06-12:
I'm using a prebuild ubuntu-oneric-11.10-server on a pandaboard together with the electric version of ROS

Comment by joq on 2012-06-13:
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.

Comment by dinamex on 2012-06-13:
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?

Comment by joq on 2012-06-13:
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.

Comment by joq on 2012-06-13:
Also, please list the version of yaml-cpp you installed. ROS used 0.2.6, the newest version appears to be 0.3.0.

Comment by dinamex on 2012-06-13:
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?

Comment by joq on 2012-06-13:
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 code.google.com/p/yaml-cpp and click on "Show all" under "Downloads".

Comment by dinamex on 2012-06-13:
when I use $sudo make uninstall in the build folder (same folder where I make the yaml-cpp0.3.0) it says make: *** No rule to make target 'uninstall'. Stop. any other ideas? because to manually delete the folder would not be sufficient in my opinion.

Comment by joq on 2012-06-13:
There is nothing we can do about the lack of a proper uninstall stanza. You will have to go into wherever it was installed and sudo rm all the files by hand.

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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

Originally posted by joq with karma: 25443 on 2012-06-12

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by dinamex on 2012-06-12:
didn't work... now it complains about "camera_calibration_parsers" and this could be built because of yaml-cpp.

Comment by joq on 2012-06-12:
What happens when you try to build camera_calibration_parsers?

Comment by dinamex on 2012-06-12:
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

Comment by dinamex on 2012-06-13:
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

Comment by joq on 2012-06-13:
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?

Comment by joq on 2012-06-13:
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 <yaml-cpp/yaml.h> in line 3 worked or not.

$\endgroup$
0
$\begingroup$

Rosanswers logo

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 http://code.google.com/p/yaml-cpp/downloads/list 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 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 libyam-cpp.so.0.2). 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" />

to

<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.


Originally posted by dinamex with karma: 447 on 2012-06-14

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.