Get "Real Time" in OpenRTM controller / Keyboard input teleop module?

2 個の投稿 / 0 new
最終投稿
DavidB
オフライン
Last seen: 10年 8ヶ月 前
登録日: 2013-08-15 23:21
Get "Real Time" in OpenRTM controller / Keyboard input teleop module?

Hi all (みなさん、こんにちは)

Sorry I post one of these questions in OpenHRP BBS. I am using OpenHRP3 for robot simulation, with a controller module from OpenRTM.

.

I can read the "Sim Time" of a message using:

    // Read data from port
    if (m_angleIn.isNew())
    {
        m_angleIn.read();
    }
    std::cout << "TimeStamp: " << m_angle.tm.sec << "  " << m_angle.tm.nsec << std::endl;

How can I get the "Real Time" time from the OpenHRP simulator please?

.

.

I would like to control robot simulation using keyboard input (tele-operation).

e.g. in terminal or GUI I pressed <enter> or <f> or <b>

How can I create a OpenRTM module or OpenHRP plugin that receives terminal keyboard input?

.

Thank you for your help (どうも ありがとう ございます).

未定義
Ando Noriaki
オフライン
Last seen: 1年 9ヶ月 前
登録日: 2011-09-04 17:20
[openrtm-users 02873] Get "Real Time" in OpenRTM controller / K

Hello,

2013/8/15 :
> Hi all (みなさん、こんにちは)
>
> Sorry I post one of these questions in OpenHRP BBS.
> I am using OpenHRP3 for robot simulation, with a controller
> module from OpenRTM. . I can read the "Sim Time" of a message using:
>
> // Read data from port
> if (m_angleIn.isNew()) {
> m_angleIn.read();
> }
> std::cout << "TimeStamp: " << m_angle.tm.sec << " " << m_angle.tm.nsec << std::endl;
>
> * How can I get the "Real Time" time from the OpenHRP simulator please?

If the "Real Time" means system time of the machine, you can use
coil::gettimeofday()
function. It has microseconds resolution and returns real time of the
system clock.
But this assumes that the target machine and the RTC which obtains the
real time are same.

> I would like to control robot simulation using keyboard input (tele-operation).
> e.g. in terminal or GUI I pressed or or
>
> * How can I create a OpenRTM module or OpenHRP plugin that receives terminal keyboard input?

If the RTC has STDIN and console, you can use ncurses library. But you
might want to receive
keyboard input from OpenHRP3's eclipse window. In that case, you may
have to catch keyboard
event through SWT (Standard Widget Toolkit) which is base GUI widget
library of Eclipse.

In typical OpenRTM way, you might add an InPort to the target RTC to
received keyboard
command or reference value, and connect an keyboard input RTC or joystick RTC.

> Thank you for your help (どうも ありがとう ございます).

Best regards,
Noriaki Ando
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

コメントを投稿するにはログインまたはユーザー登録を行ってください

ダウンロード

最新バージョン : 2.0.1-RELESE

統計

Webサイト統計
ユーザ数:2195
プロジェクト統計
RTコンポーネント307
RTミドルウエア35
ツール22
文書・仕様書2

Choreonoid

モーションエディタ/シミュレータ

OpenHRP3

動力学シミュレータ

OpenRTP

統合開発プラットフォーム

産総研RTC集

産総研が提供するRTC集

TORK

東京オープンソースロボティクス協会

DAQ-Middleware

ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク