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

2 posts / 0 new
Last post
root
Offline
Last seen: 2 days 3 hours ago
Joined: 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

Undefined
root
Offline
Last seen: 2 days 3 hours ago
Joined: 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

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK