ShunjiHashimoto / tang

収穫サポートロボットTANG
2 stars 1 forks source link

xavier起動後、GPIOエラーが発生する #235

Closed ShunjiHashimoto closed 1 year ago

ShunjiHashimoto commented 1 year ago
"/home/hashimoto/catkin_ws/src/tang/tang_detection/scripts/human_follow.py", line 27, in __init__
    GPIO.setup(GearConfig.right_gear_pin, GPIO.IN)
  File "/usr/local/lib/python3.6/dist-packages/Jetson.GPIO-2.0.20-py3.6.egg/Jetson/GPIO/gpio.py", line 403, in setup
  File "/usr/local/lib/python3.6/dist-packages/Jetson.GPIO-2.0.20-py3.6.egg/Jetson/GPIO/gpio.py", line 196, in _setup_single_in
  File "/usr/local/lib/python3.6/dist-packages/Jetson.GPIO-2.0.20-py3.6.egg/Jetson/GPIO/gpio.py", line 164, in _export_gpio
PermissionError: [Errno 13] Permission denied: '/sys/class/gpio/gpio344/value'
[tang_detection-4] process has died [pid 10105, exit code 1, cmd /home/hashimoto/catkin_ws/src/tang/tang_detection/scripts/human_follow.py __name:=tang_detection __log:=/home/hashimoto/.ros/log/89128d7a-e1a9-11ed-9128-984827d817a0/tang_detection-4.log].
log file: /home/hashimoto/.ros/log/89128d7a-e1a9-11ed-9128-984827d817a0/tang_detection-4*.log
ShunjiHashimoto commented 1 year ago

使用しているピンはこちら

right_gear_pin = 24  # ボード番号18、gpio344
left_gear_pin  = 23 # ボード番号16、gpio256
ShunjiHashimoto commented 1 year ago

sudoを使ってlaunchを立ち上げることで解決