Problems with "Introduction to tf2" Tutorial
I'm trying to run through the Introduction to tf2 tutorial provided here. I've installed all of the dependencies successfully, or at least without error; however, when I run the launch command I see this:
roslaunch -v turtle_tf2 turtle_tf2_demo.launch ... logging to /home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/roslaunch-20079-4907.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. ... loading XML file [/opt/ros/noetic/etc/ros/roscore.xml] ... executing command param [rosversion roslaunch] Added parameter [/rosversion] ... executing command param [rosversion -d] Added parameter [/rosdistro] Added core node of type [rosout/rosout] in namespace [/] ... loading XML file [/opt/ros/noetic/share/turtle_tf2/launch/turtle_tf2_demo.launch] Added node of type [turtlesim/turtlesim_node] in namespace [/] Added node of type [turtlesim/turtle_teleop_key] in namespace [/] Added parameter [/scale_linear] Added parameter [/scale_angular] Added parameter [/turtle1_tf2_broadcaster/turtle] Added node of type [turtle_tf2/turtle_tf2_broadcaster.py] in namespace [/] Added parameter [/turtle2_tf2_broadcaster/turtle] Added node of type [turtle_tf2/turtle_tf2_broadcaster.py] in namespace [/] Added node of type [turtle_tf2/turtle_tf2_listener.py] in namespace [/] started roslaunch server http://localhost:39285/ SUMMARY ======== PARAMETERS * /rosdistro: noetic * /rosversion: 1.15.14 * /scale_angular: 2.0 * /scale_linear: 2.0 * /turtle1_tf2_broadcaster/turtle: turtle1 * /turtle2_tf2_broadcaster/turtle: turtle2 NODES / sim (turtlesim/turtlesim_node) teleop (turtlesim/turtle_teleop_key) turtle1_tf2_broadcaster (turtle_tf2/turtle_tf2_broadcaster.py) turtle2_tf2_broadcaster (turtle_tf2/turtle_tf2_broadcaster.py) turtle_pointer (turtle_tf2/turtle_tf2_listener.py) auto-starting new master process[master]: started with pid [4918] ROS_MASTER_URI=http://localhost:11311 setting /run_id to ec83aa5a-fc77-11ec-be1e-d963878005dd process[rosout-1]: started with pid [4931] started core service [/rosout] process[sim-2]: started with pid [4938] process[teleop-3]: started with pid [4939] process[turtle1_tf2_broadcaster-4]: started with pid [4940] /usr/bin/env: ‘python’: Permission denied process[turtle2_tf2_broadcaster-5]: started with pid [4942] /usr/bin/env: ‘python’: Permission denied [turtle1_tf2_broadcaster-4] process has died [pid 4940, exit code 126, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_broadcaster.py __name:=turtle1_tf2_broadcaster __log:=/home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/turtle1_tf2_broadcaster-4.log]. log file: /home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/turtle1_tf2_broadcaster-4*.log [turtle2_tf2_broadcaster-5] process has died [pid 4942, exit code 126, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_broadcaster.py __name:=turtle2_tf2_broadcaster __log:=/home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/turtle2_tf2_broadcaster-5.log]. log file: /home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/turtle2_tf2_broadcaster-5*.log process[turtle_pointer-6]: started with pid [4947] /usr/bin/env: ‘python’: Permission denied Reading from keyboard --------------------------- Use arrow keys to move the turtle. 'q' to quit. [turtle_pointer-6] process has died [pid 4947, exit code 126, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_listener.py __name:=turtle_pointer __log:=/home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/turtle_pointer-6.log]. log file: /home/chainley/.ros/log/ec83aa5a-fc77-11ec-be1e-d963878005dd/turtle_pointer-6*.log
At first I thought it might be an error of permissions, so I navigated to the offending scripts and entered:
$: sudo chmod u+x turtle_tf2_broadcaster.py $: sudo chmod u+x turtle_tf2_listener.py
That didn't fix it, so I also tried:
$: sudo rosdep fix-permissions
That didn't work either. On further investigation, my system doesn't have the folder listed in the error; /usr/bin/env doesn't actually exist. Not sure what to do about that.
Any suggestions?
Asked by chainley on 2022-07-05 10:39:40 UTC
Answers
Turned out it was an issue with python on my machine. I ended up running
$: sudo apt install python-is-python3And then cleaned up my aliases as well:
$: alias python=python3Now the tutorial demo is working!
Asked by chainley on 2022-07-11 11:05:41 UTC
Comments
Turned out it was an issue with python on my machine. I ended up running
And then cleaned up my aliases as well:
Now the tutorial demo is working!
Asked by chainley on 2022-07-05 11:19:29 UTC
@chainley -- Can you copy this comment into an answer, then accept the answer? That will prevent your question from showing up when somebody tries to filter for all unanswered questions.
Asked by lindzey on 2022-07-06 21:52:57 UTC
I added it as an answer, but I can’t accept it because I don’t have enough points?
Asked by chainley on 2022-07-11 11:06:18 UTC