lua rospack find not found
Closed this issue · 1 comments
I am using ros indigo and ros-indigo-ocl install
The rospack command suggested in the LuaCookBook does not work for me
require "rttros"
=rttros.find_rospack("geometry_msgs")
and creates this error message
/opt/ros/indigo/share/lua/5.1/rttros.lua:39: Service.provides: no subservice rospack of service GlobalService
stack traceback:
[C]: in function 'provides'
/opt/ros/indigo/share/lua/5.1/rttros.lua:39: in function </opt/ros/indigo/share/lua/5.1/rttros.lua:31>
(tail call): ?
[C]:
this seems obvious as the operation is added to "ros" service and not to "rospack" in
https://github.com/orocos/rtt_ros_integration/blob/indigo-devel/rtt_rospack/src/rtt_rospack_service.cpp
=rtt.provides("ros")
Service: ros
Subservices: comm
Ports:
Attributes:
protocol_id (int) = 3
Properties:
Operations:
string find(string const& )
but called from rospack exactly at the line 39 https://github.com/orocos-toolchain/ocl/blob/toolchain-2.8/lua/modules/rttros.lua rtt_rospack_find=rtt.provides("rospack"):getOperation("find")
So the workaround I found is to add in all my lua files the fix as this
rtt_rospack_find=rtt.provides("ros"):getOperation("find")
=rtt_rospack_find("geometry_msgs")
/opt/ros/indigo/share/geometry_msgs
If this is a bug, can the rttros.lua be fixed upstream (possibly in indigo) ?
The suggested one liner is indeed cleaner than these additional lines everywhere.
thanks
#33 fixes that, did not see this PR and that it was merged the next day