Deploying soem in rttlua

Hello,

I am having trouble deploying the some component with rtlua, no ROS. The
component was compiled with ROS and copied from another machine (soem
component can't build without ROS currently; this is a dirty, but hopefully
temporary workaround).

The .so files are located as follows:

$ find `pwd` -name "*.so"
/home/awagner/planepower/components/lowlevel/soem/soem_master/lib/orocos/gnulinux/plugins/libsoem_plugin-gnulinux.so
/home/awagner/planepower/components/lowlevel/soem/soem_master/lib/orocos/gnulinux/libsoem_master-gnulinux.so
/home/awagner/planepower/components/lowlevel/soem/soem_master/lib/libsoem_driver_factory-gnulinux.so
/home/awagner/planepower/components/lowlevel/soem/soem_ebox/lib/orocos/gnulinux/plugins/libsoem_ebox-gnulinux.so
/home/awagner/planepower/components/lowlevel/soem/soem_ebox/lib/orocos/gnulinux/types/librtt-soem_ebox-typekit-gnulinux.so
/home/awagner/planepower/components/lowlevel/soem/soem_ebox/lib/orocos/gnulinux/types/librtt-soem_ebox-ros-transport-gnulinux.so
/home/awagner/planepower/components/lowlevel/soem/soem_core/lib/libsoem_core.so

When I try to load the components in rttlua (as we used to in our .ops
scripts):

$ grep soem load_soem.lua
deployer:import("soem_master")
deployer:import("soem_ebox")

with RTT_COMPONENT_PATH=:/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main

I get:

$ rttlua -i load_soem.lua
OROCOS RTTLua 1.0-beta5 / Lua 5.1.4 (gnulinux)
0.090 [ ERROR ][DeploymentComponent::import] No such package or directory
found in search path: soem_master. Search path is:
0.090 [ ERROR ][DeploymentComponent::import]
:/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main:/home/awagner/planepower/extern/orocos/install/lib/orocos:.
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/lowlevel/soem_master
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/lowlevel/gnulinux/soem_master
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/main/soem_master
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/main/gnulinux/soem_master
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/extern/orocos/install/lib/orocos/soem_master
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/extern/orocos/install/lib/orocos/gnulinux/soem_master
0.090 [ ERROR ][DeploymentComponent::import] ./soem_master
0.090 [ ERROR ][DeploymentComponent::import] ./gnulinux/soem_master
0.090 [ ERROR ][DeploymentComponent::import] No such package or directory
found in search path: soem_ebox. Search path is:
0.090 [ ERROR ][DeploymentComponent::import]
:/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main:/home/awagner/planepower/extern/orocos/install/lib/orocos:.
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/lowlevel/soem_ebox
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/lowlevel/gnulinux/soem_ebox
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/main/soem_ebox
0.090 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/main/gnulinux/soem_ebox
0.091 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/extern/orocos/install/lib/orocos/soem_ebox
0.091 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/extern/orocos/install/lib/orocos/gnulinux/soem_ebox
0.091 [ ERROR ][DeploymentComponent::import] ./soem_ebox
0.091 [ ERROR ][DeploymentComponent::import] ./gnulinux/soem_ebox
0.091 [ ERROR ][DeploymentComponent::loadComponent] Unable to create
Orocos Component 'soem_master::SoemMasterComponent': unknown component type.

If I try to add the "soem" subdirectory to my RTT_COMPONENT_PATH:
RTT_COMPONENT_PATH=:/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main:/home/awagner/planepower/components/lowlevel/soem

I get:

Real-time memory: 517904 bytes free of 524288 allocated.
OROCOS RTTLua 1.0-beta5 / Lua 5.1.4 (gnulinux)
0.084 [ ERROR ][DeploymentComponent::import] Failed to import components,
types or plugins from package or directory 'soem_master' found in:
0.085 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/lowlevel/soem/soem_master
0.085 [ ERROR ][DeploymentComponent::import] Failed to import components,
types or plugins from package or directory 'soem_ebox' found in:
0.085 [ ERROR ][DeploymentComponent::import]
/home/awagner/planepower/components/lowlevel/soem/soem_ebox
0.085 [ ERROR ][DeploymentComponent::loadComponent] Unable to create
Orocos Component 'soem_master::SoemMasterComponent': unknown component type.

Can anyone see what I'm doing wrong? Do I need to manually demangle the
.so filenames and load them explicitly using their root paths or something?
I spend almost an hour trying variations, and couldn't find one that
worked.

Deploying soem in rttlua

