Giter Site home page Giter Site logo

image_common's People

Contributors

aadityasaraiya avatar ahcorde avatar bulwahn avatar chapulina avatar clalancette avatar cursedrock17 avatar garyservin avatar gbiggs avatar herr-biber avatar ijnek avatar jack-oquin avatar jacobperron avatar jspricke avatar kartikmohta avatar ktossell avatar lucasw avatar marcoag avatar martin-idel avatar mikaelarguedas avatar mikeferguson avatar mintar avatar mjcarroll avatar paudrow avatar rebecca-butler avatar robotechvision avatar seanyen avatar sloretz avatar vrabaud avatar wep21 avatar wjwwood avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

image_common's Issues

[ros2] Remapping arguments passed to node constructor are ignored

If I pass a remapping argument to a node's constructor like this:

node_ = rclcpp::Node::make_shared(..., "old_topic:=new_topic", ...);

And then create a publisher like this:

auto pub = image_transport::create_publisher(node_, "old_topic");

I'd expect the publisher to publish on new_topic, but it publishes on old_topic.

I've written a failing test on https://github.com/chapulina/image_common/commit/403b8c2013523a3a87bb40783c5a91e4c5b22a79

I got some weird error..

when I tried to run following command,
rosrun camera_calibration_parsers convert ost.ini cal.yml

I got the result like this,
terminate called after throwing an instance of 'boost::filesystem::filesystem_error'
what(): boost::filesystem::create_directory: No such file or directory
Aborted (core dumped)

and I don't know what happen and how to fix it.... I google for an hour to find any similar issues but I couldn't find anything and I"m really beginner of ROS and Linux.... So could you anybody help me to solve this problem?
When I tried the command first, it worked. but after weekends, it doesn't work anymore..

camera_calibration_parsers failing on opencv (2.4.9) yml cal file

Using calibration.cpp from the opencv 2.4.9 samples I get the below cal file. camera_calibration_parsers fails when reading this (I believe because all the expected fields aren't there).

-- error message
$ rosrun camera_calibration_parsers convert opencv_cal.yml cal.ini
[ERROR] [1414461553.365594472]: Exception parsing YAML camera calibration:
yaml-cpp: error at line 0, column 0: bad conversion
[ERROR] [1414461553.365688821]: Failed to parse camera calibration from file [opencv_cal.yml]
[ERROR] [1414461553.365757488]: Failed to load camera model from file opencv_cal.yml

-- cal file
%YAML:1.0
calibration_time: "Mon Oct 27 20:27:45 2014"
image_width: 640
image_height: 360
board_width: 4
board_height: 11
square_size: 1.
flags: 0
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 5.4518782107760103e+02, 0., 3.3949807779434110e+02, 0.,
5.4093187118613309e+02, 1.8137910120437101e+02, 0., 0., 1. ]
distortion_coefficients: !!opencv-matrix
rows: 5
cols: 1
dt: d
data: [ -5.3510759228546356e-01, 3.6901610613018992e-01,
1.4705016748743088e-02, -3.3927528664456272e-03,
-1.2799060009168317e-01 ]
avg_reprojection_error: 4.4247810453160386e-01

Loading camera info from remote machine

Is there any way load camera info from a remote machine? For example, we have several cameras connected to secondary devices (eg nvidia tx1 or raspi), but most of our code and the roslaunch files are on a primary machine.

I'd like to have the the camera calibrations on the primary machine, but it seems like camera_info_manager's URI method requires the calibrations be on the same physical machine as the camera node process.

Python3 compatibility

Hey,

Similarly to this issue in cv_bridge, this package is not python3 compatible. The lines which assume python 2.7 are here. I'll leave more details in the cv_bridge issue.

Best regards,
Hans

Missing catkin-dependency from info-manager to calibration-parsers

The camera_info_manager includes and links against libraries from camera_calibration_parsers. However, there is no corresponding dependency added to the catkin_package-call.
Adding this dependency caused a linker error in a dependent package (cv_camera) with my cross-compilation build.

image_transport::ImageTransport throwing *** stack smashing detected ***

Hello,

When used Ubuntu Software Manger to update, it appears to have updated ROS. I know for a separate issue there's a certain .so file that was updated which is breaking something unrelated.

For this issue, if I simply try to run image_transport::ImageTransport it(nh);, I get the following error:

*** stack smashing detected ***: my/path/to/executable terminated

My guess is something is wrong internally with ImageTransport; what should I do?

Several camera info managers

If I create two camera info managers in the same place of my program/ in the same node and I want to be able to set camera info for each of two cameras (left and right), i. e. use service left/set_camera_info and right/set_camera_info, how do I add this /left or /right namespace?

ros::NodeHandle &nh = getNodeHandle();
camera_info_manager::CameraInfoManager(nh, left_name, left_camera_info_url) left;
camera_info_manager::CameraInfoManager(nh, right_name, right_camera_info_url) right;

simple advertise throws illegal instruction on i586

I am running ros fuerte on roboard-100 with linux ubuntu-10.04 LTS. The roboard is a i596 processor.When I call pub = it.advertise("image_raw", 1); from camera_umd stack this calls throws an illegal instruction. Works fine from i686 computer.

tone down camera_calibration_parsers error logging

It would help for camera_calibration_parsers not to complain so loudly when the calibration file being read does not exist:

Unable to open camera calibration file

This happens normally with camera_info_manager before a camera has been calibrated, and logging it as an error confuses users by making it look like a serious problem.

I don't want to eliminate error logging completely, because the API only returns true or false, so log messages are needed to determine what went wrong.

But, at least the open error should be dialed back to a warning or even an info message, because it is usually not a problem.

Parse errors and write errors should still be treated seriously.

On Mac, `camera_calibration_parsers_wrapper` cannot be imported in python

The library camera_calibration_parser_wrapper on Mac is built as camera_calibration_parsers_wrapper.dylib, but python only imports packages with the extension .so.

I believe this can be fixed by setting the suffix explicitly, by e.g.

set_target_properties(${package_name}_wrapper PROPERTIES SUFFIX ".so")

Compare line 97 in the CMakeLists file for tf2_py, https://github.com/ros/geometry2/blob/melodic-devel/tf2_py/CMakeLists.txt. Will test and attach a PR if it works.

List transports not discovering plugins

I've got shadow-fixed debs for ros-groovy-image-common (1.9.22) and ros-groovy-image-transport-plugins (1.8.12) installed, but the image transport mechanism is not discovering the plugins.

Subsequently, it seems the non-raw transports are never getting created.

Is this a bug?

> rospack find compressed_image_transport
/opt/ros/groovy/share/compressed_image_transport
> rosrun image_transport list_transports
Declared transports:
image_transport/raw

Details:
----------
"image_transport/raw"
 - Provided by package: image_transport
 - Publisher: This is the default publisher. It publishes the Image as-is on the base topic.
 - Subscriber: This is the default pass-through subscriber for topics of type sensor_msgs/Image.
snorri@snorriheim:~$ date
Sat Dec 29 01:16:49 KST 2012

Compressed image transport segmentation fault with OpenCV.

See issue here: http://answers.ros.org/question/228385/compressed_image_transport-segmentation-fault/

Client side:
OS: Ubuntu 14.04
ROS Indigo
OpenCV version 3.1.0

Server side:
RaspberryPi + ROS Indigo

I think the image_transport and its plugins are installed with the Indigo, not sure what version exactly.
The problem is ONLY with compressed image, raw image works.

Source code on client side:
camera_reader.tar.gz

Here is a sample bag file of compressed video topic:
camera_compressed.bag.tar.gz

camera_info - image sync bug

I've noticed that the sequence numbers of the camera_info and image topcis advertised by an image_transport::CameraPublisher get out of sync when one subscribes to the camera_info topic but not to the image topic. This does not occur when one subscribes to the image topic topic but not to the camera_info. The sequence number should be incremenent when either topic or both topics are subscribed to (not only when the image topic is subscribed to).

The bug is easy to reproduce using rostopic echo /camera/image (or /camera/camera_info).

Segmentation fault with command rosrun image_transport_tutorial my_publisher

I was following this tutorial at http://wiki.ros.org/image_transport/Tutorials/PublishingImages and ran this command:

rosrun --prefix 'gdb -ex run --args' image_transport_tutorial my_publisher ~/ros_catkin_ws/image.jpg

The errors are:

Reading symbols from /opt/ros/kinetic/lib/image_transport_tutorial/my_publisher...(no debugging symbols found)...done.
Starting program: /opt/ros/kinetic/lib/image_transport_tutorial/my_publisher /home/pi/ros_catkin_ws/image.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Cannot access memory at address 0x0

Program received signal SIGILL, Illegal instruction.
0x6b58fde8 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) continue
Continuing.
Cannot access memory at address 0x0

Program received signal SIGSEGV, Segmentation fault.
0x6c976678 in ?? () from /usr/lib/arm-linux-gnueabihf/libQtGui.so.4
(gdb) continue
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.

Does anyone have ways to run my_publisher?

camera_info_manager: don't treat catkin_INCLUDE_DIRS as system-dir

I was installing ROS indigo (desktop-full) on a Fedora23 machine, following the "Installing from source" guide. I got the following error for the camera_info_manager package (full output):

