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

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

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

slippers1_uis gravatar image

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

Hi,

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

Comments

1

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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

gvdhoorn gravatar image

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

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

Comments

This is helpful. Will try.

slippers1_uis gravatar image slippers1_uis  ( 2018-02-15 10:02:19 -0500 )edit

Question Tools

3 followers

Stats

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

Seen: 560 times

Last updated: Feb 15 '18