Error: The type 'array' did not provide a type composition function, but I need one to compose it from a PropertyBag

Hi everyone,
Where does the problem lies when i get such error?
[ ERROR ][PropertyLoader:configure] The type 'array' did not provide a
type composition function, but I need one to compose it from a PropertyBag

Thanks,
Vinod

Error: The type 'array' did not provide a type composition funct

On 03/04/2013 03:55 PM, Vinod wrote:
> Hi everyone,
> Where does the problem lies when i get such error?
> [ ERROR ][PropertyLoader:configure] The type 'array' did not provide a type composition function, but I need one to compose it from a PropertyBag
>
as is says, probabaly there is no composition function for 'array' (meaning: you can write the array property, but not read it in again)
are you in a ROS environment?
then try using float64[]

I'm also wondering what's happening with the types, if I write a std::vector with doubles to a property file, sometimes it comes out as a float64[], sometimes array...
similar for strings or string[]...
I think it has to do with the order he loaded the typekits
anyway, your error together with the 'random' type it assigns to your properties, can give 'random' errors that are sometimes there, sometimes not
>
> Thanks,
> Vinod
>
>
nick

Error: The type 'array' did not provide a type composition funct

hi,

On 03/05/2013 03:16 PM, Vinod wrote:
> may be this will help more .. This is my code..
> <properties>
>
> <simple name="num_axes" type="long"><description><description><value>7<value><simple>
>
> <struct name="max_vel" type="array"><description>The maximum velocity in trajectory<description>
> <simple name="Element0" type="double"><description>Axis 1<description><value>0.1<value><simple>
> <simple name="Element1" type="double"><description>Axis 2<description><value>0.1<value><simple>
> <simple name="Element2" type="double"><description>Axis 3<description><value>0.1<value><simple>
> <simple name="Element3" type="double"><description>Axis 4<description><value>0.1<value><simple>
> <simple name="Element4" type="double"><description>Axis 5<description><value>0.1<value><simple>
> <simple name="Element5" type="double"><description>Axis 6<description><value>0.1<value><simple>
> <simple name="Element6" type="double"><description>Axis 7<description><value>0.1<value><simple>
> <struct>
>
> <struct name="max_acc" type="array"><description>The maximum acceleration in trajectory<description>
> <simple name="Element0" type="double"><description>Axis 1<description><value>1.0<value><simple>
> <simple name="Element1" type="double"><description>Axis 2<description><value>1.0<value><simple>
> <simple name="Element2" type="double"><description>Axis 3<description><value>1.0<value><simple>
> <simple name="Element3" type="double"><description>Axis 4<description><value>1.0<value><simple>
> <simple name="Element4" type="double"><description>Axis 5<description><value>1.0<value><simple>
> <simple name="Element5" type="double"><description>Axis 6<description><value>1.0<value><simple>
> <simple name="Element6" type="double"><description>Axis 7<description><value>1.0<value><simple>
> <struct>
>
> <simple name="movingTimeOnPort" type="double"><description>Moving time for desired positions on port.<description><value>0<value><simple>
>
> <struct name="delayTimes" type="array"><description>Delay times for each joint.<description>
> <simple name="Element0" type="double"><description>Axis 1<description><value>0<value><simple>
> <simple name="Element1" type="double"><description>Axis 2<description><value>0<value><simple>
> <simple name="Element2" type="double"><description>Axis 3<description><value>0<value><simple>
> <simple name="Element3" type="double"><description>Axis 4<description><value>0<value><simple>
> <simple name="Element4" type="double"><description>Axis 5<description><value>0<value><simple>
> <simple name="Element5" type="double"><description>Axis 6<description><value>0<value><simple>
> <simple name="Element6" type="double"><description>Axis 7<description><value>0<value><simple>
> <struct>
>
> <properties>