[kb0n@kb0n-macfed catkin_ws]$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-std=gnu++03 -DCMAKE_C_FLAGS=-std=gnu++03 --install-space /opt/ros/indigo --pkg camera_info_manager
Base path: /home/kb0n/ros/catkin_ws
Source space: /home/kb0n/ros/catkin_ws/src
Build space: /home/kb0n/ros/catkin_ws/build_isolated
Devel space: /home/kb0n/ros/catkin_ws/devel_isolated
Install space: /opt/ros/indigo
Additional CMake Arguments: -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-std=gnu++03 -DCMAKE_C_FLAGS=-std=gnu++03
==> Processing catkin package: 'camera_info_manager'
==> Creating build directory: 'build_isolated/camera_info_manager'
==> Building with env: '/opt/ros/indigo/env.sh'
==> cmake /home/kb0n/ros/catkin_ws/src/image_common/camera_info_manager -DCATKIN_DEVEL_PREFIX=/home/kb0n/ros/catkin_ws/devel_isolated/camera_info_manager -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-std=gnu++03 -DCMAKE_C_FLAGS=-std=gnu++03 -G Unix Makefiles in '/home/kb0n/ros/catkin_ws/build_isolated/camera_info_manager'
-- The C compiler identification is GNU 5.1.1
-- The CXX compiler identification is GNU 5.1.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/kb0n/ros/catkin_ws/devel_isolated/camera_info_manager
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo;/opt/ros/fuerte/share/catkin/cmake/Modules;/opt/ros/fuerte
-- This workspace overlays: /opt/ros/indigo
-- Found PythonInterp: /usr/bin/python (found version "2.7.10")
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using default Python package layout
-- Found PY_em: /usr/lib/python2.7/site-packages/em.pyc
-- Using empy: /usr/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/kb0n/ros/catkin_ws/build_isolated/camera_info_manager/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.16
-- Boost version: 1.58.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/kb0n/ros/catkin_ws/build_isolated/camera_info_manager
==> make -j2 -l2 in '/home/kb0n/ros/catkin_ws/build_isolated/camera_info_manager'
Scanning dependencies of target camera_info_manager
[ 25%] Building CXX object CMakeFiles/camera_info_manager.dir/src/camera_info_manager.cpp.o
[ 50%] Linking CXX shared library /home/kb0n/ros/catkin_ws/devel_isolated/camera_info_manager/lib/libcamera_info_manager.so
[ 50%] Built target camera_info_manager
Scanning dependencies of target unit_test
[ 75%] Building CXX object CMakeFiles/unit_test.dir/tests/unit_test.cpp.o
[100%] Linking CXX executable /home/kb0n/ros/catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: In function `delete_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
unit_test.cpp:(.text+0x27f): undefined reference to `ros::console::print(ros::console::FilterBase*, log4cxx::Logger*, ros::console::levels::Level, std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)'
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: In function `expected_calibration()':
unit_test.cpp:(.text+0x8d31): undefined reference to `sensor_msgs::distortion_models::PLUMB_BOB[abi:cxx11]'
CMakeFiles/unit_test.dir/tests/unit_test.cpp.o: In function `ros::ServiceClient::deserializeFailed(std::exception const&)':
unit_test.cpp:(.text._ZN3ros13ServiceClient17deserializeFailedERKSt9exception[_ZN3ros13ServiceClient17deserializeFailedERKSt9exception]+0xf0): undefined reference to `ros::console::print(ros::console::FilterBase*, log4cxx::Logger*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
collect2: error: ld returned 1 exit status
CMakeFiles/unit_test.dir/build.make:121: recipe for target '/home/kb0n/ros/catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test' failed
make[2]: *** [/home/kb0n/ros/catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test] Error 1
CMakeFiles/Makefile2:1001: recipe for target 'CMakeFiles/unit_test.dir/all' failed
make[1]: *** [CMakeFiles/unit_test.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'camera_info_manager':
  Command '['/opt/ros/indigo/env.sh', 'make', '-j2', '-l2']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/kb0n/ros/catkin_ws/build_isolated/camera_info_manager && /opt/ros/indigo/env.sh make -j2 -l2

Command failed, exiting.

The CFLAGS/CXXFLAGS didn't make any difference.
After intensive testing, it turns out that line 15 in CMakeLists.txt was the culprit:

include_directories(SYSTEM ${catkin_INCLUDE_DIRS})

Removing SYSTEM fixed it for me.

Failure with distortion parameters

Hi,

the converter fails when converting from ini to yaml when the calibration was performed with k > 3 (k is the number of distortion parameters to optimize).

The error looks like:

[ERROR] [1432321037.860901266]: Failed to load camera model from file left.ini

When removing the additional distortion parameters from the ini file, it works just fine.

Hernan

recent yaml-cpp releases require C++11 ==> compile error on macos

It seems recent yaml-cpp releases require C++11, leading to compile errors for camera_calibration_parsers on OSX, as the current version on homebrew is 0.6.2.

Switching back to the previous version of yaml-cpp (which was still installed) works around the issue.

brew switch yaml-cpp 0.5.3

compile error:

[camera_calibration_parsers:make] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -DHAVE_NEW_YAMLCPP -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"camera_calibration_parsers\" -Dcamera_calibration_parsers_EXPORTS -I/Users/demmeln/work/ros/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/include -I/opt/ros/lunar/include -I/opt/ros/lunar/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -I/usr/local/include -I/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/yaml-cpp/0.6.2/include  -O3 -DNDEBUG -fPIC   -o CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o -c /Users/demmeln/work/ros/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp
[camera_calibration_parsers:make] In file included from /Users/demmeln/work/ros/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:38:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/yaml.h:10:
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/parser.h:41:3: warning: explicit conversion functions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   explicit operator bool() const;
[camera_calibration_parsers:make]   ^~~~~~~~
[camera_calibration_parsers:make] In file included from /Users/demmeln/work/ros/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:38:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/yaml.h:14:
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:100:47: error: a space is required between consecutive right angle brackets (use '> >')
[camera_calibration_parsers:make]     const T&, typename disable_if<is_numeric<T>>::type* = 0) {
[camera_calibration_parsers:make]                                               ^~
[camera_calibration_parsers:make]                                               > >
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:112:50: error: a space is required between consecutive right angle brackets (use '> >')
[camera_calibration_parsers:make]     const T& key, typename enable_if<is_numeric<T>>::type* = 0) {
[camera_calibration_parsers:make]                                                  ^~
[camera_calibration_parsers:make]                                                  > >
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:123:11: error: exception specification of overriding function is more lax than base version
[camera_calibration_parsers:make]   virtual ~Exception() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]           ^
[camera_calibration_parsers:make] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdexcept:93:13: note: overridden virtual function is here
[camera_calibration_parsers:make]     virtual ~runtime_error() _NOEXCEPT;
[camera_calibration_parsers:make]             ^
[camera_calibration_parsers:make] In file included from /Users/demmeln/work/ros/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:38:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/yaml.h:14:
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:123:23: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~Exception() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                       ^
[camera_calibration_parsers:make]                       ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:125:33: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   Exception(const Exception&) = default;
[camera_calibration_parsers:make]                                 ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:148:45: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   ParserException(const ParserException&) = default;
[camera_calibration_parsers:make]                                             ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:149:29: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~ParserException() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                             ^
[camera_calibration_parsers:make]                             ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:156:61: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   RepresentationException(const RepresentationException&) = default;
[camera_calibration_parsers:make]                                                             ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:157:37: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~RepresentationException() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                                     ^
[camera_calibration_parsers:make]                                     ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:165:41: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   InvalidScalar(const InvalidScalar&) = default;
[camera_calibration_parsers:make]                                         ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:166:27: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~InvalidScalar() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                           ^
[camera_calibration_parsers:make]                           ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:175:37: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   KeyNotFound(const KeyNotFound&) = default;
[camera_calibration_parsers:make]                                     ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:176:25: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~KeyNotFound() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                         ^
[camera_calibration_parsers:make]                         ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:184:30: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~TypedKeyNotFound() YAML_CPP_NOEXCEPT {}
[camera_calibration_parsers:make]                              ^
[camera_calibration_parsers:make]                              ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:183:35: error: member initializer 'key' does not name a non-static data member or base class
[camera_calibration_parsers:make]       : KeyNotFound(mark_, key_), key(key_) {}
[camera_calibration_parsers:make]                                   ^~~~~~~~~
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:199:37: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   InvalidNode(const InvalidNode&) = default;
[camera_calibration_parsers:make]                                     ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:200:25: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~InvalidNode() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                         ^
[camera_calibration_parsers:make]                         ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:207:41: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   BadConversion(const BadConversion&) = default;
[camera_calibration_parsers:make]                                         ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:208:27: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~BadConversion() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                           ^
[camera_calibration_parsers:make]                           ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:221:43: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   BadDereference(const BadDereference&) = default;
[camera_calibration_parsers:make]                                           ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:222:28: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~BadDereference() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                            ^
[camera_calibration_parsers:make]                            ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:229:39: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   BadSubscript(const BadSubscript&) = default;
[camera_calibration_parsers:make]                                       ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:230:26: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~BadSubscript() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                          ^
[camera_calibration_parsers:make]                          ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:237:37: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   BadPushback(const BadPushback&) = default;
[camera_calibration_parsers:make]                                     ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:238:25: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~BadPushback() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                         ^
[camera_calibration_parsers:make]                         ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:245:33: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   BadInsert(const BadInsert&) = default;
[camera_calibration_parsers:make]                                 ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:246:23: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~BadInsert() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                       ^
[camera_calibration_parsers:make]                       ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:253:47: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   EmitterException(const EmitterException&) = default;
[camera_calibration_parsers:make]                                               ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:254:30: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~EmitterException() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                              ^
[camera_calibration_parsers:make]                              ;
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:260:29: warning: defaulted function definitions are a C++11 extension [-Wc++11-extensions]
[camera_calibration_parsers:make]   BadFile(const BadFile&) = default;
[camera_calibration_parsers:make]                             ^
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/exceptions.h:261:21: error: expected ';' at end of declaration list
[camera_calibration_parsers:make]   virtual ~BadFile() YAML_CPP_NOEXCEPT;
[camera_calibration_parsers:make]                     ^
[camera_calibration_parsers:make]                     ;
[camera_calibration_parsers:make] In file included from /Users/demmeln/work/ros/ros-install-osx/lunar_desktop_full_ws/src/image_common/camera_calibration_parsers/src/parse_yml.cpp:38:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/yaml.h:17:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/node/impl.h:11:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/node/iterator.h:13:
[camera_calibration_parsers:make] In file included from /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/node/detail/iterator.h:13:
[camera_calibration_parsers:make] /usr/local/Cellar/yaml-cpp/0.6.2/include/yaml-cpp/node/detail/node_iterator.h:40:43: error: a space is required between consecutive right angle brackets (use '> >')
[camera_calibration_parsers:make] typedef std::vector<std::pair<node*, node*>> node_map;
[camera_calibration_parsers:make]                                           ^~
[camera_calibration_parsers:make]                                           > >
[camera_calibration_parsers:make] fatal error: too many errors emitted, stopping now [-ferror-limit=]
[camera_calibration_parsers:make] 14 warnings and 20 errors generated.
[camera_calibration_parsers:make] make[2]: *** [CMakeFiles/camera_calibration_parsers.dir/src/parse_yml.cpp.o] Error 1
[camera_calibration_parsers:make] make[1]: *** [CMakeFiles/camera_calibration_parsers.dir/all] Error 2
[camera_calibration_parsers:make] make: *** [all] Error 2

image_transport doesn't work inside vectors

Hello,

I made a wrapper class "ImageBus" around image_transport that can subscribe to images using the normal callback and cv_bridge method, and it also can publish images.

This works perfectly fine until I put many ImageBus objects within a vector. Then, the callback doesn't work, and it appears to be because the member variables (the topic and encoding type) are erased.

Is this a bug with image_transport, something I don't understand about user-made classes, or possibly something else?

Thanks,
Nathan

Issue compiling image_transport on Fedora 28

I'm having some issues compiling image_transport version 1.11.13-0 on Fedora 28.

The problem is a long soup of template issues, but boils down to:

Repos/ros_catkin_ws/src/image_common/image_transport/src/camera_subscriber.cpp:112:64:   required from here
Repos/ros_catkin_ws/install_isolated/include/message_filters/synchronizer.h:358:14: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<’
     this->add<i>(evt);

I'm not sure what information is necessary to fix this issue. It seems that some flags to GCC has changed as I did not have any problem compiling image_transport on Fedora 27.

Parameters from CMake:

-- The C compiler identification is GNU 8.0.1
-- The CXX compiler identification is GNU 8.0.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX:  Repos/ros_catkin_ws/devel_isolated/image_transport
-- Using CMAKE_PREFIX_PATH:  Repos/ros_catkin_ws/install_isolated
-- This workspace overlays:  Repos/ros_catkin_ws/install_isolated
-- Found PythonInterp: /usr/bin/python (found version "2.7.14") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using default Python package layout
-- Found PY_em: /usr/lib/python2.7/site-packages/em.pyc  
-- Using empy: /usr/lib/python2.7/site-packages/em.pyc
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR:  Repos/ros_catkin_ws/build_isolated/image_transport/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.11
-- Boost version: 1.66.0
-- Configuring done
-- Generating done
-- Build files have been written to: Repos/ros_catkin_ws/build_isolated/image_transport

libcamera_info_manager.so: undefined reference to `camera_calibration_parsers::readCalibration

Trying to compile camera_info_manager on Raspberry Pi (Raspbian) from source but receiving undefined reference - see below.

$ catkin_make_isolated --pkg camera_info_manager --install
....
==> Processing catkin package: 'camera_info_manager'
==> Building with env: '/home/ilagi/ros_catkin_ws/install_isolated/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmake_check_build_system in '/home/ilagi/ros_catkin_ws/build_isolated/camera_info_manager'
==> make -j1 -l1 in '/home/ilagi/ros_catkin_ws/build_isolated/camera_info_manager'
[ 33%] Built target camera_info_manager
[ 66%] Built target gtest
Linking CXX executable /home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test
/home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/libcamera_info_manager.so: undefined reference to camera_calibration_parsers::readCalibration(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, sensor_msgs::CameraInfo_<std::allocator<void> >&)' /home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/libcamera_info_manager.so: undefined reference tocamera_calibration_parsers::writeCalibration(std::basic_string<char, std::char_traits, std::allocator > const&, std::basic_string<char, std::char_traits, std::allocator > const&, sensor_msgs::CameraInfo_std::allocator const&)'
collect2: ld returned 1 exit status
make[2]: *** [/home/ilagi/ros_catkin_ws/devel_isolated/camera_info_manager/lib/camera_info_manager/unit_test] Error 1
make[1]: *** [CMakeFiles/unit_test.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'camera_info_manager':
Command '/home/ilagi/ros_catkin_ws/install_isolated/env.sh make -j1 -l1' returned non-zero exit status 2

Customize set_camera_info service URL?

How do you customize the URL that that set_camera_info service is published at via the CameraInfoManager?

I'm attempting to patch the unmaintained raspicam ROS node so I can calibrate it using the camera_calibration node. However, by default it publishes its info service to /set_camera_info instead of `/camera/set_camera_info' so when I run the calibration process, it errors out with:

('Waiting for service', '/camera/set_camera_info', '...')
Service not found

I've searched through the docs but I can't find any option for setting this path.

image_transport::SubscriberFilter decodes 16bit png to 8bit

I am publishing a png compressed depth image in python via:

msg_dimg_compr = self.cvbridge.cv2_to_compressed_imgmsg(dimg, dst_format="png")

to /camera/depth/image_rect_raw/compressed, where dimg is a single channel 16bit (np.uint16) image.
This seems to work fine since manually decoding the raw data (e.g. as in PR ros-perception/vision_opencv#228) gives me the same 16bit image.

But using a image_transport::SubscriberFilter for synchronisation in C++ like:

image_transport::SubscriberFilter sub_image_depth;
sub_image_depth.subscribe(...);
sync_rgbd = message_filters::Synchronizer<ApproximateTime...>(sub_image_depth, ...);
sync_rgbd.registerCallback(sync_cb);

gives me a mono8 instead of a mono16 image in the callback:

void sync_cb(sensor_msgs::ImageConstPtr depth_img_msg, ....) {
    depth_img_msg->encoding; // <- this is "mono8" instead of "mono16"
}

This might be related to #77 and ros-perception/vision_opencv#206. I.e. images need to be decoded using the IMREAD_UNCHANGED flag.

CameraPublisher -- topic name matters?

if i advertiseCamera with the topic as 'left', the /foo/left node is the raw_image topic and camera_info topic is never created.
If i advertiseCamera withthe topic as 'left/image_raw', i get /foo/left/image_raw and /foo/left/camera_info, etc.

Maybe this is the expected behavior but it was non-intuitive to me.

[image_transport] ABI incompatibility?

The recent changes in image_transport between releases 1.11.4 and 1.11.5 seems to have caused an ABI incompatibility, so that code that was compiled against 1.11.4 segfaults after a system has been updated to use image_transport 1.11.5. I believe this is due to ABI changes introduced by adding virtual methods in the header files publisher_plugin.h and raw_publisher.h.
Since updating to 1.11.5 we have observed random segmentation faults in a number of components that use image_transport, including just running roslaunch openni_launch openni.launch with a Kinect connected, but also others (e.g. our own code). The backtraces always pointed to image_transport:: PublisherPlugin::advertise or in other cases to image_transport:: PublisherPlugin::publish.

I feel that it was wrong to bump just the "patch" component of the version number in this one. Could this be the reason to the problems we are observing? I have had the experience in the past that these kinds of changes lead to segmentation faults when depending projects / packages have not been recompiled.

No name resolution of base topic in image_transport::Subscriber

image_transport::Subscriber does not resolve the name of base topic although CameraSubscriber, CameraPublisher, and Publisher do. This causes an issue that a base topic remapping does not work when the transport type is not raw. For instance, the following settings subscribe not camera/image_raw/compressed but image_in/compressed.

<remap from="image_in" to="camera/image_raw"/>
<param name="image_transport" value="compressed"/>

Missing documentation: image_transport throws exceptions

moved from https://code.ros.org/trac/ros-pkg/ticket/5516

image_transport throws exceptions on several occasions, however this is not documented in the headers, the Wiki tutorials don't even catch them.

Regarding the widespread use of this library, this is a serious problem, e.g. RViz currently does not handle those exceptions, as they officially don't exist.

It would also probably be better to derive the exception class from ros::Exception.

Cannot import name writeCalibration

I installed camera_calibration_parsers[1] and tired to write camera calibration file. I noticed that the code is throwing errors. See below ipython terminal:

ravi@home:~/ros_ws$ ipython
Python 2.7.6 (default, Oct 26 2016, 20:30:19) 
Type "copyright", "credits" or "license" for more information.

IPython 5.5.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from camera_calibration_parsers import writeCalibration
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-75175e0c4582> in <module>()
----> 1 from camera_calibration_parsers import writeCalibration

ImportError: cannot import name writeCalibration

In [2]: from camera_calibration_parsers import readCalibration

In [3]: 

readCalibration works but writeCalibration doesn't. I debug the issue and found out that writeCalibration doesn't exist. Please see below ipython terminal screenshot:

ccp

Any workaround, please? I am using Python in ROS Indigo on Ubuntu 14.04 LTS PC.

[1] https://github.com/ros-perception/image_common.git (branch: hydro-devel)

CompressedImage with 16bit grayscale png and image_transport

I am recording 16bit grayscale images. So far I have been using Image and everything works fine. Now I would like to use CompressedImage with png encoding instead, since that gives me a > 2x compression rate.

Unfortunately, it seems image_transport has trouble decoding 16bit grayscale png, at least with the mode parameter unchanged which is the default. If I change the mode to either gray or color, it seems to work fine.

To test, I play a bag with encoded images with rosbag play, and try to visualize in rviz. Just adding the appropriate image display does not show images (although messages are received), but changing the mode parameter for the image transport subscriber in rviz using rqt_reconfigure, it works fine (images are displayed).

In image_view it is a similar story, but it shows some heavly corrupted image with the default mode, instead of no image at all:

image_raw_screenshot_30 03 2018

I would expect the default parameter to work as well. Seems like a bug?

Here is an example bag to reproduce: test.bag.zip

I'm on Ubuntu 16.04 with kinetic.

yaml-cpp includes / libraries

I would like to know how cmake is expected to find the yaml-cpp headers and library for the camera_calibration_parsers package. On my system the compilation of the camera_calibration_parsers package fails due to missing yaml-cpp include files.
In https://github.com/ros-perception/image_common/blob/hydro-devel/camera_calibration_parsers/CMakeLists.txt#L14-L18 the cmake script is querying for the yaml-cpp library but only to receive version information. Usually I would expect for an CMake script to use the following statements after finding a requested package with pkgconfig:
include_directories(${YAML_CPP_INCLUDE_DIRS})
link_directories(${YAML_CPP_LIBRARY_DIRS})
target_link_libraries(... ${YAML_CPP_LIBRARIES})
Additionally does any of the information need to be passed to the CATKIN_PKG macro?

ROS2 image_transport raw topic rename issue

While I tried to use image_transport to publish camera raw image (/camera/color/image_raw) on ROS2, I found the topic has been renamed with /raw behind the basic topic( as /camera/color/image_raw/raw), this is not the same behavior compared with ROS1.

Is this ROS2 behavior changes? or image_transport porting issue? or am I use the wrong APIs? thanks for help.

My code:

image_transport::Publisher pub
image_transport::ImageTransport image_transport(node_);
pub = image_transport.advertise("camera/color/image_raw", 1);

Actually: Topic with image_transport:

/camera/color/image_raw/raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressedDepth

Expect: What expected is keep the same topic name with basic topic name:

/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressedDepth

Compare with ROS 1 image_transport:

/camera/color/image_raw (no /raw append)
/camera/color/image_raw/compressed
/camera/color/image_raw/compressed/parameter_descriptions
/camera/color/image_raw/compressed/parameter_updates
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/compressedDepth/parameter_descriptions
/camera/color/image_raw/compressedDepth/parameter_updates

image_transport republish compressed arm error

I get the following error message when trying to to republish a raw image topic as a compressed one:

rosrun image_transport republish raw in:=/usb_cam/image_raw compressed out:=/usb_cam/image

terminate called after throwing an instance of 'pluginlib::LibraryLoadException' what(): According to the loaded plugin descriptions the class image_transport/compressed_pub with base class type image_transport::PublisherPlugin does not exist. Declared types are image_transport/raw_pub

I'm running Ubuntu 14.04 arm with ROS Indigo on a raspberry pi 2.
The exact same command on a standard PC works as expected.

I know that normally the usb_cam package should output a compressed image topic by default because it uses the image_transport plugin system. However on the raspberry it doesn't. Maybe this is caused by the same issue that causes the error above.

Receiving compressed images over network causes memory usage to accumulate

We have a simulator that publishes images. When connecting to the roscore on the server to subscribe to compressed images, memory on the client computer accumulates in a rate that is approximately equal to image size.

I have included a small sample program that replicates the issue. It is based on the example here. Note that with _image_transport:=raw the problem disappears, so my guess is that it is related to the decompression using opencv.

I have installed ros-indigo-opencv3, and in my CMakeLists.txt i use find_package(OpenCV 3 REQUIRED)

It is probably not related to the fact that the nodes communicate over network, but I have not tried anything else.

rosrun my_pkg dummy_subscriber _image_transport:=compressed
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <opencv2/highgui/highgui.hpp>
#include <cv_bridge/cv_bridge.h>

void imageCallback(const sensor_msgs::ImageConstPtr& msg)
{
  try
  {
    cv::imshow("view", cv_bridge::toCvShare(msg, "bgr8")->image);
    cv::waitKey(30);
  }
  catch (cv_bridge::Exception& e)
  {
    ROS_ERROR("Could not convert from '%s' to 'bgr8'.", msg->encoding.c_str());
  }
}

int main(int argc, char **argv)
{
  ros::init(argc, argv, "image_listener");
  ros::NodeHandle nh;
  cv::namedWindow("view", cv::WINDOW_NORMAL);
  cv::startWindowThread();
  image_transport::ImageTransport it(nh);
  image_transport::Subscriber sub = it.subscribe("camera/front_left/image", 1, imageCallback);
  ros::spin();
  cv::destroyWindow("view");
}

camera_calibration_parsers fails to build on OS X --> unnecessary flags?

I think these lines are no longer necessary:
https://github.com/ros-perception/image_common/blob/hydro-devel/camera_calibration_parsers/CMakeLists.txt#L18-L22

as the brew install yaml-cpp-0.3 command links the libraries properly (as does brew install yaml-cpp which is the 0.5 version, for that matter). (Yosemite, indigo).

Without those lines, it works even with yaml-cpp 0.5 verison which is now standard.

This is the issue referenced here: http://wiki.ros.org/jade/Installation/OSX/Homebrew/Source#os.2BAC8-OSX.2BAC8-Homebrew.2BAC8-troubleshooting.camera_calibration_parsers_build_problems
and is one of the reasons we've had to keep yaml 0.3 around even though 0.5 is the new standard.

I'll make a pull request into hydro-devel if this seems reasonable?

polled_camera: does not export the -lpolled_camera flag

When building prosilica_driver I get this link error:

Linking CXX executable ../../../bin/prosilica_node
cd /tmp/prosilica_driver/prosilica_camera/build/src/nodes && /usr/bin/cmake -E cmake_link_script CMakeFiles/prosilica_node.dir/link.txt --verbose=1
/usr/bin/c++   -O2 -g    -Wl,-rpath,/tmp/prosilica_driver/prosilica_gige_sdk/lib -pthread CMakeFiles/prosilica_node.dir/prosilica_node.cpp.o  -o ../../../bin/prosilica_node -rdynamic -L/tmp/prosilica_driver/prosilica_gige_sdk/lib -L/opt/ros/groovy/lib -L/tmp/image_common/install/lib -L/tmp/prosilica_driver/prosilica_camera/lib -lPvAPI -limage_transport -ldynamic_reconfigure_config_init_mutex -lcamera_calibration_parsers -lroscpp -lrosconsole -lroscpp_serialization -lxmlrpcpp -lcpp_common -lrostime ../../../lib/libprosilica.so -lboost_thread-mt -lPvAPI -limage_transport -ldynamic_reconfigure_config_init_mutex -lcamera_calibration_parsers -lroscpp -lrosconsole -lroscpp_serialization -lxmlrpcpp -lcpp_common -lrostime -Wl,-rpath,/tmp/prosilica_driver/prosilica_gige_sdk/lib:/opt/ros/groovy/lib:/tmp/image_common/install/lib:/tmp/prosilica_driver/prosilica_camera/lib 
CMakeFiles/prosilica_node.dir/prosilica_node.cpp.o: In function `ProsilicaNode::stop()':
/tmp/prosilica_driver/prosilica_camera/src/nodes/prosilica_node.cpp:383: undefined reference to `polled_camera::PublicationServer::shutdown()'
CMakeFiles/prosilica_node.dir/prosilica_node.cpp.o: In function `polled_camera::PublicationServer polled_camera::advertise<ProsilicaNode>(ros::NodeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (ProsilicaNode::*)(polled_camera::GetPolledImageRequest_<std::allocator<void> >&, polled_camera::GetPolledImageResponse_<std::allocator<void> >&, sensor_msgs::Image_<std::allocator<void> >&, sensor_msgs::CameraInfo_<std::allocator<void> >&), ProsilicaNode*)':
/tmp/image_common/install/include/polled_camera/publication_server.h:84: undefined reference to `polled_camera::advertise(ros::NodeHandle&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::function<void (polled_camera::GetPolledImageRequest_<std::allocator<void> >&, polled_camera::GetPolledImageResponse_<std::allocator<void> >&, sensor_msgs::Image_<std::allocator<void> >&, sensor_msgs::CameraInfo_<std::allocator<void> >&)> const&, boost::shared_ptr<void> const&)'
CMakeFiles/prosilica_node.dir/prosilica_node.cpp.o: In function `ProsilicaNode::stop()':
/tmp/prosilica_driver/prosilica_camera/src/nodes/prosilica_node.cpp:383: undefined reference to `polled_camera::PublicationServer::shutdown()'
/tmp/prosilica_driver/prosilica_camera/src/nodes/prosilica_node.cpp:383: undefined reference to `polled_camera::PublicationServer::shutdown()'
collect2: ld returned 1 exit status
make[3]: *** [../bin/prosilica_node] Error 1
make[3]: Leaving directory `/tmp/prosilica_driver/prosilica_camera/build'
make[2]: *** [src/nodes/CMakeFiles/prosilica_node.dir/all] Error 2
make[2]: Leaving directory `/tmp/prosilica_driver/prosilica_camera/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/prosilica_driver/prosilica_camera/build'
make: *** [all] Error 2

Adding the -lpolled_camera flag allows it to build.

image_proc build fails on Fedora 23

I am trying to install ROS Jade from source based on the guide. The build of image_proc fails as follows:

johannes ~/ros_catkin_ws/build_isolated/image_proc$ /home/johannes/ros_catkin_ws/install_isolated/env.sh make -j4 -l4
[  7%] Generating dynamic reconfigure files from cfg/CropDecimate.cfg: /home/johannes/ros_catkin_ws/devel_isolated/image_proc/include/image_proc/CropDecimateConfig.h /home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/python2.7/site-packages/image_proc/cfg/CropDecimateConfig.py
[ 15%] Generating dynamic reconfigure files from cfg/Rectify.cfg: /home/johannes/ros_catkin_ws/devel_isolated/image_proc/include/image_proc/RectifyConfig.h /home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/python2.7/site-packages/image_proc/cfg/RectifyConfig.py
[ 23%] Generating dynamic reconfigure files from cfg/Debayer.cfg: /home/johannes/ros_catkin_ws/devel_isolated/image_proc/include/image_proc/DebayerConfig.h /home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/python2.7/site-packages/image_proc/cfg/DebayerConfig.py
Generating reconfiguration files for Rectify in image_proc
Wrote header file in /home/johannes/ros_catkin_ws/devel_isolated/image_proc/include/image_proc/RectifyConfig.h
Generating reconfiguration files for CropDecimate in image_proc
Generating reconfiguration files for Debayer in image_proc
Wrote header file in /home/johannes/ros_catkin_ws/devel_isolated/image_proc/include/image_proc/CropDecimateConfig.h
Wrote header file in /home/johannes/ros_catkin_ws/devel_isolated/image_proc/include/image_proc/DebayerConfig.h
[ 23%] Built target image_proc_gencfg
Scanning dependencies of target image_proc
[ 30%] Building CXX object CMakeFiles/image_proc.dir/src/libimage_proc/processor.cpp.o
[ 38%] Building CXX object CMakeFiles/image_proc.dir/src/nodelets/debayer.cpp.o
[ 46%] Building CXX object CMakeFiles/image_proc.dir/src/nodelets/rectify.cpp.o
[ 53%] Building CXX object CMakeFiles/image_proc.dir/src/nodelets/crop_decimate.cpp.o
[ 61%] Building CXX object CMakeFiles/image_proc.dir/src/libimage_proc/advertisement_checker.cpp.o
[ 69%] Building CXX object CMakeFiles/image_proc.dir/src/nodelets/edge_aware.cpp.o
[ 76%] Building CXX object CMakeFiles/image_proc.dir/src/nodelets/crop_non_zero.cpp.o
[ 84%] Linking CXX shared library /home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/libimage_proc.so
[ 84%] Built target image_proc
[ 92%] Building CXX object CMakeFiles/image_proc_exe.dir/src/nodes/image_proc.cpp.o
[100%] Linking CXX executable /home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc
/home/johannes/ros_catkin_ws/install_isolated/lib/libcv_bridge.so: undefined reference to `cv::imencode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)'
collect2: error: ld returned 1 exit status
CMakeFiles/image_proc_exe.dir/build.make:160: recipe for target '/home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc' failed
make[2]: *** [/home/johannes/ros_catkin_ws/devel_isolated/image_proc/lib/image_proc/image_proc] Error 1
CMakeFiles/Makefile2:648: recipe for target 'CMakeFiles/image_proc_exe.dir/all' failed
make[1]: *** [CMakeFiles/image_proc_exe.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I suppose it has something to do with the gcc5 version on Fedora which also uses the c++11 ABI

Johannes

Can't link with tinyxml on OS X Yosemite

Linking CXX shared library /Users/robert/ros_catkin_ws/devel_isolated/image_transport/lib/libimage_transport.dylib
ld: library not found for -ltinyxml
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/robert/ros_catkin_ws/devel_isolated/image_transport/lib/libimage_transport.dylib] Error 1
make[1]: *** [CMakeFiles/image_transport.dir/all] Error 2
make: *** [all] Error 2
<== Failed to process package 'image_transport': 
  Command '/Users/robert/ros_catkin_ws/install_isolated/env.sh make -j8 -l8' returned non-zero exit status 2

Reproduce this error by running:
==> cd /Users/robert/ros_catkin_ws/build_isolated/image_transport && /Users/robert/ros_catkin_ws/install_isolated/env.sh make -j8 -l8

Command failed, exiting.

I have already tested a fix which uses the FindTinyXML cmake module from cmake_modules. If you want i can post the new CMakeLists.txt

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.