brics_actuator RTT typekit only works partially

I've generated the RTT typekit using the rtt_ros_integration macro for
the brics_actuator package
(https://github.com/abubeck/brics-interfaces). However, upon loading
the typekit, the deployer knows all the types but only decomposes part
of them. For example:

"Configuration Properties:
JointPositions pos_tmp = {poisonStamp = {originator = ,
description = , qos = 0 }, positions = (unknown_t) } ()"

the positions element is an array of JointValue messages. This
"JointValue" type is known to the type system:

"Controller [R]> var JointValue t
= {value = 0 }"

Why is the positions element not properly decomposed / known to the system?

regards,

Steven

brics_actuator RTT typekit only works partially

On Thursday 02 December 2010 10:24:18 Steven Bellens wrote:
> I've generated the RTT typekit using the rtt_ros_integration macro for
> the brics_actuator package
> (https://github.com/abubeck/brics-interfaces). However, upon loading
> the typekit, the deployer knows all the types but only decomposes part
> of them. For example:
>
> "Configuration Properties:
> JointPositions pos_tmp = {poisonStamp = {originator = ,
> description = , qos = 0 }, positions = (unknown_t) } ()"
>
> the positions element is an array of JointValue messages. This
> "JointValue" type is known to the type system:
>
> "Controller [R]> var JointValue t
> = {value = 0 }"
>
> Why is the positions element not properly decomposed / known to the system?

What does '.types' list ? Is positions an std::vector or a fixed size [] array
of JointValue ?

Peter

brics_actuator RTT typekit only works partially

2010/12/2 Peter Soetens <peter [..] ...>:
> On Thursday 02 December 2010 10:24:18 Steven Bellens wrote:
>> I've generated the RTT typekit using the rtt_ros_integration macro for
>> the brics_actuator package
>> (https://github.com/abubeck/brics-interfaces). However, upon loading
>> the typekit, the deployer knows all the types but only decomposes part
>> of them. For example:
>>
>> "Configuration Properties:
>> JointPositions pos_tmp        = {poisonStamp = {originator = ,
>> description = , qos = 0 }, positions = (unknown_t) } ()"
>>
>> the positions element is an array of JointValue messages. This
>> "JointValue" type is known to the type system:
>>
>> "Controller [R]> var JointValue t
>>  = {value = 0 }"
>>
>> Why is the positions element not properly decomposed / known to the system?
>
> What does '.types' list ? Is positions an std::vector or a fixed size [] array
> of JointValue ?

".types
Available data types: Bool Byte ByteMultiArray CartesianImpedance
CartesianPose CartesianTwist CartesianVector CartesianWrench Char
Clock ColorRGBA ConnPolicy Duration Empty Float32 Float32MultiArray
Float64 Float64MultiArray FlowStatus Header Int16 Int16MultiArray
Int32 Int32MultiArray Int64 Int64MultiArray Int8 Int8MultiArray
JointAccelerations JointConstraint JointImpedances JointPositions
JointTorques JointValue JointValues JointVelocities Log
MultiArrayDimension MultiArrayLayout Point Point32 PointStamped Poison
Polygon PolygonStamped Pose Pose2D PoseArray PoseStamped
PoseWithCovariance PoseWithCovarianceStamped PropertyBag Quaternion
QuaternionStamped SendHandle SendStatus String TaskContext Time
Transform TransformStamped Twist TwistStamped TwistWithCovariance
TwistWithCovarianceStamped UInt16 UInt16MultiArray UInt32
UInt32MultiArray UInt64 UInt64MultiArray UInt8 UInt8MultiArray Vector3
Vector3Stamped Wrench WrenchStamped array bool char double float int
rt_string string time uint void"

It's an std::vector of JointValue

Steven

>
> Peter
>

brics_actuator RTT typekit only works partially

On Thursday 02 December 2010 11:07:18 Steven Bellens wrote:
> 2010/12/2 Peter Soetens <peter [..] ...>:
> > On Thursday 02 December 2010 10:24:18 Steven Bellens wrote:
> >> I've generated the RTT typekit using the rtt_ros_integration macro for
> >> the brics_actuator package
> >> (https://github.com/abubeck/brics-interfaces). However, upon loading
> >> the typekit, the deployer knows all the types but only decomposes part
> >> of them. For example:
> >>
> >> "Configuration Properties:
> >> JointPositions pos_tmp = {poisonStamp = {originator = ,
> >> description = , qos = 0 }, positions = (unknown_t) } ()"
> >>
> >> the positions element is an array of JointValue messages. This
> >> "JointValue" type is known to the type system:
> >>
> >> "Controller [R]> var JointValue t
> >> = {value = 0 }"
> >>
> >> Why is the positions element not properly decomposed / known to the
> >> system?
> >
> > What does '.types' list ? Is positions an std::vector or a fixed size []
> > array of JointValue ?
>
> ".types
> Available data types: Bool Byte ByteMultiArray CartesianImpedance
> CartesianPose CartesianTwist CartesianVector CartesianWrench Char
> Clock ColorRGBA ConnPolicy Duration Empty Float32 Float32MultiArray
> Float64 Float64MultiArray FlowStatus Header Int16 Int16MultiArray
> Int32 Int32MultiArray Int64 Int64MultiArray Int8 Int8MultiArray
> JointAccelerations JointConstraint JointImpedances JointPositions
> JointTorques JointValue JointValues JointVelocities Log
> MultiArrayDimension MultiArrayLayout Point Point32 PointStamped Poison
> Polygon PolygonStamped Pose Pose2D PoseArray PoseStamped
> PoseWithCovariance PoseWithCovarianceStamped PropertyBag Quaternion
> QuaternionStamped SendHandle SendStatus String TaskContext Time
> Transform TransformStamped Twist TwistStamped TwistWithCovariance
> TwistWithCovarianceStamped UInt16 UInt16MultiArray UInt32
> UInt32MultiArray UInt64 UInt64MultiArray UInt8 UInt8MultiArray Vector3
> Vector3Stamped Wrench WrenchStamped array bool char double float int
> rt_string string time uint void"
>
> It's an std::vector of JointValue
>

If a type is unknown_t, it means the proper typekit has not been found. We
need a better look at the generated code to figure out what went wrong...

Somehow, the typeinfo for JointValue[] has not been generated, probably
because no .msg file for it exists. A solution would be to generate the
SequenceTypeInfo<T> for each .msg type as well, such that we automatically
support a sequence of each message type. This is adding one line of code in
the template files for generating the typekits (ie, below where it says
StructTypeInfo<T>(...) ) You could then name that sequence type 'Name'[]

Peter

brics_actuator RTT typekit only works partially

2010/12/2 Peter Soetens <peter [..] ...>:
> On Thursday 02 December 2010 11:07:18 Steven Bellens wrote:
>> 2010/12/2 Peter Soetens <peter [..] ...>:
>> > On Thursday 02 December 2010 10:24:18 Steven Bellens wrote:
>> >> I've generated the RTT typekit using the rtt_ros_integration macro for
>> >> the brics_actuator package
>> >> (https://github.com/abubeck/brics-interfaces). However, upon loading
>> >> the typekit, the deployer knows all the types but only decomposes part
>> >> of them. For example:
>> >>
>> >> "Configuration Properties:
>> >> JointPositions pos_tmp        = {poisonStamp = {originator = ,
>> >> description = , qos = 0 }, positions = (unknown_t) } ()"
>> >>
>> >> the positions element is an array of JointValue messages. This
>> >> "JointValue" type is known to the type system:
>> >>
>> >> "Controller [R]> var JointValue t
>> >>  = {value = 0 }"
>> >>
>> >> Why is the positions element not properly decomposed / known to the
>> >> system?
>> >
>> > What does '.types' list ? Is positions an std::vector or a fixed size []
>> > array of JointValue ?
>>
>> ".types
>> Available data types:  Bool Byte ByteMultiArray CartesianImpedance
>> CartesianPose CartesianTwist CartesianVector CartesianWrench Char
>> Clock ColorRGBA ConnPolicy Duration Empty Float32 Float32MultiArray
>> Float64 Float64MultiArray FlowStatus Header Int16 Int16MultiArray
>> Int32 Int32MultiArray Int64 Int64MultiArray Int8 Int8MultiArray
>> JointAccelerations JointConstraint JointImpedances JointPositions
>> JointTorques JointValue JointValues JointVelocities Log
>> MultiArrayDimension MultiArrayLayout Point Point32 PointStamped Poison
>> Polygon PolygonStamped Pose Pose2D PoseArray PoseStamped
>> PoseWithCovariance PoseWithCovarianceStamped PropertyBag Quaternion
>> QuaternionStamped SendHandle SendStatus String TaskContext Time
>> Transform TransformStamped Twist TwistStamped TwistWithCovariance
>> TwistWithCovarianceStamped UInt16 UInt16MultiArray UInt32
>> UInt32MultiArray UInt64 UInt64MultiArray UInt8 UInt8MultiArray Vector3
>> Vector3Stamped Wrench WrenchStamped array bool char double float int
>> rt_string string time uint void"
>>
>> It's an std::vector of JointValue
>>
>
> If a type is unknown_t, it means the proper typekit has not been found. We
> need a better look at the generated code to figure out what went wrong...
>
> Somehow, the typeinfo for JointValue[] has not been generated, probably
> because no .msg file for it exists. A solution would be to generate the
> SequenceTypeInfo<T> for each .msg type as well, such that we automatically
> support a sequence of each message type. This is adding one line of code in
> the template files for generating the typekits (ie, below where it says
> StructTypeInfo<T>(...) ) You could then name that sequence type 'Name'[]

I need some help with the syntax:
The current code now states:
"RTT::types::Types()->addType( new
types::StructTypeInfo<@ROSMSGTYPE@>("@ROSMSGNAME@") );"

I thought about adding:

RTT::types::Types()->addType( new types::StructTypeInfo<std::vector
<@ROSMSGTYPE@>>("@ROSMSGNAME@_array") );

How would the syntax be with the [] operator?

Steven

>
> Peter
>

brics_actuator RTT typekit only works partially

On Thursday 02 December 2010 16:34:38 Steven Bellens wrote:
> 2010/12/2 Peter Soetens <peter [..] ...>:
> > On Thursday 02 December 2010 11:07:18 Steven Bellens wrote:
> >> 2010/12/2 Peter Soetens <peter [..] ...>:
> >> > On Thursday 02 December 2010 10:24:18 Steven Bellens wrote:
> >> >> I've generated the RTT typekit using the rtt_ros_integration macro
> >> >> for the brics_actuator package
> >> >> (https://github.com/abubeck/brics-interfaces). However, upon loading
> >> >> the typekit, the deployer knows all the types but only decomposes
> >> >> part of them. For example:
> >> >>
> >> >> "Configuration Properties:
> >> >> JointPositions pos_tmp = {poisonStamp = {originator = ,
> >> >> description = , qos = 0 }, positions = (unknown_t) } ()"
> >> >>
> >> >> the positions element is an array of JointValue messages. This
> >> >> "JointValue" type is known to the type system:
> >> >>
> >> >> "Controller [R]> var JointValue t
> >> >> = {value = 0 }"
> >> >>
> >> >> Why is the positions element not properly decomposed / known to the
> >> >> system?
> >> >
> >> > What does '.types' list ? Is positions an std::vector or a fixed size
> >> > [] array of JointValue ?
> >>
> >> ".types
> >> Available data types: Bool Byte ByteMultiArray CartesianImpedance
> >> CartesianPose CartesianTwist CartesianVector CartesianWrench Char
> >> Clock ColorRGBA ConnPolicy Duration Empty Float32 Float32MultiArray
> >> Float64 Float64MultiArray FlowStatus Header Int16 Int16MultiArray
> >> Int32 Int32MultiArray Int64 Int64MultiArray Int8 Int8MultiArray
> >> JointAccelerations JointConstraint JointImpedances JointPositions
> >> JointTorques JointValue JointValues JointVelocities Log
> >> MultiArrayDimension MultiArrayLayout Point Point32 PointStamped Poison
> >> Polygon PolygonStamped Pose Pose2D PoseArray PoseStamped
> >> PoseWithCovariance PoseWithCovarianceStamped PropertyBag Quaternion
> >> QuaternionStamped SendHandle SendStatus String TaskContext Time
> >> Transform TransformStamped Twist TwistStamped TwistWithCovariance
> >> TwistWithCovarianceStamped UInt16 UInt16MultiArray UInt32
> >> UInt32MultiArray UInt64 UInt64MultiArray UInt8 UInt8MultiArray Vector3
> >> Vector3Stamped Wrench WrenchStamped array bool char double float int
> >> rt_string string time uint void"
> >>
> >> It's an std::vector of JointValue
> >
> > If a type is unknown_t, it means the proper typekit has not been found.
> > We need a better look at the generated code to figure out what went
> > wrong...
> >
> > Somehow, the typeinfo for JointValue[] has not been generated, probably
> > because no .msg file for it exists. A solution would be to generate the
> > SequenceTypeInfo<T> for each .msg type as well, such that we
> > automatically support a sequence of each message type. This is adding
> > one line of code in the template files for generating the typekits (ie,
> > below where it says StructTypeInfo<T>(...) ) You could then name that
> > sequence type 'Name'[]
>
> I need some help with the syntax:
> The current code now states:
> "RTT::types::Types()->addType( new
> types::StructTypeInfo<@ROSMSGTYPE@>("@ROSMSGNAME@") );"
>
> I thought about adding:
>
> RTT::types::Types()->addType( new types::StructTypeInfo<std::vector
> <@ROSMSGTYPE@>>("@ROSMSGNAME@_array") );
>
> How would the syntax be with the [] operator?

You have to add instead of what you propose:

RTT::types::Types()->addType( new types::SequenceTypeInfo<std::vector
<@ROSMSGTYPE@>>("@ROSMSGNAME@[]") );

So Sequence instead of Struct and use [] in the name to match the ROS name.

Peter

brics_actuator RTT typekit only works partially

On Thu, Dec 2, 2010 at 4:54 PM, Peter Soetens <peter [..] ...>wrote:

> On Thursday 02 December 2010 16:34:38 Steven Bellens wrote:
> > 2010/12/2 Peter Soetens <peter [..] ...>:
> > > On Thursday 02 December 2010 11:07:18 Steven Bellens wrote:
> > >> 2010/12/2 Peter Soetens <peter [..] ...>:
> > >> > On Thursday 02 December 2010 10:24:18 Steven Bellens wrote:
> > >> >> I've generated the RTT typekit using the rtt_ros_integration macro
> > >> >> for the brics_actuator package
> > >> >> (https://github.com/abubeck/brics-interfaces). However, upon
> loading
> > >> >> the typekit, the deployer knows all the types but only decomposes
> > >> >> part of them. For example:
> > >> >>
> > >> >> "Configuration Properties:
> > >> >> JointPositions pos_tmp = {poisonStamp = {originator = ,
> > >> >> description = , qos = 0 }, positions = (unknown_t) } ()"
> > >> >>
> > >> >> the positions element is an array of JointValue messages. This
> > >> >> "JointValue" type is known to the type system:
> > >> >>
> > >> >> "Controller [R]> var JointValue t
> > >> >> = {value = 0 }"
> > >> >>
> > >> >> Why is the positions element not properly decomposed / known to the
> > >> >> system?
> > >> >
> > >> > What does '.types' list ? Is positions an std::vector or a fixed
> size
> > >> > [] array of JointValue ?
> > >>
> > >> ".types
> > >> Available data types: Bool Byte ByteMultiArray CartesianImpedance
> > >> CartesianPose CartesianTwist CartesianVector CartesianWrench Char
> > >> Clock ColorRGBA ConnPolicy Duration Empty Float32 Float32MultiArray
> > >> Float64 Float64MultiArray FlowStatus Header Int16 Int16MultiArray
> > >> Int32 Int32MultiArray Int64 Int64MultiArray Int8 Int8MultiArray
> > >> JointAccelerations JointConstraint JointImpedances JointPositions
> > >> JointTorques JointValue JointValues JointVelocities Log
> > >> MultiArrayDimension MultiArrayLayout Point Point32 PointStamped Poison
> > >> Polygon PolygonStamped Pose Pose2D PoseArray PoseStamped
> > >> PoseWithCovariance PoseWithCovarianceStamped PropertyBag Quaternion
> > >> QuaternionStamped SendHandle SendStatus String TaskContext Time
> > >> Transform TransformStamped Twist TwistStamped TwistWithCovariance
> > >> TwistWithCovarianceStamped UInt16 UInt16MultiArray UInt32
> > >> UInt32MultiArray UInt64 UInt64MultiArray UInt8 UInt8MultiArray Vector3
> > >> Vector3Stamped Wrench WrenchStamped array bool char double float int
> > >> rt_string string time uint void"
> > >>
> > >> It's an std::vector of JointValue
> > >
> > > If a type is unknown_t, it means the proper typekit has not been found.
> > > We need a better look at the generated code to figure out what went
> > > wrong...
> > >
> > > Somehow, the typeinfo for JointValue[] has not been generated, probably
> > > because no .msg file for it exists. A solution would be to generate the
> > > SequenceTypeInfo<T> for each .msg type as well, such that we
> > > automatically support a sequence of each message type. This is adding
> > > one line of code in the template files for generating the typekits (ie,
> > > below where it says StructTypeInfo<T>(...) ) You could then name that
> > > sequence type 'Name'[]
> >
> > I need some help with the syntax:
> > The current code now states:
> > "RTT::types::Types()->addType( new
> > types::StructTypeInfo<@ROSMSGTYPE@>("@ROSMSGNAME@") );"
> >
> > I thought about adding:
> >
> > RTT::types::Types()->addType( new types::StructTypeInfo<std::vector
> > <@ROSMSGTYPE@>>("@ROSMSGNAME@_array") );
> >
> > How would the syntax be with the [] operator?
>
> You have to add instead of what you propose:
>
> RTT::types::Types()->addType( new types::SequenceTypeInfo<std::vector
> <@ROSMSGTYPE@>>("@ROSMSGNAME@[]") );
>

You probably also want to add a space between the two closing angular
brackets above so the compiler doesn't complain, i.e., <@ROSMSGTYPE@>>
becomes <@ROSMSGTYPE@> >

Adolfo

>
> So Sequence instead of Struct and use [] in the name to match the ROS name.
>
> Peter
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

brics_actuator RTT typekit only works partially

[...]
>
> You probably also want to add a space between the two closing angular
> brackets above so the compiler doesn't complain, i.e.,  <@ROSMSGTYPE@>>
> becomes  <@ROSMSGTYPE@> >
>

Thanks for the replies. I've added the line of code to the
rtt_ros_integration. It all compiles fine, but (I think) the deployer
does not handle the arrays very well. I'm now using a property
consisting of an array, of which each element in turn contains 4
different values / types. (In the example, each element inside
positions has a timeStamp, unit, joint_uri and value). The deployer
however
- only lists one of the 4 types when I ask for it ('ls')
e.g. ' .. positions = { [{value = 40607 }, {value = 40607 }, {value
= 40607 }, {value = 40607 } ], size = 4, capacity = 4 } } '
- knows about all the 4 types when I ask for them individually (e.g.
'pos_tmp.positions[0].unit' returns some value)
- does not allow to set any of these
'pos_tmp.positions[0].value = 1
= {value = 0 }'

Which looks like unexpected behaviour imo :)

regards,

Steven