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

How to republish latest joystick input

asked 2014-06-12 10:19:16 -0500

Vince Cross gravatar image

Currently the joy node sends a joystick value on update only. For example if I push the joystick all the way forward I get a single max value of 1. This value is published only once. A new value is only sent when the joystick moves. What I would prefer is for the last joy value to keep being published, thus if I push the joystick to its max limit the value of 1 will continue to be published. Is there something I can add to my joy launch file that will repeat the last received joy message?

edit retag flag offensive close merge delete


Hi,I have the same problem,did you find an answer?

BIRLxu gravatar image BIRLxu  ( 2014-11-22 02:51:15 -0500 )edit

Did you try the autorepeat?

tonybaltovski gravatar image tonybaltovski  ( 2014-11-22 09:47:56 -0500 )edit

Actually,I am a ROS beginner and I just don't know how to do that.Could you give me some further information?Thanks.

BIRLxu gravatar image BIRLxu  ( 2014-11-22 19:31:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-14 16:02:04 -0500

You can add

~autorepeat_rate = x

where x is the rate in Hz that the messages will be sent. This will constantly publish 0 is there is no value.

edit flag offensive delete link more


For those like me that are struggling, this is a parameter of pkg joy, add it as written here: joy wiki. Thanks Tony!

matteopantano gravatar image matteopantano  ( 2017-09-04 11:16:21 -0500 )edit

How can I add to my program? Where can I add in my program? How can I control ~autorepeat_rate = x ??

serhatzengin gravatar image serhatzengin  ( 2019-10-22 08:12:55 -0500 )edit

It is in the parameters of your joy node

matteopantano gravatar image matteopantano  ( 2021-07-13 13:35:16 -0500 )edit

Question Tools


Asked: 2014-06-12 10:19:16 -0500

Seen: 1,277 times

Last updated: Jun 14 '14