You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to teleoperate a robot similar to a joystick: when I release the joystick, the robot would just stop. Instead, when I run this command
the robot continues to move for another 0.5 seconds, somethimes hitting an obstacle or wall. After 0.5 seconds, the robot stops.
I tried to lower the 0.5 value, say to 0.4, but then I get into another issue. When I start the robot from standstill and press the "I" key on the keyboard (meaning requesting to go forward) and check
$rosrun echo /cmd_vel
it shows that the teleop_twist_keyboard node publishes alternatively the desired value (corresponding to pressing the "I" key on the keyboard) but alternating this with publishing zeros for some mysterious reason. As a consequence the robot starts "shaking" as a consequence of the inputs requesting advancing, then stopping, then advancing etc. In other words the behavior I get is that the robot is not moving forward by just accelerating (as desired).
How can I lower that key_timeout value from 0.5 to, say 0.05 or even arbitrarily close to zero?
(My feeling is that the answer has something to do with this info copy-pasted from the readme.md: "It is recommended that you set key_timeout higher than the initial key repeat delay on your system (This delay is 0.5 seconds by default on Ubuntu, but can be adjusted)."
Thank you.
The text was updated successfully, but these errors were encountered:
Yes. The trouble here is that the key_timeout expires before your OS generates a repeated key press.
So, teleop_twist_keyboard gets a keypress, generates a movement command, times out and generates the stop command, all before it gets the repeated key press from the OS to reset the key timer. This causes jerky movement and it's why the recommendation that you've quoted exists:
It is recommended that you set key_timeout higher than the initial key repeat delay on your system
Hi,
I would like to be able to teleoperate a robot similar to a joystick: when I release the joystick, the robot would just stop. Instead, when I run this command
the robot continues to move for another 0.5 seconds, somethimes hitting an obstacle or wall. After 0.5 seconds, the robot stops.
I tried to lower the 0.5 value, say to 0.4, but then I get into another issue. When I start the robot from standstill and press the "I" key on the keyboard (meaning requesting to go forward) and check
it shows that the teleop_twist_keyboard node publishes alternatively the desired value (corresponding to pressing the "I" key on the keyboard) but alternating this with publishing zeros for some mysterious reason. As a consequence the robot starts "shaking" as a consequence of the inputs requesting advancing, then stopping, then advancing etc. In other words the behavior I get is that the robot is not moving forward by just accelerating (as desired).
How can I lower that key_timeout value from 0.5 to, say 0.05 or even arbitrarily close to zero?
(My feeling is that the answer has something to do with this info copy-pasted from the readme.md: "It is recommended that you set key_timeout higher than the initial key repeat delay on your system (This delay is 0.5 seconds by default on Ubuntu, but can be adjusted)."
Thank you.
The text was updated successfully, but these errors were encountered: