rtt-ros integration utility service

While playing with connecting with ros topics, I've found the service in
attachment useful to quickly setup connections.

Old style:

var ConnPolicy cp
cp.transport = 3
cp.name_id = "/cmd_vel"

stream("Controller.ctrl", cp)


New style:

import("rtt_ros_service") // once (should this imply require("ros") ?)
require("ros") // once

stream("Controller.ctrl", ros.topic("/cmd_vel") ) //DATA
//or:
stream("Controller.ctrl", ros.topicBuffer("/cmd_vel",10) // BUFFER


No intermediary 'cp' variable is needed. The transport is automatically set
correctly. I think the win is bigger in the taskbrowser than in a real script.

Other utility functions could be added too...?

Peter

PS: maybe the name is misleading as it resembles a 'ros service' which is
another thing...

AttachmentSize
0001-ros-service-initial-ros-utility-service.patch6.51 KB

rtt-ros integration utility service

2011/4/5 Peter Soetens <peter [..] ...>

> While playing with connecting with ros topics, I've found the service in
> attachment useful to quickly setup connections.
>
> Old style:
> &#10;&gt; var ConnPolicy cp&#10;&gt; cp.transport = 3&#10;&gt; cp.name_id = &quot;/cmd_vel&quot;&#10;&gt;&#10;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt;
>
>
This code extract is very interesting, as it is not documented for
rtt_ros_integration. The only documentation is about xml deployment.
I am trying to use this but I don't understand what the command stram is
doing.

> New style:
> &#10;&gt; import(&quot;rtt_ros_service&quot;) // once (should this imply require(&quot;ros&quot;) ?)&#10;&gt; require(&quot;ros&quot;) // once&#10;&gt;&#10;&gt; stream(&quot;Controller.ctrl&quot;, ros.topic(&quot;/cmd_vel&quot;) ) //DATA&#10;&gt; //or:&#10;&gt; stream(&quot;Controller.ctrl&quot;, ros.topicBuffer(&quot;/cmd_vel&quot;,10) // BUFFER&#10;&gt;
>
> No intermediary 'cp' variable is needed. The transport is automatically set
> correctly. I think the win is bigger in the taskbrowser than in a real
> script.
>
> Other utility functions could be added too...?
>
> Peter
>
> PS: maybe the name is misleading as it resembles a 'ros service' which is
> another thing...
>
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>
>

rtt-ros integration utility service

2011/4/13 Willy Lambert <lambert [dot] willy [..] ...>:
>
>
> 2011/4/5 Peter Soetens <peter [..] ...>
>>
>> While playing with connecting with ros topics, I've found the service in
>> attachment useful to quickly setup connections.
>>
>> Old style:
>> &#10;&gt;&gt; var ConnPolicy cp&#10;&gt;&gt; cp.transport = 3&#10;&gt;&gt; cp.name_id = &quot;/cmd_vel&quot;&#10;&gt;&gt;&#10;&gt;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt;&gt;
>>
>
> This code extract is very interesting, as it is not documented for
> rtt_ros_integration. The only documentation is about xml deployment.
> I am trying to use this but I don't understand what the command stram is
> doing.

The stream command is telling OROCOS to dump all port data on the
corresponding ROS topic.
I've updated the ros wiki page to include the new style format.

Steven

>
>
>
>>
>> New style:
>> &#10;&gt;&gt; import(&quot;rtt_ros_service&quot;) // once (should this imply require(&quot;ros&quot;) ?)&#10;&gt;&gt; require(&quot;ros&quot;) // once&#10;&gt;&gt;&#10;&gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topic(&quot;/cmd_vel&quot;) ) //DATA&#10;&gt;&gt; //or:&#10;&gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topicBuffer(&quot;/cmd_vel&quot;,10) // BUFFER&#10;&gt;&gt;
>>
>> No intermediary 'cp' variable is needed. The transport is automatically
>> set
>> correctly. I think the win is bigger in the taskbrowser than in a real
>> script.
>>
>> Other utility functions could be added too...?
>>
>> Peter
>>
>> PS: maybe the name is misleading as it resembles a 'ros service' which is
>> another thing...
>>
>> --
>> Orocos-Dev mailing list
>> Orocos-Dev [..] ...
>> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>>
>
>

rtt-ros integration utility service

2011/4/13 Steven Bellens <steven [dot] bellens [..] ...>

> 2011/4/13 Willy Lambert <lambert [dot] willy [..] ...>:
> >
> >
> > 2011/4/5 Peter Soetens <peter [..] ...>
> >>
> >> While playing with connecting with ros topics, I've found the service in
> >> attachment useful to quickly setup connections.
> >>
> >> Old style:
> >> &#10;&gt; &gt;&gt; var ConnPolicy cp&#10;&gt; &gt;&gt; cp.transport = 3&#10;&gt; &gt;&gt; cp.name_id = &quot;/cmd_vel&quot;&#10;&gt; &gt;&gt;&#10;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt; &gt;&gt;
> >>
> >
> > This code extract is very interesting, as it is not documented for
> > rtt_ros_integration. The only documentation is about xml deployment.
> > I am trying to use this but I don't understand what the command stram is
> > doing.
>
> The stream command is telling OROCOS to dump all port data on the
> corresponding ROS topic.
> I've updated the ros wiki page to include the new style format.
>
>
Great, your making my application working :)

It doesn't find the rtt_ros_service. Is it a new features not currently in
toolchain-2.3 ?
0.150 [ ERROR ][DeploymentComponent::import] No such package or directory
found in search path: rtt_ros_service. Search path is:

Here is my deployment for info

import("arp_core");
import("arp_hml");
import("rtt_ros_service")

require("print");
require("os");
require("ros")

print.log(Warning, "====================");
print.log(Warning, "début déploiment HML");

loadComponent("Hml","HML::HmlItf");
setActivity("Hml",0.050,0,ORO_SCHED_OTHER);
Hml.configure();
Hml.start();

stream("Hml.inDifferentialCmd", ros.topic("/Crototype/differential_command")
)

print.log(Warning, "Fin déploiment HML");
print.log(Warning, "====================");

> Steven
>
> >
> >
> >
> >>
> >> New style:
> >> &#10;&gt; &gt;&gt; import(&quot;rtt_ros_service&quot;) // once (should this imply require(&quot;ros&quot;) ?)&#10;&gt; &gt;&gt; require(&quot;ros&quot;) // once&#10;&gt; &gt;&gt;&#10;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topic(&quot;/cmd_vel&quot;) ) //DATA&#10;&gt; &gt;&gt; //or:&#10;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topicBuffer(&quot;/cmd_vel&quot;,10) // BUFFER&#10;&gt; &gt;&gt;
> >>
> >> No intermediary 'cp' variable is needed. The transport is automatically
> >> set
> >> correctly. I think the win is bigger in the taskbrowser than in a real
> >> script.
> >>
> >> Other utility functions could be added too...?
> >>
> >> Peter
> >>
> >> PS: maybe the name is misleading as it resembles a 'ros service' which
> is
> >> another thing...
> >>
> >> --
> >> Orocos-Dev mailing list
> >> Orocos-Dev [..] ...
> >> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
> >>
> >
> >
>

rtt-ros integration utility service

