Lua deployment script failing

Hi,

i'm trying to write a Lua deployment script according to the LuaCookBook but the following simple script fails;


require("rttlib")
rttlib.color=true

tc = rtt.getTC()
depl = tc:getPeer("deployer")

depl:import("lwr_fri")
depl:loadComponent("lwr","lwr_fri::FRIComponent")


/home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-xenomai: .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447: __lua_todsb: can't convert lua string to /std/string variable
stack traceback:
[C]: in function 'call'
.../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447: in function 'loadComponent'
runfri.lua:8: in main chunk
[C]: ?

I'm using the RTT and OCL toolchain-2.3 branches.

-- Ruben

Lua deployment script failing

Hi Everyone

I have a problem when I try to deploy an application using lua scripts.

I similar error was observed by Ruben in the post:

http://www.orocos.org/forum/orocos/orocos-users/lua-deployment-script-fa...

However my problem is I have installed the orocos_toolchain for ROS from
the following described method:

http://www.ros.org/wiki/orocos_toolchain_ros

I installed it using the commands

sudo aptitude install ros-electric-orocos-toolchain
ros-electric-rtt-ros-integration ros-electric-rtt-ros-comm
ros-electric-rtt-common-msgs ros-electric-rtt-geometry

and

source `rosstack find orocos_toolchain`/env.sh

When I run my lua deployment script I get the following errors:

aviator@aviator-laptop:~/OrocosProject$ rosrun ocl rttlua-gnulinux -i
cam_wm_update_deploy.lua
OROCOS RTTLua 1.0-beta5 / Lua 5.1.4 (gnulinux)
0.955 [ ERROR ][TypekitRepository::Import] A protocol with id 2 was
already added for type /std/vector</double>
0.957 [ ERROR ][TypekitRepository::Import] A protocol with id 1 was
already added for type /std/string
0.957 [ ERROR ][TypekitRepository::Import] A protocol with id 1 was
already added for type /std/vector</double>
Plugin of viewer loaded in process.
Plugin of markerdetector loaded in process.
1.155 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was
already added for type /std/string
1.155 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was
already added for type /std/vector</double>
1.169 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was
already added for type /std/string
1.169 [ ERROR ][TypekitRepository::Import] A protocol with id 42 was
already added for type /std/vector</double>
1.172 [ ERROR ][TypekitRepository::Import] A protocol with id 1 was
already added for type /std/string
1.172 [ ERROR ][TypekitRepository::Import] A protocol with id 1 was
already added for type /std/vector</double>
1.178 [ ERROR ][TypekitRepository::Import] A protocol with id 2 was
already added for type /std/string
1.178 [ ERROR ][TypekitRepository::Import] A protocol with id 2 was
already added for type /std/vector</double>
Plugin of update_wm_rpc_client loaded in process.
/opt/ros/electric/stacks/orocos_toolchain/ocl/bin/rttlua-gnulinux:
...c/stacks/orocos_toolchain/ocl/lua/modules/rttlib.lua:618: __lua_todsb:
can't convert lua string to /std/string variable
stack traceback:
[C]: ?
...c/stacks/orocos_toolchain/ocl/lua/modules/rttlib.lua:618: in
function 'loadComponent'
cam_wm_update_deploy.lua:11: in main chunk
[C]: ?

I have updated my packages but it also did not work.

However, the deployment of the same components via the orocos script works
perfectly via the command:

deployer-gnulinux -s cam_wm_update_deploy.ops

Can someone tell me how to proceed so that I am able to deploy the
application using lua deployment scripts ?

I do not think that the lua script is a problem here but just in case some
one needs it I can provide it.

Thanks
Shashank

Lua deployment script failing

On Wed, Jul 18, 2012 at 01:15:21PM +0200, shashank sharma wrote:
> Hi Everyone
>
> I have a problem when I try to deploy an application using lua scripts.
>
> I similar error was observed by Ruben in the post:
>
> http://www.orocos.org/forum/orocos/orocos-users/lua-deployment-script-fa...
>
> However my problem is I have installed the orocos_toolchain for ROS from the
> following described method:
>
> http://www.ros.org/wiki/orocos_toolchain_ros
>
> I installed it using the commands
>
> sudo aptitude install ros-electric-orocos-toolchain ros-electric-rtt-ros-integration ros-electric-rtt-ros-comm ros-electric-rtt-common-msgs ros-electric-rtt-geometry
>
> and
>
> source `rosstack find orocos_toolchain`/env.sh

