[openrtm-users 01157] Re: Clean-up of OpenRTM application

Steffen Wittmeier steffen.wittmeier @ in.tum.de
2010年 3月 12日 (金) 02:42:02 JST


Hello,

this patch fixed a segmentation fault that I had when shutting down the 
application. It did not, however, help with the omniorb error message. I 
already figured out that the "omni_thread_fatal" message only appears 
when the manager is run in non-blocking mode.

Do I need to do anything else on clean-up? I found this on the web: 
http://www.omniorb-support.com/pipermail/omniorb-list/2005-June/026811.html

Thanks,
Steffen Wittmeier

On 03/10/2010 06:14 AM, kurihara shinji wrote:
> Hello,
>
> Please try to apply the patch attached to the mailing list "[openrtm-users 01149]".
>   or
> Please check out the source of the latest version from the following repositories.
>
>   http://openrtp.jp/openrtm/svn/OpenRTM-aist/branches/RELENG_1_0/OpenRTM-aist
>
>
> Regards,
> Shinji Kurihara
>
> On Mon, 08 Mar 2010 18:04:32 +0100
> Steffen Wittmeier<steffen.wittmeier @ in.tum.de>  wrote:
>
>> Hi,
>>
>> I am building a robot simulator application based on OpenRTM components
>> (so that the simulator can smoothly be integrated with the real robot
>> which also uses RTCs).
>>
>> The simulator GUI is using Qt and the main window as well as the
>> individual widgets are derived from QMainWindow and QWidget,
>> respectively, as well as from RTC::DataFlowComponentBase. Hence, every
>> widget is a RTC and a GUI widget at the same time.
>>
>> This approach works quite well and I can even delete individual
>> widgets/RTC at run-time by catching the widget close event and calling
>> exit() on the component.
>>
>> However, I am having troubles with cleaning-up the application on
>> closing. I am always getting the following error:
>>
>> terminate called after throwing an instance of 'omni_thread_fatal'
>> Aborted
>>
>> What would be the right way of destructing the RTCs? I already updated
>> to OpenRTM 1.0 as the destructors were not called when I used OpenRTM 0.42.
>>
>> Any help is appreciated...
>>
>>
>> Here's a snapshot of the code that I am using:
>> int
>> main(int argc, char** argv)
>> {
>>     RTC::Manager* manager;
>>     manager = RTC::Manager::init(argc, argv);
>>
>>     // Initialize manager
>>     manager->init(argc, argv);
>>
>>     // Set module initialization procedure
>>     // that's where I create the basic components of the GUI
>>     // (MainWindow, Model, Controller, LogManager)
>>     manager->setModuleInitProc(createComponents);
>>
>>     // Activate manager and register to naming service
>>     manager->activateManager();
>>
>>     // run the manager in non-blocking mode
>>     manager->runManager(true);
>>
>>     // Qt main loop
>>     application.exec();
>>
>>    // when the main loop exits, clean up components
>>    // compMainWindow, compEcceosController, etc. are handles
>>    // to the component, they are of type RTC::RtcBase*
>>     if (compMainWindow != 0)
>>     {
>>       std::cout<<  "Exiting main window"<<  std::endl;
>>       compMainWindow->exit();
>>     }
>>
>>     if (compEcceosController != 0)
>>     {
>>       std::cout<<  "Exiting controller"<<  std::endl;
>>       compEcceosController->exit();
>>     }
>>
>>     if (compEcceosModel != 0)
>>     {
>>       std::cout<<  "Exiting model"<<  std::endl;
>>       compEcceosModel->exit();
>>     }
>>
>>     if (compLogManager != 0)
>>     {
>>       std::cout<<  "Exiting log manager"<<  std::endl;
>>       //compLogManager->exit();
>>     }
>>
>>     manager->terminate();
>>
>>     return 0;
>> }
>>
>
>

-- 
Steffen Wittmeier
Lehrstuhl für Informatik VI
Technische Universität München
Boltzmannstraße 3, 85748 Garching

Telefon : +89 289-18100
Telefax : +89 289-18107
E-Mail  : steffen.wittmeier @ in.tum.de
Internet: http://www6.in.tum.de/



openrtm-users メーリングリストの案内