2011/4/13 Willy Lambert <lambert [dot] willy [..] ...>:
>
>
> 2011/4/13 Steven Bellens <steven [dot] bellens [..] ...>
>>
>> 2011/4/13 Willy Lambert <lambert [dot] willy [..] ...>:
>> >
>> >
>> > 2011/4/5 Peter Soetens <peter [..] ...>
>> >>
>> >> While playing with connecting with ros topics, I've found the service
>> >> in
>> >> attachment useful to quickly setup connections.
>> >>
>> >> Old style:
>> >> &#10;&gt;&gt; &gt;&gt; var ConnPolicy cp&#10;&gt;&gt; &gt;&gt; cp.transport = 3&#10;&gt;&gt; &gt;&gt; cp.name_id = &quot;/cmd_vel&quot;&#10;&gt;&gt; &gt;&gt;&#10;&gt;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt;&gt; &gt;&gt;
>> >>
>> >
>> > This code extract is very interesting, as it is not documented for
>> > rtt_ros_integration. The only documentation is about xml deployment.
>> > I am trying to use this but I don't understand what the command stram is
>> > doing.
>>
>> The stream command is telling OROCOS to dump all port data on the
>> corresponding ROS topic.
>> I've updated the ros wiki page to include the new style format.
>>
>
> Great, your making my application working :)
>
> It doesn't find the rtt_ros_service. Is it a new features not currently in
> toolchain-2.3 ?

Try replacing it with

import("rtt_ros_integration")

Steven

> 0.150 [ ERROR  ][DeploymentComponent::import] No such package or directory
> found in search path: rtt_ros_service. Search path is:
>
>
> Here is my deployment for info
>
>
> import("arp_core");
> import("arp_hml");
> import("rtt_ros_service")
>
>
> require("print");
> require("os");
> require("ros")
>
> print.log(Warning, "====================");
> print.log(Warning, "début déploiment HML");
>
> loadComponent("Hml","HML::HmlItf");
> setActivity("Hml",0.050,0,ORO_SCHED_OTHER);
> Hml.configure();
> Hml.start();
>
> stream("Hml.inDifferentialCmd", ros.topic("/Crototype/differential_command")
> )
>
> print.log(Warning, "Fin déploiment HML");
> print.log(Warning, "====================");
>
>
>
>>
>> Steven
>>
>> >
>> >
>> >
>> >>
>> >> New style:
>> >> &#10;&gt;&gt; &gt;&gt; import(&quot;rtt_ros_service&quot;) // once (should this imply require(&quot;ros&quot;) ?)&#10;&gt;&gt; &gt;&gt; require(&quot;ros&quot;) // once&#10;&gt;&gt; &gt;&gt;&#10;&gt;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topic(&quot;/cmd_vel&quot;) ) //DATA&#10;&gt;&gt; &gt;&gt; //or:&#10;&gt;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topicBuffer(&quot;/cmd_vel&quot;,10) // BUFFER&#10;&gt;&gt; &gt;&gt;
>> >>
>> >> No intermediary 'cp' variable is needed. The transport is automatically
>> >> set
>> >> correctly. I think the win is bigger in the taskbrowser than in a real
>> >> script.
>> >>
>> >> Other utility functions could be added too...?
>> >>
>> >> Peter
>> >>
>> >> PS: maybe the name is misleading as it resembles a 'ros service' which
>> >> is
>> >> another thing...
>> >>
>> >> --
>> >> Orocos-Dev mailing list
>> >> Orocos-Dev [..] ...
>> >> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>> >>
>> >
>> >
>
>

rtt-ros integration utility service

2011/4/13 Steven Bellens <steven [dot] bellens [..] ...>

> 2011/4/13 Willy Lambert <lambert [dot] willy [..] ...>:
> >
> >
> > 2011/4/13 Steven Bellens <steven [dot] bellens [..] ...>
> >>
> >> 2011/4/13 Willy Lambert <lambert [dot] willy [..] ...>:
> >> >
> >> >
> >> > 2011/4/5 Peter Soetens <peter [..] ...>
> >> >>
> >> >> While playing with connecting with ros topics, I've found the service
> >> >> in
> >> >> attachment useful to quickly setup connections.
> >> >>
> >> >> Old style:
> >> >> &#10;&gt; &gt;&gt; &gt;&gt; var ConnPolicy cp&#10;&gt; &gt;&gt; &gt;&gt; cp.transport = 3&#10;&gt; &gt;&gt; &gt;&gt; cp.name_id = &quot;/cmd_vel&quot;&#10;&gt; &gt;&gt; &gt;&gt;&#10;&gt; &gt;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt; &gt;&gt; &gt;&gt;
> >> >>
> >> >
> >> > This code extract is very interesting, as it is not documented for
> >> > rtt_ros_integration. The only documentation is about xml deployment.
> >> > I am trying to use this but I don't understand what the command stram
> is
> >> > doing.
> >>
> >> The stream command is telling OROCOS to dump all port data on the
> >> corresponding ROS topic.
> >> I've updated the ros wiki page to include the new style format.
> >>
> >
> > Great, your making my application working :)
> >
> > It doesn't find the rtt_ros_service. Is it a new features not currently
> in
> > toolchain-2.3 ?
>
> Try replacing it with
>
> import("rtt_ros_integration")
>
>
it's better but doesn't go far from there :

0.142 [ ERROR ][ScriptingService] No such service or plugin: 'ros'

:)

> Steven
>
> > 0.150 [ ERROR ][DeploymentComponent::import] No such package or
> directory
> > found in search path: rtt_ros_service. Search path is:
> >
> >
> > Here is my deployment for info
> >
> >
> > import("arp_core");
> > import("arp_hml");
> > import("rtt_ros_service")
> >
> >
> > require("print");
> > require("os");
> > require("ros")
> >
> > print.log(Warning, "====================");
> > print.log(Warning, "début déploiment HML");
> >
> > loadComponent("Hml","HML::HmlItf");
> > setActivity("Hml",0.050,0,ORO_SCHED_OTHER);
> > Hml.configure();
> > Hml.start();
> >
> > stream("Hml.inDifferentialCmd",
> ros.topic("/Crototype/differential_command")
> > )
> >
> > print.log(Warning, "Fin déploiment HML");
> > print.log(Warning, "====================");
> >
> >
> >
> >>
> >> Steven
> >>
> >> >
> >> >
> >> >
> >> >>
> >> >> New style:
> >> >> &#10;&gt; &gt;&gt; &gt;&gt; import(&quot;rtt_ros_service&quot;) // once (should this imply require(&quot;ros&quot;)&#10;&gt; ?)&#10;&gt; &gt;&gt; &gt;&gt; require(&quot;ros&quot;) // once&#10;&gt; &gt;&gt; &gt;&gt;&#10;&gt; &gt;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topic(&quot;/cmd_vel&quot;) ) //DATA&#10;&gt; &gt;&gt; &gt;&gt; //or:&#10;&gt; &gt;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, ros.topicBuffer(&quot;/cmd_vel&quot;,10) // BUFFER&#10;&gt; &gt;&gt; &gt;&gt;
> >> >>
> >> >> No intermediary 'cp' variable is needed. The transport is
> automatically
> >> >> set
> >> >> correctly. I think the win is bigger in the taskbrowser than in a
> real
> >> >> script.
> >> >>
> >> >> Other utility functions could be added too...?
> >> >>
> >> >> Peter
> >> >>
> >> >> PS: maybe the name is misleading as it resembles a 'ros service'
> which
> >> >> is
> >> >> another thing...
> >> >>
> >> >> --
> >> >> Orocos-Dev mailing list
> >> >> Orocos-Dev [..] ...
> >> >> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
> >> >>
> >> >
> >> >
> >
> >
>

