• The directory /opt/www/bruyninckxh2/web/tmp/drutex-28242c66c899da357aff0bed2d30b817-1 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-28242c66c899da357aff0bed2d30b817-2 has been created.

[Bug 555] New: Ports AutoConnect feature fails

For more infomation about this bug, visit
Summary: Ports AutoConnect feature fails
Product: OCL
Version: 1.4.1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Deployment
AssignedTo: orocos-dev [..] ...
ReportedBy: klaas [dot] gadeyne [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

Hi,

from what I read at

I figured out that if I use the

1

statement in de config file of the deployer for each peer component, dataports
having the same name are automagically connected.
However, practice seems to indicate that I still have to put a
section into the config file, otherwise this won't work.

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

--- Comment #7 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-05-22 14:04:08 ---
(In reply to comment #6)
> (In reply to comment #3)
> > Created an attachment (id=299)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=299) [details] [details]
> > Example deployment script
> >
> > Demonstrates that AutoConnect does not work, even if the components are Peers
> > (unless I overlook something...)
> >
>
> This example file is confusing as it uses both the 'Ports' struct and
> AutoConnect.

the Ports statement is there because a plain Autoconnect fails.

> AutoConnect is not available in RTT 1.4.x, it is a 1.6.0 feature..
> so that explains it... Other users report that AutoConnect is working on
> trunk/rtt. I don't have time to backport this feature to the ocl-1.4 branch.

-ERRCANTFOLLOW here.

I'm using the 1.4 branch
[kgad@ampere ~/install/orocos/lib/pkgconfig]$
cat *
Name: orocos-ocl
Description: Orocos Component Library
Requires: orocos-rtt-gnulinux
Version: 1.4.1
[...]
Name: Orocos-RTT # human-readable name
Description: Open Robot Control Software: Real-Time Tookit # human-readable
description
Version: 1.4.1

Moreover,

mentions the feature (which is why I used it in the first place). So then this
is a least a documentation bug in OCL 1.4 IMO

Klaas

[Bug 555] Ports AutoConnect feature fails

[...]
>> AutoConnect is not available in RTT 1.4.x, it is a 1.6.0 feature..
>> so that explains it... Other users report that AutoConnect is working on
>> trunk/rtt.

liar :-)

> I don't have time to backport this feature to the ocl-1.4 branch.
>
> -ERRCANTFOLLOW here.
>
> I'm using the 1.4 branch
> [kgad@ampere ~/install/orocos/lib/pkgconfig]$
> cat *
> Name: orocos-ocl
> Description: Orocos Component Library
> Requires: orocos-rtt-gnulinux
> Version: 1.4.1
> [...]
> Name: Orocos-RTT # human-readable name
> Description: Open Robot Control Software: Real-Time Tookit # human-readable
> description
> Version: 1.4.1
>
> Moreover,
>
> mentions the feature (which is why I used it in the first place). So then this
> is a least a documentation bug in OCL 1.4 IMO

svn diff orocos-deployment.xml
Index: orocos-deployment.xml
===================================================================
--- orocos-deployment.xml (revision 29296)
+++ orocos-deployment.xml (working copy)
@@ -317,21 +317,6 @@
method will be called during startComponents().
- The element indicates if the
- component's data ports should be automatically connected to
- peer ports which have the same name and type. This flag is
- read during the configureComponents()
- step of the DeploymentComponent. Both components must have
- the element set to 1 in order
- to trigger automatic connection of ports. It is possible
- that a port is connected to one component using the Ports
- element and to another component using the
- flag. If an automatic port
- connection fails, the configuration procedure will not fail
- and just continue. An error message may be logged. By
- default, is 0 (off).
-
-

The section specifies from
which XML file each component is configured and
must contain values for all properties
[kgad@ampere ~/SVN/orocos/ocl-1.4/doc/xml]$
svn commit -m "fix documentation merge issue" orocos-deployment.xml
Sending orocos-deployment.xml
Transmitting file data .
Committed revision 29311.

I didn't check which merge caused this issue, so this might not be the
cleanest solution though :-(

Klaas

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |WONTFIX

--- Comment #6 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-22 13:56:29 ---
(In reply to comment #3)
> Created an attachment (id=299)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=299) [details]
> Example deployment script
>
> Demonstrates that AutoConnect does not work, even if the components are Peers
> (unless I overlook something...)
>

This example file is confusing as it uses both the 'Ports' struct and
AutoConnect. AutoConnect is not available in RTT 1.4.x, it is a 1.6.0 feature..
so that explains it... Other users report that AutoConnect is working on
trunk/rtt. I don't have time to backport this feature to the ocl-1.4 branch.

Peter

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

--- Comment #5 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-05-22 09:26:11 ---
(In reply to comment #1)
> (In reply to comment #0)
> > Hi,
> >
> > from what I read at
> >
> > I figured out that if I use the
> >
> > 1
> >
> > statement in de config file of the deployer for each peer component, dataports
> > having the same name are automagically connected.
> > However, practice seems to indicate that I still have to put a
> > section into the config file, otherwise this won't work.
>
> I figured out why. '...each peer component...' : the deployer iterates over the
> *peers* of each 'autoconnect' component to try to create a connection. If you
> did not set the other AutoConnect component as a "Peer" (one way and/or the
> other way) the autoconnect is not done with that component.

Hi, as far as I can see (See comment #3, where I attached my deployment.cpf
file [*]) the components were peers.

[*] My bugzilla-incapable brain thought it could reply here and add an
attachment at one :-)

> So the question rises: is AutoConnect a 'global' feature or only for 'Peers' ?
> I would think a global feature...

I tend to agree with Ruben here and say it is only for peers, although I am a
complete deployer-newbie...
However, if that is the case the word "peer" in the deployer's documentation
probably should become *emphasized*


The AutoConnect element indicates if the component's data ports should be
automatically connected to peer ports which have the same name and type

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

--- Comment #4 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-22 09:19:20 ---
> $ svn ci -m\"Fix bug #555: Ports AutoConnect feature fails.
> > Iterate over all peers of the Deployer, not just the peers of the current component.
> > AutoConnect is still not perfect, possibly, lots of warnings may be given.
> > Errors are ignored for now.
> > \"
> Sending deployment/DeploymentComponent.cpp
> Transmitting file data .
> Committed revision 29301.
>

I'll revert that until we have cleared things out on the orocos-dev mailing
list.

$ svn di
Index: DeploymentComponent.cpp
===================================================================
--- DeploymentComponent.cpp (revision 29301)
+++ DeploymentComponent.cpp (working copy)
@@ -751,10 +751,10 @@

// only autoconnect if AutoConnect == 1 and peer has AutoConnect
== 1
if ( comps[comp.getName()].autoconnect ) {
- TaskContext::PeerList peers = this->getPeerList();
+ TaskContext::PeerList peers = peer->getPeerList();
for(TaskContext::PeerList::iterator pit = peers.begin(); pit
!= peers.end(); ++pit) {
- if ( comps.count( *pit ) && comps[ *pit ].autoconnect &&
*pit != comp.getName() ) {
- TaskContext* other = this->getPeer( *pit );
+ if ( comps.count( *pit ) && comps[ *pit ].autoconnect ) {
+ TaskContext* other = peer->getPeer( *pit );
::RTT::connectPorts( peer, other );
}
}
+ sspr@lt00129:~/src/Orocos/trunk/ocl/deployment
$ svn ci -m"Revert 'global' autoconnect to old behavior as long as no
consensus/better solution has been found."
Sending deployment/DeploymentComponent.cpp
Transmitting file data .
Committed revision 29302.

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

--- Comment #3 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-05-22 09:10:34 ---
Created an attachment (id=299)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=299)
Example deployment script

Demonstrates that AutoConnect does not work, even if the components are Peers
(unless I overlook something...)

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

--- Comment #2 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-21 23:40:11 ---
@@ -744,16 +744,18 @@
// Autoconnect ports.
for (PropertyBag::iterator it= root.begin(); it!=root.end();it++) {
Property comp = *it;
+ if ( !comp.ready() )
+ continue;

- TaskContext* peer = this->getPeer( comp.getName() );
+ TaskContext* peer = comps[ comp.getName() ].instance;

// only autoconnect if AutoConnect == 1 and peer has AutoConnect
== 1
if ( comps[comp.getName()].autoconnect ) {
- TaskContext::PeerList peers = peer->getPeerList();
+ TaskContext::PeerList peers = this->getPeerList();
for(TaskContext::PeerList::iterator pit = peers.begin(); pit
!= peers.end(); ++pit) {
- if ( comps.count( *pit ) && comps[ *pit ].autoconnect ) {
- assert( peer->getPeer( *pit ) );
- ::RTT::connectPorts( peer, peer->getPeer( *pit ) );
+ if ( comps.count( *pit ) && comps[ *pit ].autoconnect &&
*pit != comp.getName() ) {
+ TaskContext* other = this->getPeer( *pit );
+ ::RTT::connectPorts( peer, other );
}
}
}

$ svn ci -m"Fix bug #555: Ports AutoConnect feature fails.
> Iterate over all peers of the Deployer, not just the peers of the current component.
> AutoConnect is still not perfect, possibly, lots of warnings may be given.
> Errors are ignored for now.
> "
Sending deployment/DeploymentComponent.cpp
Transmitting file data .
Committed revision 29301.

[Bug 555] Ports AutoConnect feature fails

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |peter [dot] soetens [..] ...
Target Milestone|--- |1.6.0

--- Comment #1 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-21 23:07:28 ---
(In reply to comment #0)
> Hi,
>
> from what I read at
>
> I figured out that if I use the
>
> 1
>
> statement in de config file of the deployer for each peer component, dataports
> having the same name are automagically connected.
> However, practice seems to indicate that I still have to put a
> section into the config file, otherwise this won't work.

I figured out why. '...each peer component...' : the deployer iterates over the
*peers* of each 'autoconnect' component to try to create a connection. If you
did not set the other AutoConnect component as a "Peer" (one way and/or the
other way) the autoconnect is not done with that component.

So the question rises: is AutoConnect a 'global' feature or only for 'Peers' ?
I would think a global feature...

Peter

Ruben Smits's picture

[Bug 555] Ports AutoConnect feature fails

On Wednesday May 21 2008 23:07:28 Peter Soetens wrote:
> For more infomation about this bug, visit
>
>
> Peter Soetens

<peter [dot] soetens [..] ...> changed:
>
> What |Removed |Added
> --------------------------------------------------------------------------
> Status|NEW |ASSIGNED
> CC| |peter [dot] soetens [..] ...
> Target Milestone|--- |1.6.0
>
>
>
> --- Comment #1 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-05-21
> 23:07:28 --- (In reply to comment #0)
>
> > Hi,
> >
> > from what I read at
> > > >loyment.html> I figured out that if I use the
> >
> > 1
> >
> > statement in de config file of the deployer for each peer component,
> > dataports having the same name are automagically connected.
> > However, practice seems to indicate that I still have to put a > > ports> section into the config file, otherwise this won't work.
>
> I figured out why. '...each peer component...' : the deployer iterates over
> the *peers* of each 'autoconnect' component to try to create a connection.
> If you did not set the other AutoConnect component as a "Peer" (one way
> and/or the other way) the autoconnect is not done with that component.
>
> So the question rises: is AutoConnect a 'global' feature or only for
> 'Peers' ? I would think a global feature...

I do not agree with this, this would only be a good idea in very simple
applications, in more complex application like ours with multiple instances
of the same components this autoconnect feature would become unusable.

I'm more in favour of only autoconnecting with the peer components listed for
that respective component.

Ruben

> Peter
>
> --
> Configure bugmail:
> https://www.fmtc.be/bugzilla/orocos/userprefs.cgi?tab=email ------- You are
> receiving this mail because: -------
> You are on the CC list for the bug.
> You are the assignee for the bug.