Decomposition failed with vectors

Hi,

I'm currently using the orocos_toolchain_ros. I've defined some messages in ROS for example "float64[6] joint" and "joints_msg[2] arm" (so basically a vector includes a vector) but these can not be decomposed by the Reporter.

At first I thought that I did something wrong, so I also tested it with the Imu message from the sensor messages and got the same error for the vectors:

3.472 [ ERROR  ][TypeInfoName] Decomposition failed because Part 'orientation_covariance' is not known to type system.
3.472 [ ERROR  ][TypeInfoName] Can not build Property of unknown_t.
3.472 [ ERROR  ][TypeInfoName] Decomposition failed because Part 'angular_velocity_covariance' is not known to type system.
3.474 [ ERROR  ][TypeInfoName] Can not build Property of unknown_t.
3.475 [ ERROR  ][TypeInfoName] Decomposition failed because Part 'linear_acceleration_covariance' is not known to type system.
3.475 [ ERROR  ][TypeInfoName] Can not build Property of unknown_t.

Thanks in advance.

Jeroen

Decomposition failed with vectors

Hi Jeroen,

On Thursday 26 May 2011 14:08:41 jjpa [dot] willems [..] ... wrote:
> Hi,
>
> I'm currently using the orocos_toolchain_ros.
> I've defined some messages in ROS for example "float64[6] joint" and
> "joints_msg[2] arm" (so basically a vector includes a vector) but these
> can not be decomposed by the Reporter.
>
> At first I thought that I did something wrong, so I also tested it with the
> Imu message from the sensor messages and got the same error for the
> vectors: 
> 3.472 [ ERROR  ][TypeInfoName] Decomposition failed because Part
> 'orientation_covariance' is not known to type system. 3.472 [ ERROR 
> ][TypeInfoName] Can not build Property of unknown_t. 3.472 [ ERROR 
> ][TypeInfoName] Decomposition failed because Part
> 'angular_velocity_covariance' is not known to type system. 3.474 [ ERROR 
> ][TypeInfoName] Can not build Property of unknown_t. 3.475 [ ERROR 
> ][TypeInfoName] Decomposition failed because Part
> 'linear_acceleration_covariance' is not known to type system. 3.475 [
> ERROR  ][TypeInfoName] Can not build Property of unknown_t.
>

This is a known issue we bumped into recently as well. We overlooked the
integration of the fixed-size arrays in the scripting/taskbrowser environment.
I believe Lua is a victim of this too. The C++ side will work fine, so the data
is sent and received using ROS, but you can't see it in the TaskBrowser or use
it in a script. A workaround is to use the vector<double> in C++ to copy the
data into and use that in scripting.

We'll solve this after the 2.4.0 release.

Peter

Decomposition failed with vectors

On Friday 27 May 2011 10:00:44 Peter Soetens wrote:
> Hi Jeroen,
>
> On Thursday 26 May 2011 14:08:41 jjpa [dot] willems [..] ... wrote:
> > Hi,
> >
> > I'm currently using the orocos_toolchain_ros.
> > I've defined some messages in ROS for example "float64[6] joint" and
> > "joints_msg[2] arm" (so basically a vector includes a vector) but these
> > can not be decomposed by the Reporter.
> >
> > At first I thought that I did something wrong, so I also tested it with
> > the Imu message from the sensor messages and got the same error for the
> > vectors: &#10;&gt; &gt; 3.472 [ ERROR  ][TypeInfoName] Decomposition failed because Part&#10;&gt; &gt; &#039;orientation_covariance&#039; is not known to type system. 3.472 [ ERROR&#10;&gt; &gt; ][TypeInfoName] Can not build Property of unknown_t. 3.472 [ ERROR&#10;&gt; &gt; ][TypeInfoName] Decomposition failed because Part&#10;&gt; &gt; &#039;angular_velocity_covariance&#039; is not known to type system. 3.474 [ ERROR&#10;&gt; &gt; ][TypeInfoName] Can not build Property of unknown_t. 3.475 [ ERROR&#10;&gt; &gt; ][TypeInfoName] Decomposition failed because Part&#10;&gt; &gt; &#039;linear_acceleration_covariance&#039; is not known to type system. 3.475 [&#10;&gt; &gt; ERROR  ][TypeInfoName] Can not build Property of unknown_t.
>
> This is a known issue we bumped into recently as well. We overlooked the
> integration of the fixed-size arrays in the scripting/taskbrowser
> environment. I believe Lua is a victim of this too. The C++ side will work
> fine, so the data is sent and received using ROS, but you can't see it in
> the TaskBrowser or use it in a script. A workaround is to use the
> vector<double> in C++ to copy the data into and use that in scripting.

Correction: an alternative workaround which is not that intrusive is to write
this:

&#10;#include &lt;rtt/types/Types.hpp&gt;&#10;#include &lt;rtt/types/CArrayTypeInfo.hpp&gt;&#10;&#10;// somewhere, once in your application:&#10;Types()-&gt;addType( new types::CArrayTypeInfo&lt; types::carray&lt;double&gt; &#10;&gt;(&quot;cdouble[]&quot;) );&#10;

>
> We'll solve this after the 2.4.0 release.

What needs to be solved is that this feature addition will make ROS core
typekits again 50% bigger. For ROS systems, we need a more fine grained type
info structure that only allows to create ports for messages, and not for the
fields in the messages. orogen has a similar need.

This would affect only the core ros primitive data types. I think the ROS 0.4.0
Orocos Toolchain should be able to cope with this.

Peter