GT-RAIL / keyboardteleopjs

Keyboard Teleoperation via Twist Messages
http://robotwebtools.org/
Other
20 stars 16 forks source link

Publishes cmd_vel message twice #10

Closed baalexander closed 11 years ago

baalexander commented 11 years ago

I'm debugging an unrelated issue and seeing that keyboardteleop is publishing twice every time I press the arrow key.

Looking through the code, there's a handler for keyup and keydown. Is that intended?

rctoris commented 11 years ago

Hmmm, never noticed this (the twist message being published twice). The keyup and keydown is intentional as it is used to catch when the user releases in order to publish a '0' speed (a.k.a. stop) to the robot. Some robots will keep moving if this does not happen.

rctoris commented 11 years ago

Also, are you actually pressing the arrow keys? It should be w, a, s, d, q, e keys.

baalexander commented 11 years ago

I was using the arrow key. I didn't realize it was just sending a 0 speed call, makes sense.