Robotics StackExchange | Archived questions

'python' permission denied while trying to run turtle_tf2_demo.launch

I'm trying to learn tf2 on the tutorial and for some reason when I launch turtletf2demo.launch it gives me the following error. I'm using ROS Noetic and installed the Noetic version of the tutorial.

auto-starting new master
process[master]: started with pid [40204]
ROS_MASTER_URI=http://131.218.169.61:11311
setting /run_id to 2e579b9a-113e-11ee-902d-97854251eb07
process[rosout-1]: started with pid [40237]
started core service [/rosout]
process[sim-2]: started with pid [40244]
process[teleop-3]: started with pid [40245]
process[turtle1_tf2_broadcaster-4]: started with pid [40246]
/usr/bin/env: ‘python’: Permission denied
process[turtle2_tf2_broadcaster-5]: started with pid [40247]
/usr/bin/env: ‘python’: Permission denied

    process[turtle_pointer-6]: started with pid [40248]
    /usr/bin/env: ‘python’: Permission denied
    Reading from keyboard
    ---------------------------
    Use arrow keys to move the turtle. 'q' to quit.
    [turtle1_tf2_broadcaster-4] process has died [pid 40246, exit code 126, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_broadcaster.py __name:=turtle1_tf2_broadcaster __log:=/home/arl/.ros/log/2e579b9a-113e-11ee-902d-97854251eb07/turtle1_tf2_broadcaster-4.log].
    log file: /home/arl/.ros/log/2e579b9a-113e-11ee-902d-97854251eb07/turtle1_tf2_broadcaster-4*.log
    [turtle2_tf2_broadcaster-5] process has died [pid 40247, exit code 126, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_broadcaster.py __name:=turtle2_tf2_broadcaster __log:=/home/arl/.ros/log/2e579b9a-113e-11ee-902d-97854251eb07/turtle2_tf2_broadcaster-5.log].
    log file: /home/arl/.ros/log/2e579b9a-113e-11ee-902d-97854251eb07/turtle2_tf2_broadcaster-5*.log
    [turtle_pointer-6] process has died [pid 40248, exit code 126, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_listener.py __name:=turtle_pointer __log:=/home/arl/.ros/log/2e579b9a-113e-11ee-902d-97854251eb07/turtle_pointer-6.log].
    log file: /home/arl/.ros/log/2e579b9a-113e-11ee-902d-97854251eb07/turtle_pointer-6*.log

I can include the log file if needed. The following other commands in the tf2 tutorial don't give me this error:

rosrun tf2_tools view_frames.py
rosrun tf tf_echo turtle1 turtle2
rosrun rviz rviz -d `rospack find turtle_tf2`/rviz/turtle_rviz.rviz

This leads me to believe that my setup is correct and that the package is setup correctly. I'm also sure I sourced everything correctly and that my python3 works correctly. Any ideas?

Thanks

Asked by mattm8600 on 2023-06-22 16:07:41 UTC

Comments

Have you installed the apt package python-is-python3 ? For noetic, /usr/bin/python must be a symlink to python3.

Asked by Mike Scheutzow on 2023-06-23 07:13:41 UTC

Answers

Hi!

It could be a problem with permissions, as you are trying to access the keyboard. This might require root permissions, and thus not work when you run it as user.

You can try launching the node as root by looking at this question.

Anyway, the traceback you posted is not very explicative about the issue, so including the log file may help.

Asked by bluegiraffe-sc on 2023-06-23 03:33:41 UTC

Comments