rtt-ros integration utility service

[...]
>> >
>> > It doesn't find the rtt_ros_service. Is it a new features not currently
>> > in
>> > toolchain-2.3 ?
>>
>> Try replacing it with
>>
>> import("rtt_ros_integration")
>>
>
> it's better but doesn't go far from there :
>
> 0.142 [ ERROR  ][ScriptingService] No such service or plugin: 'ros'
>
> :)

Peter's syntax was wrong :)

require("ros_integration") should do the trick

Steven

>
[...]

rtt-ros integration utility service

On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
<steven [dot] bellens [..] ...> wrote:
> [...]
>>> >
>>> > It doesn't find the rtt_ros_service. Is it a new features not currently
>>> > in
>>> > toolchain-2.3 ?
>>>
>>> Try replacing it with
>>>
>>> import("rtt_ros_integration")
>>>
>>
>> it's better but doesn't go far from there :
>>
>> 0.142 [ ERROR  ][ScriptingService] No such service or plugin: 'ros'
>>
>> :)
>
> Peter's syntax was wrong :)
>
> require("ros_integration") should do the trick

I think it's not. First of all, the syntax for getting the 'ros' RTT
service running is:

require("ros")

Second, this "ros" service is only available in the "rtt_ros_service"
package which must be imported but which is not yet part of the
official release, and frankly, got pushed to upstream by accident
(blame me for not working on a topic branch!).

We can include this new addition in the 0.3.2 release (2.3.2 is coming
up shortly as well). But as I suggested, some re-ordering/naming of
packages might be necessary in order to avoid a long list of import +
require statements.

So could we vote on:

&#10;import(&quot;rtt_ros_integration&quot;)&#10;// provides: &quot;ros&quot; services and ros primitives typekits&#10;

or:
&#10;import(&quot;rtt_ros_service&quot;)&#10;// provides: ros services and depends on rtt_ros_integration, ie&#10;automatically imported&#10;

or:
&#10;import(&quot;rtt_ros&quot;)&#10;// provides: depends on rtt_ros_integration and rtt_ros_service and&#10;rtt_ros_param etc., ie automatically imported&#10;ros.topic(...)&#10;loadService(&quot;YourComponentName&quot;,&quot;rosparam&quot;)&#10;

Please help thinking about unifying this API before everyone starts
coding applications with it.

Peter
--
Orocos-Dev mailing list
Orocos-Dev [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev

rtt-ros integration utility service

2011/4/13 Peter Soetens <peter [..] ...>:
> On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
> <steven [dot] bellens [..] ...> wrote:
>> [...]
>>>> >
>>>> > It doesn't find the rtt_ros_service. Is it a new features not currently
>>>> > in
>>>> > toolchain-2.3 ?
>>>>
>>>> Try replacing it with
>>>>
>>>> import("rtt_ros_integration")
>>>>
>>>
>>> it's better but doesn't go far from there :
>>>
>>> 0.142 [ ERROR  ][ScriptingService] No such service or plugin: 'ros'
>>>
>>> :)
>>
>> Peter's syntax was wrong :)
>>
>> require("ros_integration") should do the trick
>
> I think it's not. First of all, the syntax for getting the 'ros' RTT
> service running is:
>
> require("ros")
>
> Second, this "ros" service is only available in the "rtt_ros_service"
> package which must be imported but which is not yet part of the
> official release, and frankly, got pushed to upstream by accident
> (blame me for not working on a topic branch!).
>
> We can include this new addition in the 0.3.2 release (2.3.2 is coming
> up shortly as well). But as I suggested, some re-ordering/naming of
> packages might be necessary in order to avoid a long list of import +
> require statements.
>
> So could we vote on:
>
> &#10;&gt; import(&quot;rtt_ros_integration&quot;)&#10;&gt; // provides: &quot;ros&quot; services and ros primitives typekits&#10;&gt;
>
> or:
> &#10;&gt; import(&quot;rtt_ros_service&quot;)&#10;&gt; // provides: ros services and depends on rtt_ros_integration, ie&#10;&gt; automatically imported&#10;&gt;
>
> or:
> &#10;&gt; import(&quot;rtt_ros&quot;)&#10;&gt; // provides: depends on rtt_ros_integration and rtt_ros_service and&#10;&gt; rtt_ros_param etc., ie automatically imported&#10;&gt; ros.topic(...)&#10;&gt; loadService(&quot;YourComponentName&quot;,&quot;rosparam&quot;)&#10;&gt;
>
> Please help thinking about unifying this API before everyone starts
> coding applications with it.

I was not aware of this ros_service myself :). The first one is how it
is now, and if this will automatically includes all other rtt ros
related stuff, I would stick to that one. Otherwise choose for another
global name which imports all, so that would then be option 3.

Steven

>
> Peter
>

rtt-ros integration utility service

2011/4/13 Peter Soetens <peter [..] ...>

> On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
> <steven [dot] bellens [..] ...> wrote:
> > [...]
> >>> >
> >>> > It doesn't find the rtt_ros_service. Is it a new features not
> currently
> >>> > in
> >>> > toolchain-2.3 ?
> >>>
> >>> Try replacing it with
> >>>
> >>> import("rtt_ros_integration")
> >>>
> >>
> >> it's better but doesn't go far from there :
> >>
> >> 0.142 [ ERROR ][ScriptingService] No such service or plugin: 'ros'
> >>
> >> :)
> >
> > Peter's syntax was wrong :)
> >
> > require("ros_integration") should do the trick
>
> I think it's not. First of all, the syntax for getting the 'ros' RTT
> service running is:
>
> require("ros")
>
> Second, this "ros" service is only available in the "rtt_ros_service"
> package which must be imported but which is not yet part of the
> official release, and frankly, got pushed to upstream by accident
> (blame me for not working on a topic branch!).
>
> We can include this new addition in the 0.3.2 release (2.3.2 is coming
> up shortly as well). But as I suggested, some re-ordering/naming of
> packages might be necessary in order to avoid a long list of import +
> require statements.
>

Ok, so maybe I should re-ask my query in a new thread on the orocos-user
list : "is it possible on toolchain 2.3 to deploy a ROS-Orocos application
from script, and if yes, how can I do it ? If not I will test the
integration with an xml file and wait impatiently 2.3.2 release :)"

>
> So could we vote on:
>
> &#10;&gt; import(&quot;rtt_ros_integration&quot;)&#10;&gt; // provides: &quot;ros&quot; services and ros primitives typekits&#10;&gt;
>
> or:
> &#10;&gt; import(&quot;rtt_ros_service&quot;)&#10;&gt; // provides: ros services and depends on rtt_ros_integration, ie&#10;&gt; automatically imported&#10;&gt;
>
> or:
> &#10;&gt; import(&quot;rtt_ros&quot;)&#10;&gt; // provides: depends on rtt_ros_integration and rtt_ros_service and&#10;&gt; rtt_ros_param etc., ie automatically imported&#10;&gt; ros.topic(...)&#10;&gt; loadService(&quot;YourComponentName&quot;,&quot;rosparam&quot;)&#10;&gt;
>
> Please help thinking about unifying this API before everyone starts
> coding applications with it.

> Peter
>

rtt-ros integration utility service

