[Bug 838] New: orocos_use_package fails when requested package is not a ROS package

http://bugs.orocos.org/show_bug.cgi?id=838

Summary: orocos_use_package fails when requested package is not
a ROS package
Product: Toolchain
Version: 2.3.0
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P3
Component: RTT
AssignedTo: orocos-dev [..] ...
ReportedBy: meyer [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Created attachment 660
--> http://bugs.orocos.org/attachment.cgi?id=660
patch for UseOROCOS-RTT-helpers.cmake

The current implementation of the orocos_use_package macro aborts with a fatal
error when used in a ROS environment and rospack cannot find a package with the
requested name. This bevavior is inherited from rosbuild's
rosbuild_invoke_rospack macro. With the attached patch the ROS checks are
simply skipped in that case.

For my application I want to link against the ocl-taskbrowser by using the
orocos_use_package macro, which leads to the described cmake error:

Failed to invoke /opt/ros/diamondback/ros/bin/rospack depends ocl-taskbrowser
[rospack] couldn't find package [ocl-taskbrowser]

CMake Error at /opt/ros/diamondback/ros/core/rosbuild/public.cmake:113
(message):

Failed to invoke rospack to get compile flags for package
'ocl-taskbrowser'. Look above for errors from rospack itself. Aborting.
Please fix the broken dependency!

[Bug 838] orocos_use_package fails when requested package is not

http://bugs.orocos.org/show_bug.cgi?id=838

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |next-bugfix

--- Comment #1 from Peter Soetens <peter [..] ...> 2011-03-15 11:32:10 CET ---
(In reply to comment #0)
> Created attachment 660
> patch for UseOROCOS-RTT-helpers.cmake
>
> The current implementation of the orocos_use_package macro aborts with a fatal
> error when used in a ROS environment and rospack cannot find a package with the
> requested name. This bevavior is inherited from rosbuild's
> rosbuild_invoke_rospack macro. With the attached patch the ROS checks are simply
> skipped in that case.
>
> For my application I want to link against the ocl-taskbrowser by using the
> orocos_use_package macro, which leads to the described cmake error:
>
> Failed to invoke /opt/ros/diamondback/ros/bin/rospack depends ocl-taskbrowser
> [rospack] couldn't find package [ocl-taskbrowser]
>
>
> CMake Error at /opt/ros/diamondback/ros/core/rosbuild/public.cmake:113
> (message):
>
>
> Failed to invoke rospack to get compile flags for package
> 'ocl-taskbrowser'. Look above for errors from rospack itself. Aborting.
> Please fix the broken dependency!

Thanks for fixing this. I've added a second patch for printing a note in
VERBOSE mode if the package is not a ROS package.

It's on toolchain-2.3.

Peter

[Bug 838] orocos_use_package fails when requested package is not

http://bugs.orocos.org/show_bug.cgi?id=838

Peter Soetens <peter [..] ...> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |next-bugfix

--- Comment #1 from Peter Soetens <peter [..] ...> 2011-03-15 11:32:10 CET ---
(In reply to comment #0)
> Created attachment 660
> patch for UseOROCOS-RTT-helpers.cmake
>
> The current implementation of the orocos_use_package macro aborts with a fatal
> error when used in a ROS environment and rospack cannot find a package with the
> requested name. This bevavior is inherited from rosbuild's
> rosbuild_invoke_rospack macro. With the attached patch the ROS checks are simply
> skipped in that case.
>
> For my application I want to link against the ocl-taskbrowser by using the
> orocos_use_package macro, which leads to the described cmake error:
>
> Failed to invoke /opt/ros/diamondback/ros/bin/rospack depends ocl-taskbrowser
> [rospack] couldn't find package [ocl-taskbrowser]
>
>
> CMake Error at /opt/ros/diamondback/ros/core/rosbuild/public.cmake:113
> (message):
>
>
> Failed to invoke rospack to get compile flags for package
> 'ocl-taskbrowser'. Look above for errors from rospack itself. Aborting.
> Please fix the broken dependency!

Thanks for fixing this. I've added a second patch for printing a note in
VERBOSE mode if the package is not a ROS package.

It's on toolchain-2.3.

Peter