You need to update your packages. Are you sure there is no old stuff
lying around? If that doesn't help, try compiling OCL from git.

Markus

Lua deployment script failing

On Tue, May 24, 2011 at 03:26:02PM +0200, Ruben Smits wrote:
> Hi,
>
> i'm trying to write a Lua deployment script according to the LuaCookBook but the following simple script fails;
>
> &#10;&gt; require(&quot;rttlib&quot;)&#10;&gt; rttlib.color=true&#10;&gt; &#10;&gt; tc = rtt.getTC()&#10;&gt; depl = tc:getPeer(&quot;deployer&quot;)&#10;&gt; &#10;&gt; depl:import(&quot;lwr_fri&quot;)&#10;&gt; depl:loadComponent(&quot;lwr&quot;,&quot;lwr_fri::FRIComponent&quot;)&#10;&gt;
>
> /home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-xenomai: .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447: __lua_todsb: can't convert lua string to /std/string variable
> stack traceback:
> [C]: in function 'call'
> .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447: in function 'loadComponent'
> runfri.lua:8: in main chunk
> [C]: ?
>
>
> I'm using the RTT and OCL toolchain-2.3 branches.

This is most likely the "typename overriding bug", which didn't go
into 2.3 any more. Could you try master?

Thanks!
Markus

Ruben Smits's picture

Lua deployment script failing

On Tuesday 24 May 2011 15:41:44 Markus Klotzbuecher wrote:
> On Tue, May 24, 2011 at 03:26:02PM +0200, Ruben Smits wrote:
> > Hi,
> >
> > i'm trying to write a Lua deployment script according to the LuaCookBook
> > but the following simple script fails;
> >
> > &#10;&gt; &gt; require(&quot;rttlib&quot;)&#10;&gt; &gt; rttlib.color=true&#10;&gt; &gt; &#10;&gt; &gt; tc = rtt.getTC()&#10;&gt; &gt; depl = tc:getPeer(&quot;deployer&quot;)&#10;&gt; &gt; &#10;&gt; &gt; depl:import(&quot;lwr_fri&quot;)&#10;&gt; &gt; depl:loadComponent(&quot;lwr&quot;,&quot;lwr_fri::FRIComponent&quot;)&#10;&gt; &gt;
> >
> > /home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-xenomai:
> > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447:
> > __lua_todsb: can't convert lua string to /std/string variable
> >
> > stack traceback:
> > [C]: in function 'call'
> > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:
> > 447: in function 'loadComponent' runfri.lua:8: in main
> > chunk
> > [C]: ?
> >
> > I'm using the RTT and OCL toolchain-2.3 branches.
>
> This is most likely the "typename overriding bug", which didn't go
> into 2.3 any more. Could you try master?

OCL master depends on RTT master that has changes I do not want yet. So no, i
cannot easily try master. Is there another way to get the newer lua stuff in
toolchain-2.3??

>
> Thanks!
> Markus

-- Ruben

Lua deployment script failing

On Tue, May 24, 2011 at 04:01:08PM +0200, Ruben Smits wrote:
> On Tuesday 24 May 2011 15:41:44 Markus Klotzbuecher wrote:
> > On Tue, May 24, 2011 at 03:26:02PM +0200, Ruben Smits wrote:
> > > Hi,
> > >
> > > i'm trying to write a Lua deployment script according to the LuaCookBook
> > > but the following simple script fails;
> > >
> > > &#10;&gt; &gt; &gt; require(&quot;rttlib&quot;)&#10;&gt; &gt; &gt; rttlib.color=true&#10;&gt; &gt; &gt; &#10;&gt; &gt; &gt; tc = rtt.getTC()&#10;&gt; &gt; &gt; depl = tc:getPeer(&quot;deployer&quot;)&#10;&gt; &gt; &gt; &#10;&gt; &gt; &gt; depl:import(&quot;lwr_fri&quot;)&#10;&gt; &gt; &gt; depl:loadComponent(&quot;lwr&quot;,&quot;lwr_fri::FRIComponent&quot;)&#10;&gt; &gt; &gt;
> > >
> > > /home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-xenomai:
> > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447:
> > > __lua_todsb: can't convert lua string to /std/string variable
> > >
> > > stack traceback:
> > > [C]: in function 'call'
> > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:
> > > 447: in function 'loadComponent' runfri.lua:8: in main
> > > chunk
> > > [C]: ?
> > >
> > > I'm using the RTT and OCL toolchain-2.3 branches.
> >
> > This is most likely the "typename overriding bug", which didn't go
> > into 2.3 any more. Could you try master?
>
> OCL master depends on RTT master that has changes I do not want yet. So no, i
> cannot easily try master. Is there another way to get the newer lua stuff in
> toolchain-2.3??

As a quick and dirty hack you could just copy the ocl/lua directory
from master to your branch and recompile. AFAICS there is nothing in
Lua than requires RTT and OCL master.

Markus

Ruben Smits's picture

Lua deployment script failing

On Tuesday 24 May 2011 16:23:43 Markus Klotzbuecher wrote:
> On Tue, May 24, 2011 at 04:01:08PM +0200, Ruben Smits wrote:
> > On Tuesday 24 May 2011 15:41:44 Markus Klotzbuecher wrote:
> > > On Tue, May 24, 2011 at 03:26:02PM +0200, Ruben Smits wrote:
> > > > Hi,
> > > >
> > > > i'm trying to write a Lua deployment script according to the
> > > > LuaCookBook but the following simple script fails;
> > > >
> > > > &#10;&gt; &gt; &gt; &gt; require(&quot;rttlib&quot;)&#10;&gt; &gt; &gt; &gt; rttlib.color=true&#10;&gt; &gt; &gt; &gt; &#10;&gt; &gt; &gt; &gt; tc = rtt.getTC()&#10;&gt; &gt; &gt; &gt; depl = tc:getPeer(&quot;deployer&quot;)&#10;&gt; &gt; &gt; &gt; &#10;&gt; &gt; &gt; &gt; depl:import(&quot;lwr_fri&quot;)&#10;&gt; &gt; &gt; &gt; depl:loadComponent(&quot;lwr&quot;,&quot;lwr_fri::FRIComponent&quot;)&#10;&gt; &gt; &gt; &gt;
> > > >
> > > > /home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-xeno
> > > > mai:
> > > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447:
> > > > __lua_todsb: can't convert lua string to /std/string variable
> > > >
> > > > stack traceback:
> > > > [C]: in function 'call'
> > > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rtt
> > > > lib.lua:
> > > > 447: in function 'loadComponent' runfri.lua:8:
> > > > in main
> > > > chunk
> > > > [C]: ?
> > > >
> > > > I'm using the RTT and OCL toolchain-2.3 branches.
> > >
> > > This is most likely the "typename overriding bug", which didn't go
> > > into 2.3 any more. Could you try master?
> >
> > OCL master depends on RTT master that has changes I do not want yet. So
> > no, i cannot easily try master. Is there another way to get the newer
> > lua stuff in toolchain-2.3??
>
> As a quick and dirty hack you could just copy the ocl/lua directory
> from master to your branch and recompile. AFAICS there is nothing in
> Lua than requires RTT and OCL master.

I combined OCL master with RTT toolchain-2.3 which compiled ok, but now the
script runs and exits immediatly, I do not end up in the rttlua shell. Is this
desired behaviour??

> Markus

-- Ruben

Lua deployment script failing

On Tue, May 24, 2011 at 04:30:53PM +0200, Ruben Smits wrote:
> On Tuesday 24 May 2011 16:23:43 Markus Klotzbuecher wrote:
> > On Tue, May 24, 2011 at 04:01:08PM +0200, Ruben Smits wrote:
> > > On Tuesday 24 May 2011 15:41:44 Markus Klotzbuecher wrote:
> > > > On Tue, May 24, 2011 at 03:26:02PM +0200, Ruben Smits wrote:
> > > > > Hi,
> > > > >
> > > > > i'm trying to write a Lua deployment script according to the
> > > > > LuaCookBook but the following simple script fails;
> > > > >
> > > > > &#10;&gt; &gt; &gt; &gt; &gt; require(&quot;rttlib&quot;)&#10;&gt; &gt; &gt; &gt; &gt; rttlib.color=true&#10;&gt; &gt; &gt; &gt; &gt; &#10;&gt; &gt; &gt; &gt; &gt; tc = rtt.getTC()&#10;&gt; &gt; &gt; &gt; &gt; depl = tc:getPeer(&quot;deployer&quot;)&#10;&gt; &gt; &gt; &gt; &gt; &#10;&gt; &gt; &gt; &gt; &gt; depl:import(&quot;lwr_fri&quot;)&#10;&gt; &gt; &gt; &gt; &gt; depl:loadComponent(&quot;lwr&quot;,&quot;lwr_fri::FRIComponent&quot;)&#10;&gt; &gt; &gt; &gt; &gt;
> > > > >
> > > > > /home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-xeno
> > > > > mai:
> > > > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447:
> > > > > __lua_todsb: can't convert lua string to /std/string variable
> > > > >
> > > > > stack traceback:
> > > > > [C]: in function 'call'
> > > > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rtt
> > > > > lib.lua:
> > > > > 447: in function 'loadComponent' runfri.lua:8:
> > > > > in main
> > > > > chunk
> > > > > [C]: ?
> > > > >
> > > > > I'm using the RTT and OCL toolchain-2.3 branches.
> > > >
> > > > This is most likely the "typename overriding bug", which didn't go
> > > > into 2.3 any more. Could you try master?
> > >
> > > OCL master depends on RTT master that has changes I do not want yet. So
> > > no, i cannot easily try master. Is there another way to get the newer
> > > lua stuff in toolchain-2.3??
> >
> > As a quick and dirty hack you could just copy the ocl/lua directory
> > from master to your branch and recompile. AFAICS there is nothing in
> > Lua than requires RTT and OCL master.
>
> I combined OCL master with RTT toolchain-2.3 which compiled ok, but now the
> script runs and exits immediatly, I do not end up in the rttlua shell. Is this
> desired behaviour??

Yes, unless you provide the "-i" option on the command line.

Best regards
Markus

Ruben Smits's picture

Lua deployment script failing

On Tuesday 24 May 2011 16:30:53 Ruben Smits wrote:
> On Tuesday 24 May 2011 16:23:43 Markus Klotzbuecher wrote:
> > On Tue, May 24, 2011 at 04:01:08PM +0200, Ruben Smits wrote:
> > > On Tuesday 24 May 2011 15:41:44 Markus Klotzbuecher wrote:
> > > > On Tue, May 24, 2011 at 03:26:02PM +0200, Ruben Smits wrote:
> > > > > Hi,
> > > > >
> > > > > i'm trying to write a Lua deployment script according to the
> > > > > LuaCookBook but the following simple script fails;
> > > > >
> > > > > &#10;&gt; &gt; &gt; &gt; &gt; require(&quot;rttlib&quot;)&#10;&gt; &gt; &gt; &gt; &gt; rttlib.color=true&#10;&gt; &gt; &gt; &gt; &gt; &#10;&gt; &gt; &gt; &gt; &gt; tc = rtt.getTC()&#10;&gt; &gt; &gt; &gt; &gt; depl = tc:getPeer(&quot;deployer&quot;)&#10;&gt; &gt; &gt; &gt; &gt; &#10;&gt; &gt; &gt; &gt; &gt; depl:import(&quot;lwr_fri&quot;)&#10;&gt; &gt; &gt; &gt; &gt; depl:loadComponent(&quot;lwr&quot;,&quot;lwr_fri::FRIComponent&quot;)&#10;&gt; &gt; &gt; &gt; &gt;
> > > > >
> > > > > /home/intermodalics/ros/orocos_toolchain_ros/ocl/bin/rttlua-
> > > > > xeno
> > > > > mai:
> > > > > .../ros/orocos_toolchain_ros/ocl/lua/modules/rttlib.lua:447:
> > > > > __lua_todsb: can't convert lua string to /std/string
> > > > > variable
> > > > >
> > > > > stack traceback:
> > > > > [C]: in function 'call'
> > > > > .../ros/orocos_toolchain_ros/ocl/lua/modules
> > > > > /rtt
> > > > > lib.lua:
> > > > > 447: in function 'loadComponent'
> > > > > runfri.lua:8:
> > > > > in main
> > > > > chunk
> > > > > [C]: ?
> > > > >
> > > > > I'm using the RTT and OCL toolchain-2.3 branches.
> > > >
> > > > This is most likely the "typename overriding bug", which didn't
> > > > go
> > > > into 2.3 any more. Could you try master?
> > >
> > > OCL master depends on RTT master that has changes I do not want yet.
> > > So
> > > no, i cannot easily try master. Is there another way to get the
> > > newer
> > > lua stuff in toolchain-2.3??
> >
> > As a quick and dirty hack you could just copy the ocl/lua directory
> > from master to your branch and recompile. AFAICS there is nothing in
> > Lua than requires RTT and OCL master.
>
> I combined OCL master with RTT toolchain-2.3 which compiled ok, but now the
> script runs and exits immediatly, I do not end up in the rttlua shell. Is
> this desired behaviour??

Apparently it is :), I added the -i flag to get in the interactive mode after
running the script.

> > Markus
>
> -- Ruben

-- Ruben