On Wednesday 13 April 2011 19:08:55 Willy Lambert wrote:
> 2011/4/13 Peter Soetens <peter [..] ...>
>
> > On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
> >
> > <steven [dot] bellens [..] ...> wrote:
> > > [...]
> > >
> > >>> > It doesn't find the rtt_ros_service. Is it a new features not
> >
> > currently
> >
> > >>> > in
> > >>> > toolchain-2.3 ?
> > >>>
> > >>> Try replacing it with
> > >>>
> > >>> import("rtt_ros_integration")
> > >>
> > >> it's better but doesn't go far from there :
> > >>
> > >> 0.142 [ ERROR ][ScriptingService] No such service or plugin: 'ros'
> > >>
> > >> :)
> > >
> > > Peter's syntax was wrong :)
> > >
> > > require("ros_integration") should do the trick
> >
> > I think it's not. First of all, the syntax for getting the 'ros' RTT
> > service running is:
> >
> > require("ros")
> >
> > Second, this "ros" service is only available in the "rtt_ros_service"
> > package which must be imported but which is not yet part of the
> > official release, and frankly, got pushed to upstream by accident
> > (blame me for not working on a topic branch!).
> >
> > We can include this new addition in the 0.3.2 release (2.3.2 is coming
> > up shortly as well). But as I suggested, some re-ordering/naming of
> > packages might be necessary in order to avoid a long list of import +
> > require statements.
>
> Ok, so maybe I should re-ask my query in a new thread on the orocos-user
> list : "is it possible on toolchain 2.3 to deploy a ROS-Orocos application
> from script, and if yes, how can I do it ? If not I will test the
> integration with an xml file and wait impatiently 2.3.2 release :)"

Scripting is 100% possible in 2.3.1. Use this syntax:

&#10;var ConnPolicy cp&#10;cp.transport = 3 // ROS == 3&#10;cp.name_id = &quot;/cmd_vel&quot; // ros topic&#10;&#10;// creates a stream to topic &#039;/cmd_vel&#039; from Controller&#039;s port &#039;ctrl&#039;:&#10;stream(&quot;Controller.ctrl&quot;, cp)&#10;// repeat for other in/out ports. &#10;

You don't need the 'ros.topic()' function, this is only an utility function
for avoiding to write the 'cp' code.

Peter

rtt-ros integration utility service

2011/4/13 Peter Soetens <peter [..] ...>

> On Wednesday 13 April 2011 19:08:55 Willy Lambert wrote:
> > 2011/4/13 Peter Soetens <peter [..] ...>
> >
> > > On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
> > >
> > > <steven [dot] bellens [..] ...> wrote:
> > > > [...]
> > > >
> > > >>> > It doesn't find the rtt_ros_service. Is it a new features not
> > >
> > > currently
> > >
> > > >>> > in
> > > >>> > toolchain-2.3 ?
> > > >>>
> > > >>> Try replacing it with
> > > >>>
> > > >>> import("rtt_ros_integration")
> > > >>
> > > >> it's better but doesn't go far from there :
> > > >>
> > > >> 0.142 [ ERROR ][ScriptingService] No such service or plugin: 'ros'
> > > >>
> > > >> :)
> > > >
> > > > Peter's syntax was wrong :)
> > > >
> > > > require("ros_integration") should do the trick
> > >
> > > I think it's not. First of all, the syntax for getting the 'ros' RTT
> > > service running is:
> > >
> > > require("ros")
> > >
> > > Second, this "ros" service is only available in the "rtt_ros_service"
> > > package which must be imported but which is not yet part of the
> > > official release, and frankly, got pushed to upstream by accident
> > > (blame me for not working on a topic branch!).
> > >
> > > We can include this new addition in the 0.3.2 release (2.3.2 is coming
> > > up shortly as well). But as I suggested, some re-ordering/naming of
> > > packages might be necessary in order to avoid a long list of import +
> > > require statements.
> >
> > Ok, so maybe I should re-ask my query in a new thread on the orocos-user
> > list : "is it possible on toolchain 2.3 to deploy a ROS-Orocos
> application
> > from script, and if yes, how can I do it ? If not I will test the
> > integration with an xml file and wait impatiently 2.3.2 release :)"
>
> Scripting is 100% possible in 2.3.1. Use this syntax:
>
> &#10;&gt; var ConnPolicy cp&#10;&gt; cp.transport = 3 // ROS == 3&#10;&gt; cp.name_id = &quot;/cmd_vel&quot; // ros topic&#10;&gt;&#10;&gt; // creates a stream to topic &#039;/cmd_vel&#039; from Controller&#039;s port &#039;ctrl&#039;:&#10;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt; // repeat for other in/out ports.&#10;&gt;
>

great, I'd prefer this line to be on the wiki instead of the current for
script deployments, I'll do the change.

I have now :

import("arp_core");
import("arp_hml");
import("rtt_ros_integration")

//require("print");
require("os");
require("ros_integration");

print.log(Warning, "====================");
print.log(Warning, "début déploiment HML");

loadComponent("Hml","HML::HmlItf");
setActivity("Hml",0.050,0,ORO_SCHED_OTHER);
Hml.configure();
Hml.start();

var ConnPolicy cp;
cp.transport = 3; // ROS == 3
cp.name_id = "/Crototype/differential_command"; // ros topic
stream("Hml.inDifferentialCmd", cp);

print.log(Warning, "Fin déploiment HML");
print.log(Warning, "====================");

It now stops there (you have to now that the requested topic is NOT feeded
because my rosapp is not launched, is it a problem ?) :

0.144 [ Warning][ScriptingService] ====================
0.145 [ Warning][ScriptingService] début déploiment HML
0.150 [ Warning][ScriptingService] The protocol with id 3 did not register a
fall-back handler for unknown types!
0.150 [ Warning][ScriptingService] triggered by: unknown_t which does not
have a transport.
0.150 [ ERROR ][ScriptingService] Could not create transport stream for
port inDifferentialCmd with transport id 3
0.150 [ ERROR ][ScriptingService] No such transport registered. Check your
policy.transport settings or add the transport for type unknown_t
0.151 [ Warning][ScriptingService] Fin déploiment HML
0.151 [ Warning][ScriptingService] ====================

This is because my port is shown as an unknown type, so my tykits are not
loaded properly, but I don't know why :

Deployer [S]> .types
Available data types: ConnPolicy FlowStatus LogLevel PropertyBag SendHandle
SendStatus TaskContext array bool bools char double float float32 float32[]
float64 float64[] int int16 int16[] int32 int32[] int64 int64[] int8 int8[]
ints rt_string string strings time uint uint16 uint16[] uint32 uint32[]
uint64 uint64[] uint8 uint8[] void

Deployer [S]> .services
Available Services: scripting marshalling os print filtering ros-primitives
ros_integration rosparam

Deployer [S]> .typekits
Available Typekits: rtt-types rtt-mqueue-transport OCLTypekit
ros-primitives

>
> You don't need the 'ros.topic()' function, this is only an utility function
> for avoiding to write the 'cp' code.
>
> Peter
>

rtt-ros integration utility service

2011/4/14 Willy Lambert <lambert [dot] willy [..] ...>:
>
>
> 2011/4/13 Peter Soetens <peter [..] ...>
>>
>> On Wednesday 13 April 2011 19:08:55 Willy Lambert wrote:
>> > 2011/4/13 Peter Soetens <peter [..] ...>
>> >
>> > > On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
>> > >
>> > > <steven [dot] bellens [..] ...> wrote:
>> > > > [...]
>> > > >
>> > > >>> > It doesn't find the rtt_ros_service. Is it a new features not
>> > >
>> > > currently
>> > >
>> > > >>> > in
>> > > >>> > toolchain-2.3 ?
>> > > >>>
>> > > >>> Try replacing it with
>> > > >>>
>> > > >>> import("rtt_ros_integration")
>> > > >>
>> > > >> it's better but doesn't go far from there :
>> > > >>
>> > > >> 0.142 [ ERROR  ][ScriptingService] No such service or plugin: 'ros'
>> > > >>
>> > > >> :)
>> > > >
>> > > > Peter's syntax was wrong :)
>> > > >
>> > > > require("ros_integration") should do the trick
>> > >
>> > > I think it's not. First of all, the syntax for getting the 'ros' RTT
>> > > service running is:
>> > >
>> > > require("ros")
>> > >
>> > > Second, this "ros" service is only available in the "rtt_ros_service"
>> > > package which must be imported but which is not yet part of the
>> > > official release, and frankly, got pushed to upstream by accident
>> > > (blame me for not working on a topic branch!).
>> > >
>> > > We can include this new addition in the 0.3.2 release (2.3.2 is coming
>> > > up shortly as well). But as I suggested, some re-ordering/naming of
>> > > packages might be necessary in order to avoid a long list of import +
>> > > require statements.
>> >
>> > Ok, so maybe I should re-ask my query in a new thread on the orocos-user
>> > list : "is it possible on toolchain 2.3 to deploy a ROS-Orocos
>> > application
>> > from script, and if yes, how can I do it ? If not I will test the
>> > integration with an xml file and wait impatiently 2.3.2 release :)"
>>
>> Scripting is 100% possible in 2.3.1. Use this syntax:
>>
>> &#10;&gt;&gt; var ConnPolicy cp&#10;&gt;&gt; cp.transport = 3 // ROS == 3&#10;&gt;&gt; cp.name_id = &quot;/cmd_vel&quot; // ros topic&#10;&gt;&gt;&#10;&gt;&gt; // creates a stream to topic &#039;/cmd_vel&#039; from Controller&#039;s port &#039;ctrl&#039;:&#10;&gt;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt;&gt; // repeat for other in/out ports.&#10;&gt;&gt;
>
> great, I'd prefer this line to be on the wiki instead of the current for
> script deployments, I'll do the change.
>
> I have now :
>
> import("arp_core");
> import("arp_hml");
> import("rtt_ros_integration")
>
>
> //require("print");
> require("os");
> require("ros_integration");
>
> print.log(Warning, "====================");
> print.log(Warning, "début déploiment HML");
>
> loadComponent("Hml","HML::HmlItf");
> setActivity("Hml",0.050,0,ORO_SCHED_OTHER);
> Hml.configure();
> Hml.start();
>
> var ConnPolicy cp;
> cp.transport = 3; // ROS == 3
> cp.name_id = "/Crototype/differential_command"; // ros topic
> stream("Hml.inDifferentialCmd", cp);
>
> print.log(Warning, "Fin déploiment HML");
> print.log(Warning, "====================");
>
>
> It now stops there (you have to now that the requested topic is NOT feeded
> because my rosapp is not launched, is it a problem ?) :

No. It doesn't seem to recognize your custom type. Did you import
either the package containing the RTT typekits for your custom
messages _OR_ a package that depends on it?

Steven

>
> 0.144 [ Warning][ScriptingService] ====================
> 0.145 [ Warning][ScriptingService] début déploiment HML
> 0.150 [ Warning][ScriptingService] The protocol with id 3 did not register a
> fall-back handler for unknown types!
> 0.150 [ Warning][ScriptingService]   triggered by: unknown_t which does not
> have a transport.
> 0.150 [ ERROR  ][ScriptingService] Could not create transport stream for
> port inDifferentialCmd with transport id 3
> 0.150 [ ERROR  ][ScriptingService] No such transport registered. Check your
> policy.transport settings or add the transport for type unknown_t
> 0.151 [ Warning][ScriptingService] Fin déploiment HML
> 0.151 [ Warning][ScriptingService] ====================
>
> This is because my port is shown as an unknown type, so my tykits are not
> loaded properly, but I don't know why :
>
> Deployer [S]> .types
> Available data types:  ConnPolicy FlowStatus LogLevel PropertyBag SendHandle
> SendStatus TaskContext array bool bools char double float float32 float32[]
> float64 float64[] int int16 int16[] int32 int32[] int64 int64[] int8 int8[]
> ints rt_string string strings time uint uint16 uint16[] uint32 uint32[]
> uint64 uint64[] uint8 uint8[] void
>
> Deployer [S]> .services
> Available Services:  scripting marshalling os print filtering ros-primitives
> ros_integration rosparam
>
> Deployer [S]> .typekits
> Available Typekits:  rtt-types rtt-mqueue-transport OCLTypekit
> ros-primitives
>
>
>>
>> You don't need the 'ros.topic()' function, this is only an utility
>> function
>> for avoiding to write the 'cp' code.
>>
>> Peter
>
>

rtt-ros integration utility service

2011/4/14 Steven Bellens <steven [dot] bellens [..] ...>

> 2011/4/14 Willy Lambert <lambert [dot] willy [..] ...>:
> >
> >
> > 2011/4/13 Peter Soetens <peter [..] ...>
> >>
> >> On Wednesday 13 April 2011 19:08:55 Willy Lambert wrote:
> >> > 2011/4/13 Peter Soetens <peter [..] ...>
> >> >
> >> > > On Wed, Apr 13, 2011 at 6:36 PM, Steven Bellens
> >> > >
> >> > > <steven [dot] bellens [..] ...> wrote:
> >> > > > [...]
> >> > > >
> >> > > >>> > It doesn't find the rtt_ros_service. Is it a new features not
> >> > >
> >> > > currently
> >> > >
> >> > > >>> > in
> >> > > >>> > toolchain-2.3 ?
> >> > > >>>
> >> > > >>> Try replacing it with
> >> > > >>>
> >> > > >>> import("rtt_ros_integration")
> >> > > >>
> >> > > >> it's better but doesn't go far from there :
> >> > > >>
> >> > > >> 0.142 [ ERROR ][ScriptingService] No such service or plugin:
> 'ros'
> >> > > >>
> >> > > >> :)
> >> > > >
> >> > > > Peter's syntax was wrong :)
> >> > > >
> >> > > > require("ros_integration") should do the trick
> >> > >
> >> > > I think it's not. First of all, the syntax for getting the 'ros' RTT
> >> > > service running is:
> >> > >
> >> > > require("ros")
> >> > >
> >> > > Second, this "ros" service is only available in the
> "rtt_ros_service"
> >> > > package which must be imported but which is not yet part of the
> >> > > official release, and frankly, got pushed to upstream by accident
> >> > > (blame me for not working on a topic branch!).
> >> > >
> >> > > We can include this new addition in the 0.3.2 release (2.3.2 is
> coming
> >> > > up shortly as well). But as I suggested, some re-ordering/naming of
> >> > > packages might be necessary in order to avoid a long list of import
> +
> >> > > require statements.
> >> >
> >> > Ok, so maybe I should re-ask my query in a new thread on the
> orocos-user
> >> > list : "is it possible on toolchain 2.3 to deploy a ROS-Orocos
> >> > application
> >> > from script, and if yes, how can I do it ? If not I will test the
> >> > integration with an xml file and wait impatiently 2.3.2 release :)"
> >>
> >> Scripting is 100% possible in 2.3.1. Use this syntax:
> >>
> >> &#10;&gt; &gt;&gt; var ConnPolicy cp&#10;&gt; &gt;&gt; cp.transport = 3 // ROS == 3&#10;&gt; &gt;&gt; cp.name_id = &quot;/cmd_vel&quot; // ros topic&#10;&gt; &gt;&gt;&#10;&gt; &gt;&gt; // creates a stream to topic &#039;/cmd_vel&#039; from Controller&#039;s port &#039;ctrl&#039;:&#10;&gt; &gt;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt; &gt;&gt; // repeat for other in/out ports.&#10;&gt; &gt;&gt;
> >
> > great, I'd prefer this line to be on the wiki instead of the current for
> > script deployments, I'll do the change.
> >
> > I have now :
> >
> > import("arp_core");
> > import("arp_hml");
> > import("rtt_ros_integration")
> >
> >
> > //require("print");
> > require("os");
> > require("ros_integration");
> >
> > print.log(Warning, "====================");
> > print.log(Warning, "début déploiment HML");
> >
> > loadComponent("Hml","HML::HmlItf");
> > setActivity("Hml",0.050,0,ORO_SCHED_OTHER);
> > Hml.configure();
> > Hml.start();
> >
> > var ConnPolicy cp;
> > cp.transport = 3; // ROS == 3
> > cp.name_id = "/Crototype/differential_command"; // ros topic
> > stream("Hml.inDifferentialCmd", cp);
> >
> > print.log(Warning, "Fin déploiment HML");
> > print.log(Warning, "====================");
> >
> >
> > It now stops there (you have to now that the requested topic is NOT
> feeded
> > because my rosapp is not launched, is it a problem ?) :
>
>
> No. It doesn't seem to recognize your custom type. Did you import
> either the package containing the RTT typekits for your custom
> messages _OR_ a package that depends on it?
>

Ok now, I needed to add :

import("rtt_ros_integration_actionlib_msgs")
import("rtt_ros_integration_arp_master_msgs")

I now see the type "arp_master.DifferentialCommand" in the taskbrowser and
things in rxgraph :))))))))))))))))))))))

This makes me wonder about the wiki page. What should be put in which
manifest ?

We have 3 packages :
_ MyPkg that exports the messages
_ rtt_ros_integration_mypkg_msgs that creates the typekits
_ OrocosPkg that uses the messages of MyPkg in Orocos via
rtt_ros_integration_typekits

the manifest of rtt_ros_integration_mypkg_msgs contains :

<depend package="rtt_ros_integration"/>
<depend package="MyPkg"/>

<export>
<cpp cflags="-I${prefix}/include"/>
</export>

Is it necessary to dépends on rtt_ros_integration ?
what should contains the manifest of OrocosPkg ?

>
> Steven
>
> >
> > 0.144 [ Warning][ScriptingService] ====================
> > 0.145 [ Warning][ScriptingService] début déploiment HML
> > 0.150 [ Warning][ScriptingService] The protocol with id 3 did not
> register a
> > fall-back handler for unknown types!
> > 0.150 [ Warning][ScriptingService] triggered by: unknown_t which does
> not
> > have a transport.
> > 0.150 [ ERROR ][ScriptingService] Could not create transport stream for
> > port inDifferentialCmd with transport id 3
> > 0.150 [ ERROR ][ScriptingService] No such transport registered. Check
> your
> > policy.transport settings or add the transport for type unknown_t
> > 0.151 [ Warning][ScriptingService] Fin déploiment HML
> > 0.151 [ Warning][ScriptingService] ====================
> >
> > This is because my port is shown as an unknown type, so my tykits are not
> > loaded properly, but I don't know why :
> >
> > Deployer [S]> .types
> > Available data types: ConnPolicy FlowStatus LogLevel PropertyBag
> SendHandle
> > SendStatus TaskContext array bool bools char double float float32
> float32[]
> > float64 float64[] int int16 int16[] int32 int32[] int64 int64[] int8
> int8[]
> > ints rt_string string strings time uint uint16 uint16[] uint32 uint32[]
> > uint64 uint64[] uint8 uint8[] void
> >
> > Deployer [S]> .services
> > Available Services: scripting marshalling os print filtering
> ros-primitives
> > ros_integration rosparam
> >
> > Deployer [S]> .typekits
> > Available Typekits: rtt-types rtt-mqueue-transport OCLTypekit
> > ros-primitives
> >
> >
> >>
> >> You don't need the 'ros.topic()' function, this is only an utility
> >> function
> >> for avoiding to write the 'cp' code.
> >>
> >> Peter
> >
> >
>

rtt-ros integration utility service

[...]
>>
>>
>> No. It doesn't seem to recognize your custom type. Did you import
>> either the package containing the RTT typekits for your custom
>> messages _OR_ a package that depends on it?
>
> Ok now, I needed to add :
>
> import("rtt_ros_integration_actionlib_msgs")
> import("rtt_ros_integration_arp_master_msgs")
>
> I now see the type "arp_master.DifferentialCommand" in the taskbrowser and
> things in rxgraph :))))))))))))))))))))))
>
> This makes me wonder about the wiki page. What should be put in which
> manifest ?
>
>
> We have 3 packages :
> _ MyPkg that exports the messages
> _ rtt_ros_integration_mypkg_msgs that creates the typekits
> _ OrocosPkg that uses the messages of MyPkg in Orocos via
> rtt_ros_integration_typekits
>
> the manifest of rtt_ros_integration_mypkg_msgs contains :
>
> <depend package="rtt_ros_integration"/>
> <depend package="MyPkg"/>
>
> <export>
> <cpp cflags="-I${prefix}/include"/>
>
> </export>
>
>
> Is it necessary to dépends on rtt_ros_integration ?