ok, this looks to be a cpf file from a trajectory generator from the stack trajectory_generators or motion_control
most likely a std::vector<double> in the C++ source code (look for the this->addProperty statement in the cpp file, and the corresponding declarationi in hpp file)
are you using orocos 2.5 or 2.6?
if 'doubles' is available as a type (check with .types) replace type="array" with type="doubles" in your cpf file
if not, change with type="float64[]" and make sure you loaded the typekit with the ROS types (import("rtt_std_msgs"))

if this doesn't work, please specify details about your installation and the log of your error

hth

nick
>

Error: The type 'array' did not provide a type composition funct

Hi Dominick,
Yes i am using ROS. And when i tried with float64. It
returned a similar error
The type 'float32' did not provide a type composition function, but I need
one to compose it from a PropertyBag

Thanks,
Vinod

Error: The type 'array' did not provide a type composition funct

sorry previous message was a mistake
Hi Dominick,
Yes i am using ROS. And when i tried with float64. It
returned a similar error
The type 'float64' did not provide a type composition function, but I need
one to compose it from a PropertyBag

Thanks,
Vinod

Error: The type 'array' did not provide a type composition funct

hi vinod,

On 03/04/2013 04:25 PM, Vinod wrote:
> sorry previous message was a mistake
> Hi Dominick,
> Yes i am using ROS. And when i tried with float64. It returned a similar error
> The type 'float64' did not provide a type composition function, but I need one to compose it from a PropertyBag
it is a vector/array no? then you'll have to put the [] begind float64, and it has a capital F I think
it seems there is also a 'doubles' type
look for the exact spelling of available types by typing .types in the taskbrowser:

rosrun ocl deployer-gnulinux
Real-time memory: 517904 bytes free of 524288 allocated.
Switched to : Deployer

This console reader allows you to browse and manipulate TaskContexts.
You can type in an operation, expression, create or change variables.
(type 'help' for instructions and 'ls' for context info)

TAB completion and HISTORY is available ('bash' like)

Use 'Ctrl-D' or type 'quit' to exit this program.

Deployer [S]> .types
Available data types: ConnPolicy FlowStatus PropertyBag SendHandle SendStatus TaskContext array bool char double doubles float int ints rt_string string strings uint void
Deployer [S]>

>
> Thanks,
> Vinod

Error: The type 'array' did not provide a type composition funct

I checked the exact names in .types. "array", "float64" and "float[64] are
available.
And for your reference i tried "Array". It returned
Error : Could not compose unknown type 'Array'

So i believe its fine with "array" naming. So anyother possible reason for
the problem?

Error: The type 'array' did not provide a type composition funct

On 03/05/2013 01:12 PM, Vinod wrote:
> I checked the exact names in .types. "array", "float64" and "float[64] are available.
> And for your reference i tried "Array". It returned
> Error : Could not compose unknown type 'Array'
>
> So i believe its fine with "array" naming. So anyother possible reason for the problem?

what is the type of the property in your C++ code, is it std::vector<double>
or did you create it on the fly in the taskbrowser?
or in lua?

Error: The type 'array' did not provide a type composition funct

Problem solved when i used "float64[]" instead of "array"

Thank you Dominick

Error: The type 'array' did not provide a type composition funct

On Mar 5, 2013, at 9:39 AM, Vinod <vinoindya [..] ...> wrote:

> Problem solved when i used "float64[]" instead of "array"
>
> Thank you Dominick
>

Error: The type 'array' did not provide a type composition funct

On Tue, Mar 5, 2013 at 7:21 PM, Gooding, Dustin R. (JSC-ER411)
<dustin [dot] r [dot] gooding [..] ...> wrote:
> On Mar 5, 2013, at 9:39 AM, Vinod <vinoindya [..] ...> wrote:
>
>> Problem solved when i used "float64[]" instead of "array"
>>
>> Thank you Dominick
>>
>> --
>> Orocos-Users mailing list
>> Orocos-Users [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users
>
> Would it be possible to get a mapping created for CPF types to C++ types? We've started collecting the mappings we use on an internal wiki, but that seems like something that would be useful to all.

This is supposed to be fixed in 2.6 (transparant type aliases), but if
users aren't reporting their Orocos version, I'm assuming they're
using a really old one...

Peter