Skip to content

RTCとネームサーバーを同時に起動する #6

Description

@Nobu19800

以下はネームサーバーを同時に起動するRTCのプログラム作成手順を説明している。

※make installコマンドを実行すると、OpenrtmNamesPlugin関連のファイルは<install_prefix>/lib/openrtm-2.1/naming/OpenrtmNamesPlugin.a<install_prefix>/lib/openrtm-2.1/naming/OpenrtmNamesPlugin.hにインストールされる。

  1. RTCのプログラムでOpenrtmNamesPlugin.hをインクルードする。
#include <naming/OpenrtmNamesPlugin.h>

2.マネージャ起動時にsetModuleInitProcで設定する関数(以下ではMyModuleInit関数)でOpenrtmNamesPluginInit関数を実行してネームサーバーを起動する。

void MyModuleInit(RTC::Manager* manager)
{
  OpenrtmNamesPluginInit(manager);
(省略)

int main (int argc, char** argv)
{
  RTC::Manager* manager;
  manager = RTC::Manager::init(argc, argv);
  manager->setModuleInitProc(MyModuleInit);
  1. OpenrtmNamesPlugin.aをリンクしてビルドする。

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions