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
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:
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 (どうも ありがとう ございます).