On Fri, Apr 12, 2013 at 5:36 PM, Andrew Wagner
<andrew [dot] wagner [..] ...> wrote:
> Hello,
>
> I am having trouble deploying the some component with rtlua, no ROS. The
> component was compiled with ROS and copied from another machine (soem
> component can't build without ROS currently; this is a dirty, but hopefully
> temporary workaround).
>
> The .so files are located as follows:
>
> $ find `pwd` -name "*.so"
> /home/awagner/planepower/components/lowlevel/soem/soem_master/lib/orocos/gnulinux/plugins/libsoem_plugin-gnulinux.so
> /home/awagner/planepower/components/lowlevel/soem/soem_master/lib/orocos/gnulinux/libsoem_master-gnulinux.so
> /home/awagner/planepower/components/lowlevel/soem/soem_master/lib/libsoem_driver_factory-gnulinux.so
> /home/awagner/planepower/components/lowlevel/soem/soem_ebox/lib/orocos/gnulinux/plugins/libsoem_ebox-gnulinux.so
> /home/awagner/planepower/components/lowlevel/soem/soem_ebox/lib/orocos/gnulinux/types/librtt-soem_ebox-typekit-gnulinux.so
> /home/awagner/planepower/components/lowlevel/soem/soem_ebox/lib/orocos/gnulinux/types/librtt-soem_ebox-ros-transport-gnulinux.so
> /home/awagner/planepower/components/lowlevel/soem/soem_core/lib/libsoem_core.so
>
> When I try to load the components in rttlua (as we used to in our .ops
> scripts):
>
> $ grep soem load_soem.lua
> deployer:import("soem_master")
> deployer:import("soem_ebox")
>
> with
> RTT_COMPONENT_PATH=:/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main
>
> I get:
>
> $ rttlua -i load_soem.lua
> OROCOS RTTLua 1.0-beta5 / Lua 5.1.4 (gnulinux)
> 0.090 [ ERROR ][DeploymentComponent::import] No such package or directory
> found in search path: soem_master. Search path is:
> 0.090 [ ERROR ][DeploymentComponent::import]
> :/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main:/home/awagner/planepower/extern/orocos/install/lib/orocos:.
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/lowlevel/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/lowlevel/gnulinux/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/main/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/main/gnulinux/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/extern/orocos/install/lib/orocos/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/extern/orocos/install/lib/orocos/gnulinux/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import] ./soem_master
> 0.090 [ ERROR ][DeploymentComponent::import] ./gnulinux/soem_master
> 0.090 [ ERROR ][DeploymentComponent::import] No such package or directory
> found in search path: soem_ebox. Search path is:
> 0.090 [ ERROR ][DeploymentComponent::import]
> :/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main:/home/awagner/planepower/extern/orocos/install/lib/orocos:.
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/lowlevel/soem_ebox
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/lowlevel/gnulinux/soem_ebox
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/main/soem_ebox
> 0.090 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/main/gnulinux/soem_ebox
> 0.091 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/extern/orocos/install/lib/orocos/soem_ebox
> 0.091 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/extern/orocos/install/lib/orocos/gnulinux/soem_ebox
> 0.091 [ ERROR ][DeploymentComponent::import] ./soem_ebox
> 0.091 [ ERROR ][DeploymentComponent::import] ./gnulinux/soem_ebox
> 0.091 [ ERROR ][DeploymentComponent::loadComponent] Unable to create Orocos
> Component 'soem_master::SoemMasterComponent': unknown component type.
>
> If I try to add the "soem" subdirectory to my RTT_COMPONENT_PATH:
> RTT_COMPONENT_PATH=:/home/awagner/planepower/components/lowlevel:/home/awagner/planepower/components/main:/home/awagner/planepower/components/lowlevel/soem
>
> I get:
>
> Real-time memory: 517904 bytes free of 524288 allocated.
> OROCOS RTTLua 1.0-beta5 / Lua 5.1.4 (gnulinux)
> 0.084 [ ERROR ][DeploymentComponent::import] Failed to import components,
> types or plugins from package or directory 'soem_master' found in:
> 0.085 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/lowlevel/soem/soem_master
> 0.085 [ ERROR ][DeploymentComponent::import] Failed to import components,
> types or plugins from package or directory 'soem_ebox' found in:
> 0.085 [ ERROR ][DeploymentComponent::import]
> /home/awagner/planepower/components/lowlevel/soem/soem_ebox
> 0.085 [ ERROR ][DeploymentComponent::loadComponent] Unable to create Orocos
> Component 'soem_master::SoemMasterComponent': unknown component type.
>
> Can anyone see what I'm doing wrong? Do I need to manually demangle the .so
> filenames and load them explicitly using their root paths or something? I
> spend almost an hour trying variations, and couldn't find one that worked.

What you'd better do is to make install your soem master and
components in the OROCOS directory. This is most convenient when using
the UseOrocos macros by doing:

cd build; cmake .. -DINSTALL_PATH=orocos ; make install

then your imports should work. For each import statement, the deployer
looks for a subdirectory name with that name in your
RTT_COMPONENT_PATH.

The errors are imho correct, the soem_master directory is nowhere
underneath your component path...

Peter