Yes, as this package contains the necessarry ROS plugins to get the
streaming to work (correct me if I'm wrong here Ruben)

> what should contains the manifest of OrocosPkg ?

You can add a dependency on your RTT typekit package _
rtt_ros_integration_mypkg_msgs so as to avoid multiple import
statements in your deploy script. It does not need anything special
for the rtt ros integration to work, except for the
rtt_ros_integration dependency.

Steven

>
>
>
>
>
>
>>
>> Steven
>>
>> >
>> > 0.144 [ Warning][ScriptingService] ====================
>> > 0.145 [ Warning][ScriptingService] début déploiment HML
>> > 0.150 [ Warning][ScriptingService] The protocol with id 3 did not
>> > register a
>> > fall-back handler for unknown types!
>> > 0.150 [ Warning][ScriptingService]   triggered by: unknown_t which does
>> > not
>> > have a transport.
>> > 0.150 [ ERROR  ][ScriptingService] Could not create transport stream for
>> > port inDifferentialCmd with transport id 3
>> > 0.150 [ ERROR  ][ScriptingService] No such transport registered. Check
>> > your
>> > policy.transport settings or add the transport for type unknown_t
>> > 0.151 [ Warning][ScriptingService] Fin déploiment HML
>> > 0.151 [ Warning][ScriptingService] ====================
>> >
>> > This is because my port is shown as an unknown type, so my tykits are
>> > not
>> > loaded properly, but I don't know why :
>> >
>> > Deployer [S]> .types
>> > Available data types:  ConnPolicy FlowStatus LogLevel PropertyBag
>> > SendHandle
>> > SendStatus TaskContext array bool bools char double float float32
>> > float32[]
>> > float64 float64[] int int16 int16[] int32 int32[] int64 int64[] int8
>> > int8[]
>> > ints rt_string string strings time uint uint16 uint16[] uint32 uint32[]
>> > uint64 uint64[] uint8 uint8[] void
>> >
>> > Deployer [S]> .services
>> > Available Services:  scripting marshalling os print filtering
>> > ros-primitives
>> > ros_integration rosparam
>> >
>> > Deployer [S]> .typekits
>> > Available Typekits:  rtt-types rtt-mqueue-transport OCLTypekit
>> > ros-primitives
>> >
>> >
>> >>
>> >> You don't need the 'ros.topic()' function, this is only an utility
>> >> function
>> >> for avoiding to write the 'cp' code.
>> >>
>> >> Peter
>> >
>> >
>
>

rtt-ros integration utility service

2011/4/14 Steven Bellens <steven [dot] bellens [..] ...>

> [...]
> >>
> >>
> >> No. It doesn't seem to recognize your custom type. Did you import
> >> either the package containing the RTT typekits for your custom
> >> messages _OR_ a package that depends on it?
> >
> > Ok now, I needed to add :
> >
> > import("rtt_ros_integration_actionlib_msgs")
> > import("rtt_ros_integration_arp_master_msgs")
> >
> > I now see the type "arp_master.DifferentialCommand" in the taskbrowser
> and
> > things in rxgraph :))))))))))))))))))))))
> >
> > This makes me wonder about the wiki page. What should be put in which
> > manifest ?
> >
> >
> > We have 3 packages :
> > _ MyPkg that exports the messages
> > _ rtt_ros_integration_mypkg_msgs that creates the typekits
> > _ OrocosPkg that uses the messages of MyPkg in Orocos via
> > rtt_ros_integration_typekits
> >
> > the manifest of rtt_ros_integration_mypkg_msgs contains :
> >
> > <depend package="rtt_ros_integration"/>
> > <depend package="MyPkg"/>
> >
> > <export>
> > <cpp cflags="-I${prefix}/include"/>
> >
> > </export>
> >
> >
> > Is it necessary to dépends on rtt_ros_integration ?
>
> Yes, as this package contains the necessarry ROS plugins to get the
> streaming to work (correct me if I'm wrong here Ruben)
>
> > what should contains the manifest of OrocosPkg ?
>
> You can add a dependency on your RTT typekit package _
> rtt_ros_integration_mypkg_msgs so as to avoid multiple import
> statements in your deploy script. It does not need anything special
> for the rtt ros integration to work, except for the
> rtt_ros_integration dependency.
>

which is implicitely contained in the rtt_ros_integration_mypkg_msgs ?!

>
> Steven
>
> >
> >
> >
> >
> >
> >
> >>
> >> Steven
> >>
> >> >
> >> > 0.144 [ Warning][ScriptingService] ====================
> >> > 0.145 [ Warning][ScriptingService] début déploiment HML
> >> > 0.150 [ Warning][ScriptingService] The protocol with id 3 did not
> >> > register a
> >> > fall-back handler for unknown types!
> >> > 0.150 [ Warning][ScriptingService] triggered by: unknown_t which
> does
> >> > not
> >> > have a transport.
> >> > 0.150 [ ERROR ][ScriptingService] Could not create transport stream
> for
> >> > port inDifferentialCmd with transport id 3
> >> > 0.150 [ ERROR ][ScriptingService] No such transport registered. Check
> >> > your
> >> > policy.transport settings or add the transport for type unknown_t
> >> > 0.151 [ Warning][ScriptingService] Fin déploiment HML
> >> > 0.151 [ Warning][ScriptingService] ====================
> >> >
> >> > This is because my port is shown as an unknown type, so my tykits are
> >> > not
> >> > loaded properly, but I don't know why :
> >> >
> >> > Deployer [S]> .types
> >> > Available data types: ConnPolicy FlowStatus LogLevel PropertyBag
> >> > SendHandle
> >> > SendStatus TaskContext array bool bools char double float float32
> >> > float32[]
> >> > float64 float64[] int int16 int16[] int32 int32[] int64 int64[] int8
> >> > int8[]
> >> > ints rt_string string strings time uint uint16 uint16[] uint32
> uint32[]
> >> > uint64 uint64[] uint8 uint8[] void
> >> >
> >> > Deployer [S]> .services
> >> > Available Services: scripting marshalling os print filtering
> >> > ros-primitives
> >> > ros_integration rosparam
> >> >
> >> > Deployer [S]> .typekits
> >> > Available Typekits: rtt-types rtt-mqueue-transport OCLTypekit
> >> > ros-primitives
> >> >
> >> >
> >> >>
> >> >> You don't need the 'ros.topic()' function, this is only an utility
> >> >> function
> >> >> for avoiding to write the 'cp' code.
> >> >>
> >> >> Peter
> >> >
> >> >
> >
> >
>

rtt-ros integration utility service

2011/4/14 Willy Lambert <lambert [dot] willy [..] ...>:
>
>
> 2011/4/14 Steven Bellens <steven [dot] bellens [..] ...>
>>
>> [...]
>> >>
>> >>
>> >> No. It doesn't seem to recognize your custom type. Did you import
>> >> either the package containing the RTT typekits for your custom
>> >> messages _OR_ a package that depends on it?
>> >
>> > Ok now, I needed to add :
>> >
>> > import("rtt_ros_integration_actionlib_msgs")
>> > import("rtt_ros_integration_arp_master_msgs")
>> >
>> > I now see the type "arp_master.DifferentialCommand" in the taskbrowser
>> > and
>> > things in rxgraph :))))))))))))))))))))))
>> >
>> > This makes me wonder about the wiki page. What should be put in which
>> > manifest ?
>> >
>> >
>> > We have 3 packages :
>> > _ MyPkg that exports the messages
>> > _ rtt_ros_integration_mypkg_msgs that creates the typekits
>> > _ OrocosPkg that uses the messages of MyPkg in Orocos via
>> > rtt_ros_integration_typekits
>> >
>> > the manifest of rtt_ros_integration_mypkg_msgs contains :
>> >
>> >   <depend package="rtt_ros_integration"/>
>> >   <depend package="MyPkg"/>
>> >
>> >   <export>
>> >     <cpp cflags="-I${prefix}/include"/>
>> >
>> >   </export>
>> >
>> >
>> > Is it necessary to dépends on rtt_ros_integration ?
>>
>> Yes, as this package contains the necessarry ROS plugins to get the
>> streaming to work (correct me if I'm wrong here Ruben)
>>
>> > what should contains the manifest of OrocosPkg ?
>>
>> You can add a dependency on your RTT typekit package _
>> rtt_ros_integration_mypkg_msgs so as to avoid multiple import
>> statements in your deploy script. It does not need anything special
>> for the rtt ros integration to work, except for the
>> rtt_ros_integration dependency.
>
> which is implicitely contained in the rtt_ros_integration_mypkg_msgs ?!

Yes!

Steven

>
[...]

rtt-ros integration utility service

2011/4/14 Steven Bellens <steven [dot] bellens [..] ...>

> 2011/4/14 Willy Lambert <lambert [dot] willy [..] ...>:
> >
> >
> > 2011/4/14 Steven Bellens <steven [dot] bellens [..] ...>
> >>
> >> [...]
> >> >>
> >> >>
> >> >> No. It doesn't seem to recognize your custom type. Did you import
> >> >> either the package containing the RTT typekits for your custom
> >> >> messages _OR_ a package that depends on it?
> >> >
> >> > Ok now, I needed to add :
> >> >
> >> > import("rtt_ros_integration_actionlib_msgs")
> >> > import("rtt_ros_integration_arp_master_msgs")
> >> >
> >> > I now see the type "arp_master.DifferentialCommand" in the taskbrowser
> >> > and
> >> > things in rxgraph :))))))))))))))))))))))
> >> >
> >> > This makes me wonder about the wiki page. What should be put in which
> >> > manifest ?
> >> >
> >> >
> >> > We have 3 packages :
> >> > _ MyPkg that exports the messages
> >> > _ rtt_ros_integration_mypkg_msgs that creates the typekits
> >> > _ OrocosPkg that uses the messages of MyPkg in Orocos via
> >> > rtt_ros_integration_typekits
> >> >
> >> > the manifest of rtt_ros_integration_mypkg_msgs contains :
> >> >
> >> > <depend package="rtt_ros_integration"/>
> >> > <depend package="MyPkg"/>
> >> >
> >> > <export>
> >> > <cpp cflags="-I${prefix}/include"/>
> >> >
> >> > </export>
> >> >
> >> >
> >> > Is it necessary to dépends on rtt_ros_integration ?
> >>
> >> Yes, as this package contains the necessarry ROS plugins to get the
> >> streaming to work (correct me if I'm wrong here Ruben)
> >>
> >> > what should contains the manifest of OrocosPkg ?
> >>
> >> You can add a dependency on your RTT typekit package _
> >> rtt_ros_integration_mypkg_msgs so as to avoid multiple import
> >> statements in your deploy script. It does not need anything special
> >> for the rtt ros integration to work, except for the
> >> rtt_ros_integration dependency.
> >
> > which is implicitely contained in the rtt_ros_integration_mypkg_msgs ?!
>
> Yes!
>

I updated http://www.ros.org/wiki/rtt_ros_integration
At the end, this enforces the use of an extra package for the messages
plugin (the rtt_ros_integration_XXXX_msgs). Is there any harm of this, as
it ensures decoupled work between application code and messages integration
?

To go further, what I would have liked for my application is to define my
custom ros messages in the rtt_ros_integration, so I only have one package
on which both ROS and Orocos applications would depends

>
> Steven
>
> >
> [...]
>

rtt-ros integration utility service

[...]
>
> I updated http://www.ros.org/wiki/rtt_ros_integration
> At the end, this enforces the use of an extra package for the messages
> plugin (the rtt_ros_integration_XXXX_msgs). Is there  any harm of this, as
> it ensures decoupled work between application code and messages integration
> ?

We used to generate the typekits inside the component package itself
before, but bumped into two major disadvantages:
- In case you want to use those messages in a second component, you
have to depend on the first
- Compilation of the typekits takes a significant amount of time,
something you don't want to re-do each time in case your developing
new components

>
> To go further, what I would have liked for my application is to define my
> custom ros messages in the rtt_ros_integration, so I only have one package
> on which both ROS and Orocos applications would depends

This would make the rtt_ros_integration package _huge_. I think it's a
good policy to make typekits for corresponding ros msg packages, as
this
- allows the user to only depend on those typekits he needs
- creates a clear mapping of typekit packages to ROS msg packages

Depending on 2 packages containing each small parts your application
needs is better then depending on one package which has a lot of stuff
you don't use.

Steven

>
>
>>
>> Steven
>>
>> >
>> [...]
>
>

rtt-ros integration utility service

2011/4/14 Steven Bellens <steven [dot] bellens [..] ...>

> [...]
> >
> > I updated http://www.ros.org/wiki/rtt_ros_integration
> > At the end, this enforces the use of an extra package for the messages
> > plugin (the rtt_ros_integration_XXXX_msgs). Is there any harm of this,
> as
> > it ensures decoupled work between application code and messages
> integration
> > ?
>
> We used to generate the typekits inside the component package itself
> before, but bumped into two major disadvantages:
> - In case you want to use those messages in a second component, you
> have to depend on the first
> - Compilation of the typekits takes a significant amount of time,
> something you don't want to re-do each time in case your developing
> new components
>
> >
> > To go further, what I would have liked for my application is to define my
> > custom ros messages in the rtt_ros_integration,
>

I meant rtt_ros_integration_XXXX_msgs, my bad. Put all in
rtt_ros_integration is of course really bad !

> so I only have one package
> > on which both ROS and Orocos applications would depends
>
> This would make the rtt_ros_integration package _huge_. I think it's a
> good policy to make typekits for corresponding ros msg packages, as
> this
> - allows the user to only depend on those typekits he needs
> - creates a clear mapping of typekit packages to ROS msg packages
>
> Depending on 2 packages containing each small parts your application
> needs is better then depending on one package which has a lot of stuff
> you don't use.
>

Ok maybe what I missed is that one should have these packages:
_ RosPkg
_ RosPkg_msg
_ rtt_ros_integration_rospkg_msgs
_ OrocosPkg

So when someone else wants to reuse the messages it may depends on
RosPkg_msg and rtt_ros_integration_rospkg_msgs only.
In the tutorial the RosPkg_msg is in the RosPkg (because this is "third
party" software that could be done like this). This design good pratices are
on the ROS side.

Back to my case, I'd like to meld rtt_ros_integration_rospkg_msgs and
RosPkg_msg in one package to decrease complexity. With your details I
realize that I am wrong because if a ROS user use my code it will depend on
orocos_ros_integration, which is a bad thing.

>
> Steven
>
> >
> >
> >>
> >> Steven
> >>
> >> >
> >> [...]
> >
> >
>

Ruben Smits's picture

rtt-ros integration utility service

On Tuesday 05 April 2011 18:02:05 Peter Soetens wrote:
> While playing with connecting with ros topics, I've found the service in
> attachment useful to quickly setup connections.
>
> Old style:
> &#10;&gt; var ConnPolicy cp&#10;&gt; cp.transport = 3&#10;&gt; cp.name_id = &quot;/cmd_vel&quot;&#10;&gt; &#10;&gt; stream(&quot;Controller.ctrl&quot;, cp)&#10;&gt;
>
> New style:
> &#10;&gt; import(&quot;rtt_ros_service&quot;) // once (should this imply require(&quot;ros&quot;) ?)&#10;&gt; require(&quot;ros&quot;) // once&#10;&gt; &#10;&gt; stream(&quot;Controller.ctrl&quot;, ros.topic(&quot;/cmd_vel&quot;) ) //DATA&#10;&gt; //or:&#10;&gt; stream(&quot;Controller.ctrl&quot;, ros.topicBuffer(&quot;/cmd_vel&quot;,10) // BUFFER&#10;&gt;
>
> No intermediary 'cp' variable is needed. The transport is automatically set
> correctly. I think the win is bigger in the taskbrowser than in a real
> script.
>
> Other utility functions could be added too...?
>
> Peter
>
> PS: maybe the name is misleading as it resembles a 'ros service' which is
> another thing...

You could call it rtt_rostopic ;)

-- Ruben