You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to deploy a distrobox container in Raspberry Pi 4 with Raspberry Pi OS using a distrobox container with the following command: distrobox-create --root --image docker.io/library/ros:humble-ros-base-jammy --name humbleV1 --home ~/containers/humbleV1. Inside the container I make sure to install (or update) lgpio and gpiozero. I've set up a python script,teste.py, to test it which consists of simple 3 lines from gpiozero import LED \n led = LED(17) \n led.toggle(). When I run this script with sudo teste.py it works but when I don't use sudo it doesn't work, and I can't use sudo because I need to run this script via ROS2. Any ideias? I tried some flags of distrobox (unshare-process,unshare-netns,unshare-devsys) and messing with group access but it didn't work. The error is in the image bellow ( it sometimes runs another one that cant find pin factory but it changes to this after setting pin factory with the command export GPIOZERO_PIN_FACTORY=lgpio)
The text was updated successfully, but these errors were encountered:
the user inside the container does not have the same groups as outside
so you should add yourself to the same groups also inside, in this case, to access the GPIO
the user inside the container does not have the same groups as outside so you should add yourself to the same groups also inside, in this case, to access the GPIO
I already tried that, inside the container we have ubuntu which uses dialout group to acess gpio pins but adding the user to this group is not solving the problem as you can see below:
I'm trying to deploy a distrobox container in Raspberry Pi 4 with Raspberry Pi OS using a distrobox container with the following command:
distrobox-create --root --image docker.io/library/ros:humble-ros-base-jammy --name humbleV1 --home ~/containers/humbleV1
. Inside the container I make sure to install (or update) lgpio and gpiozero. I've set up a python script,teste.py, to test it which consists of simple 3 linesfrom gpiozero import LED \n led = LED(17) \n led.toggle()
. When I run this script withsudo teste.py
it works but when I don't use sudo it doesn't work, and I can't use sudo because I need to run this script via ROS2. Any ideias? I tried some flags of distrobox (unshare-process,unshare-netns,unshare-devsys) and messing with group access but it didn't work. The error is in the image bellow ( it sometimes runs another one that cant find pin factory but it changes to this after setting pin factory with the commandexport GPIOZERO_PIN_FACTORY=lgpio
)The text was updated successfully, but these errors were encountered: