Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There's no "k" key binding present in code #28

Open
sskorol opened this issue Dec 10, 2021 · 3 comments
Open

There's no "k" key binding present in code #28

sskorol opened this issue Dec 10, 2021 · 3 comments

Comments

@sskorol
Copy link

sskorol commented Dec 10, 2021

Hi,

In README and CLI instructions you mention "k" / "K" key that might be used for movements. But I don't see such binding in the code: https://github.com/ros-teleop/teleop_twist_keyboard/blob/master/teleop_twist_keyboard.py#L40-L59

As a result, it leads to confusion: you press the corresponding keys, but there's no feedback at all.

@trainman419
Copy link
Contributor

k is the stop key; on a qwerty keyboard it's in the center of the uio, jkl, m,. grouping. Similar to arrow keys, the surrounding keys indicate movement and the center key indicates "stop"

Since all non-movement keys send the stop message, there isn't an explicit key binding for it, which is why you don't see it in the code.

What were you expecting the k key to do?

@sskorol
Copy link
Author

sskorol commented Dec 13, 2021

@trainman419 thanks for the clarification! But if we treat any key (which is not listed) as a "stop" operation, why do we even need to explicitly highlight "k" in the CLI instructions and README? It leads to confusion. I would rather assign a "move back" operation to "k", as it'd be much easier (and obvious) to control a robot the way how we do with common arrow keys in games.

@trainman419
Copy link
Contributor

The code for stop is right here: https://github.com/ros-teleop/teleop_twist_keyboard/blob/master/teleop_twist_keyboard.py#L210-L215

We assign "move back-left" to m, "move back" to ,, and "move back-right" to ., as an extension of the way that arrow keys are mapped on a numpad.

teleop_twist_keyboard supports robots that don't have a command timeout (they don't stop until you push the stop key), which makes it convenient to have a stop key in the center of the movement cluster, too.

Anyway; I can try to explain this to you all day, but in the end, teleop_twist_keyboard has been like this for almost a decade and I'm not even the original author; just the maintainer. My goal for this package is to continue maintaining it as a simple teleop option for ROS 1 robots that implement the /cmd_vel topic.

If you have a specific, actionable, and backwards-compatible change that I can make, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants