Ask Your Question
1

How to republish latest joystick input

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

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

Comments

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

BIRLxu gravatar imageBIRLxu ( 2014-11-22 02:51:15 -0600 )edit

Did you try the autorepeat?

tonybaltovski gravatar imagetonybaltovski ( 2014-11-22 09:47:56 -0600 )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 imageBIRLxu ( 2014-11-22 19:31:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

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

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

Comments

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 imagematteopantano ( 2017-09-04 11:16:21 -0600 )edit

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

serhatzengin gravatar imageserhatzengin ( 2019-10-22 08:12:55 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 506 times

Last updated: Jun 14 '14