[openrtm-users 03090] OpenRTM-1.1.0でdeactivate時に実行周期の10倍待つ理由

Fumio KANEHIRO f-kanehiro @ aist.go.jp
2014年 8月 8日 (金) 10:33:13 JST


金広@産総研です。

OpenRTM-1.1.0を使用しています。

PeriodicExecutionContextのdeactivate_component()で、以下のように
実行周期の10倍を単位として状態遷移が起きるのを待っていると思います。
実行周期が1秒といったゆっくりな場合に、終了に時間がかかるので困って
います。
ここは1倍でもよいように思うのですが、何か理由がありますでしょうか?
またこのあたりの処理は1.1.1で改善されると聞いていますが、1.1.1の
リリースはいつ頃になりそうでしょうか?

    it->_sm.m_sm.goTo(INACTIVE_STATE);
    int count(0);
    const double usec_per_sec(1.0e6);
    double sleeptime(10.0 * usec_per_sec / get_rate());
    RTC_PARANOID(("Sleep time is %f [us]", sleeptime));
    while (it->_sm.m_sm.isIn(ACTIVE_STATE))
      {
        RTC_TRACE(("Waiting to be the INACTIVE state %d %f", count,
(double)coi\
l::gettimeofday()));
        coil::usleep(sleeptime);
        if (count > 1000)
          {
            RTC_ERROR(("The component is not responding."));
            break;
          }
        ++count;
      }
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.openrtm.org/pipermail/openrtm-users/attachments/20140808/89cfb47f/attachment.html>


More information about the openrtm-users mailing list