Raspberry Pi 2, ROS and GPIO access
Hi!
I just created two nodes:
- One is on my notebook to send status updates of a LED (the message is of type Bool)
- The other is on my RPi2 and sets the GPIO 17 to high/low according to value in the Bool message received
Both platforms are running ROS Indigo (notebook has Debian Jessie and RPi2 has Raspbian Wheezy). I'm also using only Python (especially on the RPi2 this seems to be the much easier way to do things related to the GPIO).
My problem is the GPIO access requires superuser privileges, which rosrun doesn't seem to like (in fact rosrun obviously is not a known command when using sudo). My question is in what best way am I to handle this situation? Should ROS on such an embedded system actually be installed as root because of all the low level access to the hardware underneath or is it possible to execute rosrun in superuser temporarily just for that the time the specific node that requires such privileges is running?