I'm trying to get a workflow where I have code installed to the system and then checkout just the components I need to modify, compile, run, etc. Using catkin and ROS workspaces, this is fairly easy to do using overlays. However, I have run into a problem with having multiple versions of the same Orocos component libraries in my RTT_COMPONENT_PATH.
After I build and source my freshly-built workspace and startup, I startup a new rttlua session. I try loading my component with:
rtt.setLogLevel("Debug") tc = rtt.getTC() depl = tc:getPeer("Deployer") depl:import("nasa_r2_config_safety_init_rtt")The log output has a lot of warnings about a component already being loaded. ("Component type name XXX already used: overriding.")
25.408 [ Info ][ComponentLoader::import(path_list)] Importing directory /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt ... 25.533 [ Debug ][ComponentLoader::import(path_list)] Scanning file /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libCoeffValidator-gnulinux.so ...Succesfully loaded CoeffValidator 25.533 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'CoeffValidator' 25.564 [ Debug ][ComponentLoader::import(path_list)] Scanning file /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libJointLoader-gnulinux.so ...Succesfully loaded JointLoader 25.564 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'JointLoader' 25.577 [ Debug ][ComponentLoader::import(path_list)] Scanning file /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libShutdownManager-gnulinux.so ...Succesfully loaded ShutdownManager 25.577 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'ShutdownManager' 25.604 [ Debug ][ComponentLoader::import(path_list)] Scanning file /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libCoeffLoader-gnulinux.so ...Succesfully loaded CoeffLoader 25.604 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'CoeffLoader' 25.621 [ Debug ][ComponentLoader::import(path_list)] Scanning file /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libJointSeed-gnulinux.so ...Succesfully loaded JointSeed 25.622 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'JointSeed' 25.622 [ Debug ][ComponentLoader::import(path_list)] Looking for plugins or typekits in directory /home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt ... 25.622 [ Debug ][ComponentLoader::import(path_list)] No such directory: "/home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/types" 25.622 [ Debug ][ComponentLoader::import(path_list)] No such directory: "/home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/plugins" 25.622 [ Info ][ComponentLoader::import(path_list)] Importing directory /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt ... 25.629 [ Debug ][ComponentLoader::import(path_list)] Scanning file /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libCoeffValidator-gnulinux.so ...Succesfully loaded CoeffValidator 25.629 [ Warning][ComponentLoader::import(path_list)] Component type name CoeffValidator already used: overriding. 25.629 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'CoeffValidator' 25.639 [ Debug ][ComponentLoader::import(path_list)] Scanning file /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libJointLoader-gnulinux.so ...Succesfully loaded JointLoader 25.640 [ Warning][ComponentLoader::import(path_list)] Component type name JointLoader already used: overriding. 25.640 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'JointLoader' 25.644 [ Debug ][ComponentLoader::import(path_list)] Scanning file /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libShutdownManager-gnulinux.so ...Succesfully loaded ShutdownManager 25.644 [ Warning][ComponentLoader::import(path_list)] Component type name ShutdownManager already used: overriding. 25.644 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'ShutdownManager' 25.655 [ Debug ][ComponentLoader::import(path_list)] Scanning file /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libCoeffLoader-gnulinux.so ...Succesfully loaded CoeffLoader 25.655 [ Warning][ComponentLoader::import(path_list)] Component type name CoeffLoader already used: overriding. 25.655 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'CoeffLoader' 25.661 [ Debug ][ComponentLoader::import(path_list)] Scanning file /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/libJointSeed-gnulinux.so ...Succesfully loaded JointSeed 25.661 [ Warning][ComponentLoader::import(path_list)] Component type name JointSeed already used: overriding. 25.661 [ Info ][ComponentLoader::import(path_list)] Loaded component type 'JointSeed' 25.661 [ Debug ][ComponentLoader::import(path_list)] Looking for plugins or typekits in directory /opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt ... 25.661 [ Debug ][ComponentLoader::import(path_list)] No such directory: "/opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/types" 25.661 [ Debug ][ComponentLoader::import(path_list)] No such directory: "/opt/nasa/hydro/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt/plugins"I was suprised to see that the loader keeps looking even after the component I asked for has been found.
Doing a little digging in the source code I found here: http://www.orocos.org/stable/documentation/rtt/v2.x/api/html/ComponentLoader_8cpp_source.html
Around lines 00730 is where that warning comes from.
Is this the desired behavior?
My RTT_COMPONENT_PATH is:
/home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt:/home/pstrawse/r2_hydro/devel/lib/orocos:/opt/nasa/hydro/lib/orocos:/opt/ros/hydro/lib/orocosI have also tried reordering the component path, but the libraries in my system install always get found last, and thus override the code I really want to get loaded.
Is there something wrong with my setup?
How do I get the ComponentLoader to load my workspace libraries instead of the system installed libraries?
loading components with ROS workspace overlays
On May 22, 2015, at 10:21 AM, strawser [..] ...<mailto:strawser [..] ...> wrote:
I'm trying to get a workflow where I have code installed to the system and
then checkout just the components I need to modify, compile, run, etc. Using
catkin and ROS workspaces, this is fairly easy to do using overlays.
I think this is a common use case and needs to be supported in a standard way.
However, I have run into a problem with having multiple versions of the same
Orocos component libraries in my RTT_COMPONENT_PATH.
After I build and source my freshly-built workspace and startup, I startup a
new rttlua session. I try loading my component with:
rtt.setLogLevel("Debug")
tc = rtt.getTC()
depl = tc:getPeer("Deployer")
depl:import("nasa_r2_config_safety_init_rtt")
The log output has a lot of warnings about a component already being loaded.
("Component type name XXX already used: overriding.”)
I see this, too. (Granted, we sit next to each other…)
Is this the desired behavior?
My RTT_COMPONENT_PATH is:
/home/pstrawse/r2_hydro/devel/lib/orocos/gnulinux/nasa_r2_config_safety_init_rtt:/home/pstrawse/r2_hydro/devel/lib/orocos:/opt/nasa/hydro/lib/orocos:/opt/ros/hydro/lib/orocos
I have also tried reordering the component path, but the libraries in my
system install always get found last, and thus override the code I really
want to get loaded.
Shouldn’t the loader find the first match in the relevant path and be done? Subsequent attempts to load the same library should be ignored or skipped?
Is there something wrong with my setup?
How do I get the ComponentLoader to load my workspace libraries instead of
the system installed libraries?
--
Orocos-Users mailing list
Orocos-Users [..] ...<mailto:Orocos-Users [..] ...>
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
--
Dustin Gooding
NASA/JSC Robotics