[prev in list] [next in list] [prev in thread] [next in thread] 

List:       orocos-dev
Subject:    [Orocos-Dev] [Bug 1019] New: Precedence of ROS packages over regular files when using the import fun
From:       meyer () fsr ! tu-darmstadt ! de (Johannes Meyer)
Date:       2013-01-23 20:27:17
Message-ID: bug-1019-4 () http ! bugs ! orocos ! org/
[Download RAW message or body]


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

           Summary: Precedence of ROS packages over regular files when
                    using the import function
           Product: Toolchain
           Version: master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P3
         Component: RTT
        AssignedTo: orocos-dev at lists.mech.kuleuven.be
        ReportedBy: meyer at fsr.tu-darmstadt.de
                CC: orocos-dev at lists.mech.kuleuven.be
   Estimated Hours: 0.0


Created attachment 851
  --> http://bugs.orocos.org/attachment.cgi?id=851
swapping the different checks in RTT::ComponentLoader::import()

I would like to propose the attached patch for the RTT::ComponentLoader class
which solves the following problem when using the import(package) operation in
the deployer: If there is a file in the current working directory with the same
name as the package I would like to import, the old behaviour was to load that
file directly and abort with an error without trying the other variants (ROS
package or installed package).

A simple example: I have a ROS package named "foo" with some dependencies
defined in its manifest.xml file and a script bin/foo which launches the
executable bin/foo-gnulinux with a proper environment and a couple of command
line options. In the deployer script I call import("foo") to load component
libraries in package foo and all dependent packages. Without the patch, the
method call fails with an error message saying that "foo" is not a valid
component library.

In theory, the is_regular_file check in ComponentLoader.cpp should be moved
after the importInstalledPackage() call to also be able to import installed
packages named "foo" in the example case, but importInstalledPackage() does not
fail silently, causing ugly error message if you really want to import regular
files.

By the way, which is the correct git branch to work on for 2.6? master or
toolchain-2.6?

-- 
Configure bugmail: http://bugs.orocos.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic