Ask Your Question

Forward /dev/input/js0 from control station to robot

asked 2018-02-15 07:05:37 -0600

slippers1_uis gravatar image

updated 2018-02-15 10:01:53 -0600


I am forwarding joystick events from a control station to an on-board computer running ROS. Is there a way for me to write the events to a file similar to the /dev/input/js0 file so that ROS Joy can utilize it? If so, what format must I make the contents of the file?

edit retag flag offensive close merge delete



May I suggest a title change? Your current question title suggests a completely off-topic question, but the body text actually asks about how to either make joy_node open a 'remote' joystick, or how to provide joy_node with data coming from a remote location.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-15 09:52:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-15 09:40:17 -0600

gvdhoorn gravatar image

updated 2018-02-15 09:42:14 -0600

Is there a way for me to write the events to a file similar to the /dev/input/js0 file so that ROS Joy can utilize it?

yes: keep the binary format that you read from /dev/input/js0 and use something like uinput to inject it into the kernel of your control station. Alernatively use socat (or a similar tool) to pipe /dev/input/js0 (on your control station) to a socket on your on-board PC (similar to this). Then have joy open that socket instead of an actual device.

Other than that I would say you have two options:

  1. publish Joy msgs on your control station and subscribe those on your on-board pc
  2. use a custom node running on your on-board pc, that, through a custom protocol, gets joystick event data and then publishes it as Joy msgs there
edit flag offensive delete link more


This is helpful. Will try.

slippers1_uis gravatar image slippers1_uis  ( 2018-02-15 10:02:19 -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



Asked: 2018-02-15 07:05:37 -0600

Seen: 272 times

Last updated: Feb 15 '18