ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

robot does not stops when key is released from keyboard with teleop_twist_keyboard. [closed]

asked 2015-02-09 13:37:15 -0500

Aarif gravatar image

hello, I am navigating a P3AT with teleop_twist_keyboard.py node, it works fine but the problem is that as soon the key is pressed robot starts moving even if i release the key and i have to stop it by pressing the key again.

how can i stop the robot immediately after releasing the key from keyboard??

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Aarif
close date 2015-02-10 03:43:28.487478

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-02-09 14:19:55 -0500

130s gravatar image

It's just how teleop_twist_keyboard.py is currently written; It's convenient since the robot keeps moving in the same direction and/or orientation unless different command is sent.

Depending on how serious your usecase is, you could write a patch to maybe send pull request to teleop_twist_keyboard repository; e.g. a code that adds an option to stop the robot per each command. Shouldn't be any difficult.

edit flag offensive delete link more
1

answered 2015-02-09 20:02:38 -0500

Kei Okada gravatar image

I think teleop_twist_keyboard.py publishes only when the key is pressed, so it seems P3AT controller holding last input and keep moving, usually robot controller check input every seconds and if there are no input, it stops motion (in that case you have to push key continuously)

edit flag offensive delete link more

Comments

I am also facing same issue with my Pioneer p3dx gazebo simulation. If we are sending velocity command " rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[0.2, 0.0, 0.0]' '[0.0, 0.0, 0.10]' " after 3 second the robot should stop moving, But it is moving continuously.please help

manuelmelvin gravatar image manuelmelvin  ( 2018-07-10 15:56:15 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-09 13:37:15 -0500

Seen: 702 times

Last updated: Feb 09 '15