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
Recently I've attempted to use robot_upstart to run a ros launch file that called a service that uses the LGPIO library (https://pypi.org/project/rpi-lgpio/) to interact with the GPIO pins on the PI. The lgpio library creates some sort of hardlink or softlink to call the gpio access with non-root privileges, it does this wherever the launch file is executed.
When run as a service, the launch file is triggered in a folder unwritable to the user and thus can't create the link and therefore can't call the GPIO pins.
Guidance on the internets is to run the service as root, which is clearly a bad idea.
After running the upstart in python, I can make the code work by editing the service file:
# THIS IS A GENERATED FILE, NOT RECOMMENDED TO EDIT.
[Unit]
Description="bringup gpio_flasher"
After=network.target
[Service]
Type=simple
ExecStart=/usr/sbin/gpio_flasher-start
WorkingDirectory=/home/ubuntu/ros2_ws
[Install]
WantedBy=multi-user.target
It would be great if this was part of the python code so this hacky fix could survive re-runs.
The text was updated successfully, but these errors were encountered:
Greetings, I love this plugin and use it often!
Recently I've attempted to use robot_upstart to run a ros launch file that called a service that uses the LGPIO library (https://pypi.org/project/rpi-lgpio/) to interact with the GPIO pins on the PI. The lgpio library creates some sort of hardlink or softlink to call the gpio access with non-root privileges, it does this wherever the launch file is executed.
When run as a service, the launch file is triggered in a folder unwritable to the user and thus can't create the link and therefore can't call the GPIO pins.
Guidance on the internets is to run the service as root, which is clearly a bad idea.
After running the upstart in python, I can make the code work by editing the service file:
It would be great if this was part of the python code so this hacky fix could survive re-runs.
The text was updated successfully, but these errors were encountered: