[openrtm-users 01442] about having multiple instance in a manager

2 個の投稿 / 0 new
最終投稿
root
オフライン
Last seen: 21時間 47分 前
登録日: 2009-06-23 14:31
[openrtm-users 01442] about having multiple instance in a manager

Hi OpenRTM ML and Geoff:I was wondering how do I create two instances of the same component with a manager in the main() of a component??I couldn't find any documentation on the website, except in the tutorial on rtcshell (rtmgr)
(I use VC8 in windows)I tried, copying and pasting the dll and exe to another folder and run two instances at the same time.But it seemed to confuse the RTSystemEditor and both instance disappear from the RTSystem Editor list and also rtls.
ThanksTony

未定義
root
オフライン
Last seen: 21時間 47分 前
登録日: 2009-06-23 14:31
[openrtm-users 01444] about having multiple instance in a manag

Hi Tony,

On 24/10/10 16:22, Tony Kuo wrote:
> Hi OpenRTM ML and Geoff:
>
> I was wondering how do I create two instances of the same component with
> a manager in the main() of a component??
>
> I couldn't find any documentation on the website, except in the tutorial
> on rtcshell (rtmgr)
>
> (I use VC8 in windows)
> I tried, copying and pasting the dll and exe to another folder and run
> two instances at the same time.
> But it seemed to confuse the RTSystemEditor and both instance disappear
> from the RTSystem Editor list and also rtls.

If you run two separate instances of a component in standalone mode, as
you do when running the EXE from two folders, they will separate
managers and so have no knowledge of each other. This means that they
will clobber each other on the name server.

You can start two instances from a single manager using the manager's
API. Have a look in the documentation that came with OpenRTM. It should
be in the class hierarchy. The function you need is createComponent().
Pass in the implementation ID of the component you want to create, along
with any extra arguments specified in URL-style (e.g.
"ConsoleIn?config.default.blurgle=4&config.default.blorgle=2"). You can
call this twice in the module initialisation function of the manager
(the one that is specified in main()), or you can run the manager in
non-blocking mode and call it after calling runManager() - but remember
to block yourself or everything will shut down again as soon as main()
finishes.

Geoff

Log in or register to post comments

ダウンロード

最新バージョン : 2.1.0-RELESE

統計

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

OpenRTM@Github

OpenRTM-aist GitHubサイト

ROS

Robot Operating System

Choreonoid

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

DAQ-Middleware

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

産総研が提供するRTC集

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