rttros.lua in orocos toolchain error

hi,

I've a problem when using rttros.find_rospack('my_package')
when I use it in a normal lua file: it works
when I execute this file from within orocos, it does work on my first system but not the second (=it doesn't find the requested package)

the ROS_PACKAGE_PATH is correct in both cases and this env var is accessible

first system:
ubuntu precise (12.04 lts)
ros fuerte
orocos_toolchain 2.06.0.9 (deb pkg)

second system:
ubuntu precise
ros groovy
orocos_toolchain: 2.6.0.14 (deb pkg)

the example test.lua file:
----------------------
#!/usr/bin/env rttlua
print(os.getenv("ROS_PACKAGE_PATH"))
local rttros = require("rttros")
res, packpath = pcall(rttros.find_rospack, 'itasc_dsl')
print(tostring(res))
print('path')
print(packpath)

the example test.ops script:
------------------------
require("print")
loadService("Deployer","Lua")
Lua.exec_file("/path/to/test.lua")

the output for system 2: direct execution of the lua file (system 1 gives same output for direct and orocos execution as this) = as expected
----------------------------------------
./test.lua
Real-time memory: 521040 bytes free of 524288 allocated.
/home/jonas/catkin_ws/src/itasc_tests:/home/jonas/catkin_ws/src/ rtt_pr2_controllers_msgs:/home/jonas/catkin_ws/src:/home/jonas/catkin_ws/src/
itasc_dsl:/home/jonas/catkin_ws/src/uMF:/home/jonas/catkin_ws/src/cob_common:/home/ jonas/catkin_ws/src/youbot-ros-pkg-kdl:/home/jonas/catkin_ws/src/youbot-ros-pkg:/
home/jonas/catkin_ws/src/motion_control:/home/jonas/catkin_ws/src/youbot_hardware:/ home/jonas/catkin_ws/src/itasc_examples:/home/jonas/catkin_ws/src/
trajectory_generators:/home/jonas/catkin_ws/src/rttlua_completion:/home/jonas/ catkin_ws/src/rFSM:/home/jonas/catkin_ws/src/itasc_comanipulation_demo:/home/jonas/
catkin_ws/src/itasc_robots_objects:/home/jonas/catkin_ws/src/itasc_tasks:/home/jonas/catkin_ws/src/itasc_solvers:/home/jonas/catkin_ws/src/itasc_core:/home/jonas/
catkin_ws/src/itasc:/opt/ros/groovy/share:/opt/ros/groovy/stacks
true
path
/home/jonas/catkin_ws/src/itasc_dsl

the output for system 2: execution using orocos
------------------------------------
rosrun ocl deployer-gnulinux -s test.ops
Real-time memory: 521040 bytes free of 524288 allocated.
/home/jonas/catkin_ws/src/itasc_tests:/home/jonas/catkin_ws/src/ rtt_pr2_controllers_msgs:/home/jonas/catkin_ws/src:/home/jonas/catkin_ws/src/
itasc_dsl:/home/jonas/catkin_ws/src/uMF:/home/jonas/catkin_ws/src/cob_common:/home/ jonas/catkin_ws/src/youbot-ros-pkg-kdl:/home/jonas/catkin_ws/src/youbot-ros-pkg:/
home/jonas/catkin_ws/src/motion_control:/home/jonas/catkin_ws/src/youbot_hardware:/ home/jonas/catkin_ws/src/itasc_examples:/home/jonas/catkin_ws/src/
trajectory_generators:/home/jonas/catkin_ws/src/rttlua_completion:/home/jonas/ catkin_ws/src/rFSM:/home/jonas/catkin_ws/src/itasc_comanipulation_demo:/home/jonas/
catkin_ws/src/itasc_robots_objects:/home/jonas/catkin_ws/src/itasc_tasks:/home/jonas/catkin_ws/src/itasc_solvers:/home/jonas/catkin_ws/src/itasc_core:/home/jonas/
catkin_ws/src/itasc:/opt/ros/groovy/share:/opt/ros/groovy/stacks
false
path
...y/stacks/orocos_toolchain/ocl/lua/modules/rttros.lua:26: Package path could not be found for itasc_dsl

any idea what caused this?
thanks for your help

nick

rttros.lua in orocos toolchain error

On Mo, Dez 16, 2013 at 05:13:19 +0100, Dominick Vanthienen wrote:
>hi,
>
>I've a problem when using rttros.find_rospack('my_package')
>when I use it in a normal lua file: it works
>when I execute this file from within orocos, it does work on my first system but not the second (=it doesn't find the requested package)
>
>the ROS_PACKAGE_PATH is correct in both cases and this env var is accessible
>
>first system:
>ubuntu precise (12.04 lts)
>ros fuerte
>orocos_toolchain 2.06.0.9 (deb pkg)
>
>second system:
>ubuntu precise
>ros groovy
>orocos_toolchain: 2.6.0.14 (deb pkg)
>
>the example test.lua file:
>----------------------
>#!/usr/bin/env rttlua
>print(os.getenv("ROS_PACKAGE_PATH"))
>local rttros = require("rttros")
>res, packpath = pcall(rttros.find_rospack, 'itasc_dsl')
>print(tostring(res))
>print('path')
>print(packpath)
>
>
>the example test.ops script:
>------------------------
>require("print")
>loadService("Deployer","Lua")
>Lua.exec_file("/path/to/test.lua")
>
>the output for system 2: direct execution of the lua file (system 1 gives same output for direct and orocos execution as this) = as expected
>----------------------------------------
>./test.lua
>Real-time memory: 521040 bytes free of 524288 allocated.
>/home/jonas/catkin_ws/src/itasc_tests:/home/jonas/catkin_ws/src/ rtt_pr2_controllers_msgs:/home/jonas/catkin_ws/src:/home/jonas/catkin_ws/src/ itasc_dsl:/home/jonas/catkin_ws/src/uMF:/home/jonas/catkin_ws/src/cob_common:/home/ jonas/catkin_ws/src/youbot-ros-pkg-kdl:/home/jonas/catkin_ws/src/youbot-ros-pkg:/ home/jonas/catkin_ws/src/motion_control:/home/jonas/catkin_ws/src/youbot_hardware:/
>home/jonas/catkin_ws/src/itasc_examples:/home/jonas/catkin_ws/src/ trajectory_generators:/home/jonas/catkin_ws/src/rttlua_completion:/home/jonas/ catkin_ws/src/rFSM:/home/jonas/catkin_ws/src/itasc_comanipulation_demo:/home/jonas/ catkin_ws/src/itasc_robots_objects:/home/jonas/catkin_ws/src/itasc_tasks:/home/jonas/catkin_ws/src/itasc_solvers:/home/jonas/catkin_ws/src/itasc_core:/home/jonas/
>catkin_ws/src/itasc:/opt/ros/groovy/share:/opt/ros/groovy/stacks
>true
>path
>/home/jonas/catkin_ws/src/itasc_dsl
>
>the output for system 2: execution using orocos
>------------------------------------
>rosrun ocl deployer-gnulinux -s test.ops
>Real-time memory: 521040 bytes free of 524288 allocated.
>/home/jonas/catkin_ws/src/itasc_tests:/home/jonas/catkin_ws/src/ rtt_pr2_controllers_msgs:/home/jonas/catkin_ws/src:/home/jonas/catkin_ws/src/ itasc_dsl:/home/jonas/catkin_ws/src/uMF:/home/jonas/catkin_ws/src/cob_common:/home/ jonas/catkin_ws/src/youbot-ros-pkg-kdl:/home/jonas/catkin_ws/src/youbot-ros-pkg:/ home/jonas/catkin_ws/src/motion_control:/home/jonas/catkin_ws/src/youbot_hardware:/
>home/jonas/catkin_ws/src/itasc_examples:/home/jonas/catkin_ws/src/ trajectory_generators:/home/jonas/catkin_ws/src/rttlua_completion:/home/jonas/ catkin_ws/src/rFSM:/home/jonas/catkin_ws/src/itasc_comanipulation_demo:/home/jonas/ catkin_ws/src/itasc_robots_objects:/home/jonas/catkin_ws/src/itasc_tasks:/home/jonas/catkin_ws/src/itasc_solvers:/home/jonas/catkin_ws/src/itasc_core:/home/jonas/
>catkin_ws/src/itasc:/opt/ros/groovy/share:/opt/ros/groovy/stacks
>false
>path
>...y/stacks/orocos_toolchain/ocl/lua/modules/rttros.lua:26: Package path could not be found for itasc_dsl
>
>any idea what caused this?

Yes:

http://www.orocos.org/forum/orocos/orocos-users/lua-fixing-broken-rttros...

and the fix:

https://gitorious.org/orocos-toolchain/ocl/merge_requests/14

For some reason this didn't get merged into 2.7...

>thanks for your help

Markus

rttros.lua in orocos toolchain error

Hi Ruben,

On Di, Dez 17, 2013 at 10:12:24 +0100, Ruben Smits wrote:
>
>Hello markusk
>
>Ruben Smits has sent you a message on Gitorious:
>----------------------------------------------------
>
>Ruben Smits commented:
>
>All available in toolchain 2.6+

I don't see these patches anywhere in 2.6 or later.

Markus

rttros.lua in orocos toolchain error

On Di, Dez 17, 2013 at 10:27:00 +0100, Markus Klotzbuecher wrote:
>Hi Ruben,
>
>On Di, Dez 17, 2013 at 10:12:24 +0100, Ruben Smits wrote:
>>
>>Hello markusk
>>
>>Ruben Smits has sent you a message on Gitorious:
>>----------------------------------------------------
>>
>>Ruben Smits commented:
>>
>>All available in toolchain 2.6+
>
>I don't see these patches anywhere in 2.6 or later.

For the record, Ruben has just merged the patches.

Thanks!
Markus

Ruben Smits's picture

rttros.lua in orocos toolchain error

This was another PR, I'll look at PR 14 ASAP

Ruben

On Tue, Dec 17, 2013 at 10:27 AM, Markus Klotzbuecher
<markus [dot] klotzbuecher [..] ...> wrote:
> Hi Ruben,
>
> On Di, Dez 17, 2013 at 10:12:24 +0100, Ruben Smits wrote:
>>
>>Hello markusk
>>
>>Ruben Smits has sent you a message on Gitorious:
>>----------------------------------------------------
>>
>>Ruben Smits commented:
>>
>>All available in toolchain 2.6+
>
> I don't see these patches anywhere in 2.6 or later.
>
> Markus