Orocos toolchain indigo migrating command problems

Hi,

I’m installing iTaSC on an Odroid XU3 small computer using Ubuntu 14.04 and ROS Indigo for ARM.
The Orocos toolchain is set up properly and everything has compiled.
However, I am struggling with adapting our deployer start up scripts to get everything running as the Orocos structure has changed from Groovy to Indigo.

I have an executable: run_test_indigo.sh

rosrun rtt_ros deployer -lwarning -s itasc_deploy_taskbrowser_indigo.ops -- file://itasc_core#/test2.lua

It gives me an error when I launch it:

Error: No package with the name 'itasc_core' found. Did you set the ROS_PACKAGE_PATH correctly?

The error comes from a lua script that the .ops file executes (itasc_deploy_taskbrowser.lua) as it in turn tries to execute the following function:

function filespec2file(filespec)
local _,_,filename=string.find(filespec, "file://(.*)")

if filename then
-- if package
local ret,_,pack,file = string.find(filename,"(.+)#(.+)")
if ret~=nil then
local packpath, res
res, packpath = pcall(rttros.find_rospack, pack)
if not res then
print("Error: No package with the name '"..tostring(pack).."' found. Did you set the ROS_PACKAGE_PATH correctly?")
os.exit(1)
end
if(string.find(file,"/(.*)")) then
filename = packpath..file
else
filename = packpath.."/"..file
end
end
if not utils.file_exists(filename) then
print("Error: non-existing file "..filename)
os.exit(1)
end
else
print("Syntax error: Given file name '"..filespec.."' does not follow filespec syntax: file://ROSpackage#/path/to/file.extention")
os.exit(1)
end
return filename
end

At the beginning of the lua file we have this:
local rttlib=require("rttlib")
local rttros = require("rttros")

I don't know why it can't find a rospackage within a lua script but no problem from within the .ops script.
Any thoughts? Do I need to import a different library?

Jon

Orocos toolchain indigo migrating command problems

Hi Jon,

I did not know about the rttros.find_rospack function, but obviously people
had problems with it before:
http://www.orocos.org/forum/orocos/orocos-users/lua-fixing-broken-rttros...

The "official" way to find the path of ROS packages, independent of the
scripting language, would be via a global operation provided by the
rtt_rospack package. After having imported the package your Lua script
should work if you replace the pcall line by

rs, packpath = pcall(rtt.provides("ros"):getOperation("find"), pack)

Cheers,
Johannes

On Mon, Jul 27, 2015 at 3:49 PM, Jon Verbeke <jon [dot] verbeke [..] ...>
wrote:

> Hi,
>
> I’m installing iTaSC on an Odroid XU3 small computer using Ubuntu 14.04
> and ROS Indigo for ARM.
> The Orocos toolchain is set up properly and everything has compiled.
> However, I am struggling with adapting our deployer start up scripts to
> get everything running as the Orocos structure has changed from Groovy to
> Indigo.
>
> I have an executable: run_test_indigo.sh
>
> rosrun rtt_ros deployer -lwarning -s itasc_deploy_taskbrowser_indigo.ops

Orocos toolchain indigo migrating command problems

Hi Johannes,

I've got a new problem now. I startup the deployer and then a lua script tries to setup itasc:

Orocos toolchain indigo migrating command problems

Hi Jon,

On Tue, Jul 28, 2015 at 10:22 AM, Jon Verbeke <jon [dot] verbeke [..] ...>
wrote:

> Hi Johannes,
>
> I've got a new problem now. I startup the deployer and then a lua script
> tries to setup itasc:
>

Orocos toolchain indigo migrating command problems

Hi Johannes,

Thanks! After fixing some more errors I finally got it running!

Cheers,

Jon
________________________________________
Van: Johannes Meyer [johannes [..] ...]
Verzonden: dinsdag 28 juli 2015 10:50
Aan: Jon Verbeke
CC: orocos-users [..] ...
Onderwerp: Re: [Orocos-users] Orocos toolchain indigo migrating command problems

Hi Jon,

On Tue, Jul 28, 2015 at 10:22 AM, Jon Verbeke <jon [dot] verbeke [..] ...jon [dot] verbeke [..] ...>> wrote:
Hi Johannes,

I've got a new problem now. I startup the deployer and then a lua script tries to setup itasc:

Orocos toolchain indigo migrating command problems

Found it:

All rttros.find_rospack should be replaced by rttros.find_rospack_roslua.

The function has been renamed...

Jon
________________________________________
Van: Jon Verbeke
Verzonden: maandag 27 juli 2015 15:49
Aan: orocos-users [..] ...
Onderwerp: Orocos toolchain indigo migrating command problems

Hi,

I’m installing iTaSC on an Odroid XU3 small computer using Ubuntu 14.04 and ROS Indigo for ARM.
The Orocos toolchain is set up properly and everything has compiled.
However, I am struggling with adapting our deployer start up scripts to get everything running as the Orocos structure has changed from Groovy to Indigo.

I have an executable: run_test_indigo.sh

rosrun rtt_ros deployer -lwarning -s itasc_deploy_taskbrowser_indigo.ops -- file://itasc_core#/test2.lua

It gives me an error when I launch it:

Error: No package with the name 'itasc_core' found. Did you set the ROS_PACKAGE_PATH correctly?

The error comes from a lua script that the .ops file executes (itasc_deploy_taskbrowser.lua) as it in turn tries to execute the following function:

function filespec2file(filespec)
local _,_,filename=string.find(filespec, "file://(.*)")

if filename then
-- if package
local ret,_,pack,file = string.find(filename,"(.+)#(.+)")
if ret~=nil then
local packpath, res
res, packpath = pcall(rttros.find_rospack, pack)
if not res then
print("Error: No package with the name '"..tostring(pack).."' found. Did you set the ROS_PACKAGE_PATH correctly?")
os.exit(1)
end
if(string.find(file,"/(.*)")) then
filename = packpath..file
else
filename = packpath.."/"..file
end
end
if not utils.file_exists(filename) then
print("Error: non-existing file "..filename)
os.exit(1)
end
else
print("Syntax error: Given file name '"..filespec.."' does not follow filespec syntax: file://ROSpackage#/path/to/file.extention")
os.exit(1)
end
return filename
end

At the beginning of the lua file we have this:
local rttlib=require("rttlib")
local rttros = require("rttros")

I don't know why it can't find a rospackage within a lua script but no problem from within the .ops script.
Any thoughts? Do I need to import a different library?

Jon