nasa-jpl / osr-rover-code

Code that runs on the Open Source Rover
Apache License 2.0
420 stars 145 forks source link

Add joystick permission setting instructions for ROS2 #131

Open Achllle opened 3 years ago

Achllle commented 3 years ago

input group option

add $USER to input

modify dev permissions directly

  1. ls -l /dev/input/*
  2. chmod a+rw /dev/input/event0 or whatever corresponds to the event joystick
  3. make a udev rule like KERNEL=="event[0-9]*", ATTRS{idVendor}=="045e", MODE:="0666", SYMLINK+="xbox"
apollokit commented 3 years ago

Or maybe a better option: just add the user to the input group: sudo adduser ubuntu input (and then log out/in again)

The reason why is we need access to /dev/input/event*, in addition to the js devices. The event are in the input group by default.

(all credit to @Achllle for debugging this with me)