Re: Action to manually drive the robot ** Re: Keyboard input.

原创 2005年04月28日 09:47:00

Re: Action to manually drive the robot

You can just use ArActionKeydrive, it already does exactly these
things... ArKeyHandler does the keyboard input too, if you want to
just use that straight up or see how to do it... basically getc is a
blocking command or waits for enter or something along those
lines... so you have to do some termios stuff to set it up right in
Linux and check 'kbhit' in Windows.

You should upgrae to the latest version for this... I only put this in
in release like 1.0.2 or so.

Matt LaFary
ActivMedia Robotics

On Thu, Mar 21, 2002 at 12:23:50PM -0500, Laurel D. Riek wrote:
> Hi,
>
>          So, I wrote an action to manually drive the robot via the
> keyboard, using getchar. However,
> I noticed 1) there was a lot of lag, 2) my actions were not always
> immediately accepted by the program, and 3) the entire system would often
> lock up
>          Should this be a user task instead of an action? Is there
> something I should use instead of getchar?
>
> Thanks,
> Laurel

2 Re: Keyboard input.

If you set this up right you shouldn't have any problems... check out
the demo that comes with the latest ARIA, it'll control gripper,
camera, everthing (one mode at once though)... 

I'm taking a stab at how you're using things here... if this isn't how
you're using things then just describe how you're using them and we'll
sort it out.  Since you're using a user task I gather you're calling
getKey, which you're right in saying you shouldn't mix with an
ArActionKeyDrive...  The right way to do this is to give some functors
to the ArKeyHandler that is already set up by ArActionKeyDrive, or to
make a key handler and populate it with your own functors before you
addAction your keydrive action.  To add functors make or use an
existing key handler like so:

ArKeyHandler *keyHandler;
if ((keyHandler = Aria::getKeyHandler()) == NULL)
{
    keyHandler = new ArKeyHandler;
    Aria::setKeyHandler(keyHandler);
    if (myRobot != NULL)
      myRobot->attachKeyHandler(keyHandler);
    else
      ArLog::log(ArLog::Terse, "ArMode: No robot to attach a keyHandler to");
}
keyHandler->addKeyHandler('z', someFunctor);

I have just modified the comments about getKey a little, so that if
the docs note its internal and what functions to use... I didn't make
getKeys protected because I can see cases where someone would want to
take care of the keyhandling and such themselves... but I added
comments (documentation) clarifying.

And again, if I described a method you aren't using and you are
already using this method describe in a little more detail what you're
doing and we'll sort out the trouble.

Matt LaFary
ActivMedia Robotics

bitbucket无法注册问题,Are you sure you're not a robot?

当注册bitbucket时出现,Are you sure you’re not a robot?的问题。是因为注册需要翻墙才能显示验证图片跟验证码。可以通过下载CloudLink客户端,新用户注册送1...
  • weixin_37895339
  • weixin_37895339
  • 2017年05月29日 21:24
  • 8263

re

_URL_RE = re.compile(to_unicode(r"""\b((?:([\w-]+):(/{1,3})|www[.])(?:(?:(?:[^\s&()]|&|")*(...
  • u011998809
  • u011998809
  • 2013年10月17日 10:05
  • 337

BitBucket入门踩坑

今天想要用下BitBucket,没想到遇到好多问题,谨记之。 首先,官网注册BitBucket必须翻墙,因为有个google机器人校验,无墙注册一直说我是robot。 注册成功之后,我在官网下载了...
  • litefish
  • litefish
  • 2016年08月11日 22:20
  • 2506

Re

6.2. re — Regular expression operations This module provides regular expression matching operatio...
  • sunyonggao
  • sunyonggao
  • 2014年05月26日 21:52
  • 503

re × + ? 。

× *代表{0,} +代表{1,} ?代表{0,1} × 匹配前面的子表达式零次或多次。要匹配 * 字符,请使用 \*。也就是说后面是什么无所谓 . 匹配除换行符 \n 之外的任何单1字符。要匹配...
  • qq_38250124
  • qq_38250124
  • 2018年02月08日 22:41
  • 14

RE

编写规则表达式模型   请参阅  一个规则表达式模型由简单字...
  • amitabha
  • amitabha
  • 2006年12月15日 11:36
  • 497

[RE]一个RE题

一个RE题
  • PepperYouth
  • PepperYouth
  • 2017年11月12日 19:52
  • 43

Re:Re:一个 I18N 问题

Re:Re:一个 I18N 问题 发贴:robbin? 2003.07.02 ? ? ? ? ? ? ? 说实话,你们的方法都做的复杂了,Java本身就支持多国语言编码,不需要写任...
  • naxin
  • naxin
  • 2004年07月14日 09:58
  • 939

Develop Linux Keyboard Driver

Linux 系统键盘驱动总体思路采用层次型的结构划分成两层,上层是个通用的键盘抽象,完成键盘中不依赖于底层具体硬件的功能;下层是硬件处理层,负责对硬件进行直接操作。按键按下以中断方式处理,使用 tas...
  • tangy110
  • tangy110
  • 2011年04月26日 08:51
  • 2709

简单抓站的N种方式-requests与re

这里requests与urllib是相同的功能,主要是为了得到网页源文件,个人觉得requests比较强大,毕竟是第三方库(仁者见仁吧)。本文主要是记录及分享一下使用正则来匹配网页内容,并且通过测试发...
  • u014697424
  • u014697424
  • 2017年07月02日 08:35
  • 561
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Re: Action to manually drive the robot ** Re: Keyboard input.
举报原因:
原因补充:

(最多只允许输入30个字)