Overview

Operation of a controller requires the rtc.conf file which describes a setup of RT component, and the script (batch) file which described a setup of connection between a controller bridge and RT component. A controller bridge is the process of passing input and output between a robot and each OpenRTM component. It also creates RT component for a robot's input and output. Here, the creation method of two files is explained.

How to create using GUI

Please choose Sample from the list of robots by Controller View, and push a "Edit" button.


Fig.1 : Controller View

Please set up the name and the interval of operation of Controller and push a "new File" button.
When you have already created the file, please push a "select File" button, choose a file and push a "open file" button. You can edit a file.


Fig.2 : Controller View

The dialog for a file setup opens. The name of the controller is already displayed. Because, it must be in agreement with the name set up by Controller View.
Other default values are displayed.


Fig.3 : Controller Bridge Dialog

You set up a robot's input-output port to control.
Please right-click a table and choose "add". When you delete, please choose and right-click the line of a table and choose "delete".
Please choose each cell, and as shown in a figure, set up.


Fig.4 : Controller Bridge Dialog

If you choose the cell of id, the dialog for id edit will open. Since a robot's link names and sensor names are displayed, please put in a check.
Selection of a "All joints" button will choose all links with Joint ID. Moreover, the order of input and output becomes the turn that the check button is located in a line. You can replace the turn of a button by drag-and-drop operation.
Please set up not contradictory to a setup of property. Please refer to "How to use Controller-Bridge" for the details of a setup.


Fig.5 : Controller Bridge ID Dialog

Please set up Module Name and Controller RTC Name and push a "check" button.
Please check that the error message is not displayed.


Fig.6 : Controller Bridge Dialog

When you save a setup of connection at another file, please put a check into "Use the configuration file", put in a file name, and push a "check" button.


Fig.7 : Controller Bridge Dialog

Please push a "Save as" button, choose a file and save the contents. Please save as SamplePD.sh (.bat) to a mySamplePD directory in the example of this document. Please push a "Close" button and close Dialog.

How to create using a text editor

Since two configuration files are text format, you can edit using the editor.
When you set up the details of rtc.conf not corresponding by GUI, or when you include a setup of an environment variable in a script, please use an editor.

rtc.conf

"rtc.conf" file should be placed in the current directory when you start this particular ControllerBridge.
Please place on a mySamplePD directory in the example of this document.

Please specify the following configurations in "rtc.conf".

Specify the location(ip address) of the nameserver, according to your environment.

corba.nameservers: localhost:2809

Specify the settings regarding with log files.

  • To disable creating log files;
      logger.enable:NO
  • To enable creating log files;
      logger.enable:YES
  • Specify the log file's name format and saving location(path). You can also specify the direct path as shown below.

      logger.file_name: D:\\Temp\\rtc%p.log

    Set the log level.

      logger.log_level: TRACE

Specify the module file name and the component name.

manager.modules.preload: SamplePD
manager.components.precreate: SamplePD

Normally you don't have to change the following contents.

naming.formats: %n.rtc
manager.modules.load_path: .
exec_cxt.periodic.rate: 1000000
manager.modules.abs_path_allowed: yes
exec_cxt.periodic.type: SynchExtTriggerEC

Refer OpenRTM Configuaration manual, for detailed explanation about RT-components' configuration options.

Note:
A sample conf file is available at "OpenHRP3/sample/controller/SamplePD/rtc.conf". You may copy that, edit and use by yourself. Meanwhile if you are using binary packages distributed with Beta4 release, please be remined to use the sample file placed in "OpenHRP3/sample/controller/SamplePD/rtc.conf", according to the appropriate environment as shown below.

  • On Ubuntu : /usr/share/
  • On Windows : OpenHRPSDK/share/
File content is same for both environment.


Controller-bridge Settings

The purpose of separating the implementation of each RT-component is to improve the maintainability and the portability upon development process. Here we describe, how to start controller-bridge and its connection settings with the component.
Please use SamplePD.sh (.bat) which placed in OpenHRP3/sample/controller/SamplePD, copying it to mySamplePD.

SamplePD.sh

#!/bin/sh

openhrp-controller-bridge \
--server-name SamplePDController \
--out-port angle:JOINT_VALUE \
--in-port torque:JOINT_TORQUE \
--connection angle:angle \
--connection torque:torque

server-name:Name of OpenHRP controller.
(Ex: the component is registered in the nameserver as "SamplePDController", in the above notation.)

out-port:Specifies output port name and output property, seperated by colon.
(Ex: Output port "angle" outputs "JOINT_VALUE" property.)

in-port:Specifies input port name and input property, seperated by colon.
(Ex: Input port "torque" inputs "JOINT_TORQUE" property.)

connection:Used to specify the connection between ports.
Specifies model's i/o port name and controller's i/o port name, seperated by colon.
(Ex: Connects robot-model's port "angle" with controller's port "angle". Same way it conncets, robot-model's port "torque" with controller's port "torque", as noted next in line.)

Please refer to "How to use Controller-Bridge" for details of a starting option