pythonrosgpioodroidwiringpi

Odroid GPIO pins in ROS without sudo access


Odroid running Ubuntu Mate 16.04 and ROS Kinetic. I have wiringPi2 installed for accessing the GPIO pins. I am able to use the GPIO pins through a Python script, but they require sudo access. I have a ROS node (written in Python) in which I want to access the GPIO pin data and publish to a topic. But, I am not able to do so, because wiringPi2 required sudo access, and ROS is not defined in root.

I have tried using wiringPiSetupSys() function which does not require sudo access, but that does not work i.e. I am not able to get the GPIO pin data without sudo access.

All the solutions to similar problems for Raspberry Pi platform don't seem to work for Odroid.

Thanks


Solution

  • Unfortunately, I could not find a fix to the problem with the exact specifications mentioned. However, when I tested the same code on a Raspberry Pi 3 with Raspbian, it works correctly.

    So, I have concluded that the issue lies in the OS used i.e. Ubuntu Mate 16.04.

    So, a solution might be to use Raspbian on Odroid itself. I am yet to test whether that works out.

    Update : Raspbian doesn't exist as such for Odroid, so some other work around might be required.