[openrtm-users 02897] using dynamically created ports

7 個の投稿 / 0 new
最終投稿
pergy
オフライン
Last seen: 11年 2ヶ月 前
登録日: 2012-08-14 17:49
[openrtm-users 02897] using dynamically created ports

Hello everyone,

in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).

However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,

György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

未定義
pergy
オフライン
Last seen: 11年 2ヶ月 前
登録日: 2012-08-14 17:49
[openrtm-users 02898] using dynamically created ports

In addition to my experiment,I could manage to activate the connection immediately by calling "m_portAdmin.activatePorts();" directly with modified RTObject.h (made it public). So, essentially I think I need something, which calls this function indirectly

Thanks again,György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Tue, Aug 27, 2013 at 1:27 PM, György Persa <persa@sztaki.hu> wrote:

Hello everyone,
in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).
However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,
György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

Ando Noriaki
オフライン
Last seen: 1年 9ヶ月 前
登録日: 2011-09-04 17:20
[openrtm-users 02899] using dynamically created ports

Hi,I could not find attachments in your e-mail.2013/8/27 György Persa <persa@sztaki.hu>

Hello everyone,

in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).

However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,

György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

pergy
オフライン
Last seen: 11年 2ヶ月 前
登録日: 2012-08-14 17:49
[openrtm-users 02900] using dynamically created ports

Hello,

they were "inline images", but now I just attach them! Hope, now they are available!

György

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Wed, Aug 28, 2013 at 1:18 AM, Ando Noriaki <n-ando@aist.go.jp> wrote:

Hi,I could not find attachments in your e-mail.2013/8/27 György Persa <persa@sztaki.hu>

Hello everyone,

in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).

However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,

György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Ando Noriaki
オフライン
Last seen: 1年 9ヶ月 前
登録日: 2011-09-04 17:20
[openrtm-users 02901] using dynamically created ports

Hello,Thanks! But I don't know how do you realize dynamic service port.Could you show your code?Noriaki Ando
2013/8/28 György Persa <persa@sztaki.hu>

Hello,

they were "inline images", but now I just attach them! Hope, now they are available!

György

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Wed, Aug 28, 2013 at 1:18 AM, Ando Noriaki <n-ando@aist.go.jp> wrote:

Hi,I could not find attachments in your e-mail.2013/8/27 György Persa <persa@sztaki.hu>

Hello everyone,

in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).

However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,

György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

pergy
オフライン
Last seen: 11年 2ヶ月 前
登録日: 2012-08-14 17:49
[openrtm-users 02903] using dynamically created ports

Hello,

sure! I attached the compressed folders for the two RTCs and the service definition!

Also, on this link you can find my exact VS2012 solution, I've used:https://www.dropbox.com/sh/pioyrjo7tg8d373/LPbOT0zeVt

György
György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Thu, Aug 29, 2013 at 2:40 AM, Ando Noriaki <n-ando@aist.go.jp> wrote:

Hello,Thanks! But I don't know how do you realize dynamic service port.Could you show your code?Noriaki Ando

2013/8/28 György Persa <persa@sztaki.hu>

Hello,

they were "inline images", but now I just attach them! Hope, now they are available!

György

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Wed, Aug 28, 2013 at 1:18 AM, Ando Noriaki <n-ando@aist.go.jp> wrote:

Hi,I could not find attachments in your e-mail.2013/8/27 György Persa <persa@sztaki.hu>

Hello everyone,

in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).

However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,

György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Ando Noriaki
オフライン
Last seen: 1年 9ヶ月 前
登録日: 2011-09-04 17:20
[openrtm-users 02904] using dynamically created ports

Hello,Please try to add "m_portAdmin.activatePorts();" after addPort() function. std::string custom_port_name(std::string(getInstanceName()) + std::string("_custom_port"));
mCustomPort.registerConsumer( custom_port_name.c_str() , "Tester::CustomDynamicService", mCustomService); addPort(mCustomPort);
                // Add the following code                m_portAdmin.activatePorts();Best regards,Noriaki Ando
2013/8/29 György Persa <persa@sztaki.hu>

Hello,

sure! I attached the compressed folders for the two RTCs and the service definition!

Also, on this link you can find my exact VS2012 solution, I've used:https://www.dropbox.com/sh/pioyrjo7tg8d373/LPbOT0zeVt

György
György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Thu, Aug 29, 2013 at 2:40 AM, Ando Noriaki <n-ando@aist.go.jp> wrote:

Hello,Thanks! But I don't know how do you realize dynamic service port.Could you show your code?Noriaki Ando

2013/8/28 György Persa <persa@sztaki.hu>

Hello,

they were "inline images", but now I just attach them! Hope, now they are available!

György

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

On Wed, Aug 28, 2013 at 1:18 AM, Ando Noriaki <n-ando@aist.go.jp> wrote:

Hi,I could not find attachments in your e-mail.2013/8/27 György Persa <persa@sztaki.hu>

Hello everyone,

in my project I would like to create service ports dynamically, runtime and connect them together. Is there any simple way to do this? Here's a short overview of the exact problem what I encountered, I hope you can help me!

For this purpose, I designed an experiment for two test components. The RTC#1 (DynamicPortTester in attachments) is instructing  RTC#2  (DynamicPortRecevier) for creating a new port and register a provider for that.

After that, RTC#2 sets up a port as well and connect it to RTC#1's newly created port.

My problem is that I'm unable to use the provided functions in RTC#2, because the service is inactive (_non_existent()).

However, if I deactivate RTC#2 and activate it again, the service became active and usable.  Also, if I add the port when creating the component or in onInitialize(), it succeeds as well.

Is there a way to get an active service without deactivate & activate it?

Thanks in advance,

György Persa

György PersaSoftware engineerInstitute for Computer Science and ControlHungarian Academy of Sciences3D Internet-based Control and Communications Research Laboratory / 3DICC

Project VirCA (www.virca.hu)

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

pergy
オフライン
Last seen: 11年 2ヶ月 前
登録日: 2012-08-14 17:49
[openrtm-users 02909] using dynamically created ports

Hi,

thanks! That works! And it works also if i put it in any RTC! Turned out,
that I have access to that member, since I inherited from
DataFlowComponentBase. Forgot it :S :)

Thanks again,
Best regards,
György Persa

György Persa
*Software engineer*
Institute for Computer Science and Control
Hungarian Academy of Sciences
3D Internet-based Control and Communications Research Laboratory / 3DICC
*Project VirCA* (www.virca.hu)

On Fri, Aug 30, 2013 at 6:42 AM, Ando Noriaki wrote:

> Hello,
>
> Please try to add "m_portAdmin.activatePorts();" after addPort() function.
>
> std::string custom_port_name(std::string(getInstanceName()) +
> std::string("_custom_port"));
> mCustomPort.registerConsumer( custom_port_name.c_str() ,
> "Tester::CustomDynamicService", mCustomService);
> addPort(mCustomPort);
> // Add the following code
> m_portAdmin.activatePorts();
>
> Best regards,
> Noriaki Ando
>
>
>
>
> 2013/8/29 György Persa
>
>> Hello,
>>
>> sure! I attached the compressed folders for the two RTCs and the service
>> definition!
>> Also, on this link you can find my exact VS2012 solution, I've used:
>> https://www.dropbox.com/sh/pioyrjo7tg8d373/LPbOT0zeVt
>>
>> György
>>
>> György Persa
>> *Software engineer*
>> Institute for Computer Science and Control
>> Hungarian Academy of Sciences
>> 3D Internet-based Control and Communications Research Laboratory / 3DICC
>> *Project VirCA* (www.virca.hu)
>>
>>
>> On Thu, Aug 29, 2013 at 2:40 AM, Ando Noriaki wrote:
>>
>>> Hello,
>>>
>>> Thanks! But I don't know how do you realize dynamic service port.
>>> Could you show your code?
>>>
>>> Noriaki Ando
>>>
>>>
>>>
>>>
>>>
>>> 2013/8/28 György Persa
>>>
>>>> Hello,
>>>>
>>>> they were "inline images", but now I just attach them! Hope, now they
>>>> are available!
>>>>
>>>> György
>>>>
>>>>
>>>>
>>>> György Persa
>>>> *Software engineer*
>>>> Institute for Computer Science and Control
>>>> Hungarian Academy of Sciences
>>>> 3D Internet-based Control and Communications Research Laboratory / 3DICC
>>>> *Project VirCA* (www.virca.hu)
>>>>
>>>>
>>>> On Wed, Aug 28, 2013 at 1:18 AM, Ando Noriaki wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I could not find attachments in your e-mail.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2013/8/27 György Persa
>>>>>
>>>>>> Hello everyone,
>>>>>>
>>>>>> in my project I would like to create service ports dynamically,
>>>>>> runtime and connect them together. Is there any simple way to do this?
>>>>>> Here's a short overview of the exact problem what I encountered, I hope you
>>>>>> can help me!
>>>>>>
>>>>>> For this purpose, I designed an experiment for two test components.
>>>>>> The RTC#1 (DynamicPortTester in attachments) is instructing RTC#2
>>>>>> (DynamicPortRecevier) for creating a new port and register a provider for
>>>>>> that.
>>>>>> [image: Inline image 1]
>>>>>> After that, RTC#2 sets up a port as well and connect it to RTC#1's
>>>>>> newly created port.
>>>>>> [image: Inline image 2]
>>>>>> My problem is that I'm unable to use the provided functions in RTC#2,
>>>>>> because the service is inactive (_non_existent()).
>>>>>> However, if I deactivate RTC#2 and activate it again, the service
>>>>>> became active and usable. Also, if I add the port when creating the
>>>>>> component or in onInitialize(), it succeeds as well.
>>>>>>
>>>>>> Is there a way to get an active service without deactivate & activate
>>>>>> it?
>>>>>>
>>>>>> Thanks in advance,
>>>>>> György Persa
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> György Persa
>>>>>> *Software engineer*
>>>>>> Institute for Computer Science and Control
>>>>>> Hungarian Academy of Sciences
>>>>>> 3D Internet-based Control and Communications Research Laboratory /
>>>>>> 3DICC
>>>>>> *Project VirCA* (www.virca.hu)
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> openrtm-users mailing list
>>>>>> openrtm-users@openrtm.org
>>>>>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> openrtm-users mailing list
>>>>> openrtm-users@openrtm.org
>>>>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> openrtm-users mailing list
>>>> openrtm-users@openrtm.org
>>>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>>>
>>>>
>>> _______________________________________________
>>> openrtm-users mailing list
>>> openrtm-users@openrtm.org
>>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>>
>>>
>>
>> _______________________________________________
>> openrtm-users mailing list
>> openrtm-users@openrtm.org
>> http://www.openrtm.org/mailman/listinfo/openrtm-users
>>
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users@openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
>
>

コメントを投稿するにはログインまたはユーザー登録を行ってください

ダウンロード

最新バージョン : 2.0.1-RELESE

統計

Webサイト統計
ユーザ数:2195
プロジェクト統計
RTコンポーネント307
RTミドルウエア35
ツール22
文書・仕様書2

Choreonoid

モーションエディタ/シミュレータ

OpenHRP3

動力学シミュレータ

OpenRTP

統合開発プラットフォーム

産総研RTC集

産総研が提供するRTC集

TORK

東京オープンソースロボティクス協会

DAQ-Middleware

ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク