ros / geometry_tutorials

ROS geometry_tutorials stack migrated from https://kforge.ros.org/geometry/tutorials/branches
31 stars 53 forks source link

error launching turtle_tf in noetic #32

Open chrmel opened 3 years ago

chrmel commented 3 years ago

Hello all!

I am not sure if this is the right place but I was not able to locate the sources for turtle_tf for ros-noeitc. Otherwise I would have forked and created a pull request. Anyway...

The problem: When you follow the instructions on the wiki tf/Tutorials/Introduction to tf (noetic, catkin) the command roslaunch turtle_tf turtle_tf_demo.launch causes the following erros:

[turtle1_tf_broadcaster-4] process has died [pid 612, exit code 127, cmd /opt/ros/noetic/lib/turtle_tf/turtle_tf_broadcaster.py __name:=turtle1_tf_broadcaster __log:=/root/.ros/log/7a16fc58-66c6-11eb-bfcb-0242ac110002/turtle1_tf_broadcaster-4.log].
log file: /root/.ros/log/7a16fc58-66c6-11eb-bfcb-0242ac110002/turtle1_tf_broadcaster-4*.log
[turtle2_tf_broadcaster-5] process has died [pid 613, exit code 127, cmd /opt/ros/noetic/lib/turtle_tf/turtle_tf_broadcaster.py __name:=turtle2_tf_broadcaster __log:=/root/.ros/log/7a16fc58-66c6-11eb-bfcb-0242ac110002/turtle2_tf_broadcaster-5.log].
log file: /root/.ros/log/7a16fc58-66c6-11eb-bfcb-0242ac110002/turtle2_tf_broadcaster-5*.log
[turtle_pointer-6] process has died [pid 615, exit code 127, cmd /opt/ros/noetic/lib/turtle_tf/turtle_tf_listener.py __name:=turtle_pointer __log:=/root/.ros/log/7a16fc58-66c6-11eb-bfcb-0242ac110002/turtle_pointer-6.log].
log file: /root/.ros/log/7a16fc58-66c6-11eb-bfcb-0242ac110002/turtle_pointer-6*.log

The solution: Since ros-noetic is now on Python3 I changed the first line in files turtle_tf/turtle_tf_broadcaster.py and turtle_tf/turtle_tf_listener.py from #!/usr/bin/env python to #!/usr/bin/env python3. The other Python modules also still have the #!/usr/bin/env python line.

Cheers!

AvinashRamashray commented 3 years ago

sudo apt-get install python-is-python3 worked for me.

prakaros commented 2 years ago

I'm also facing similar issue on ros-noetic. When I try to launch turtle_tf2 demo I get /usr/bin/env: 'python' no such file or directory. I even tried changing #!/usr/bin/env python to #!/usr/bin/env python3. Still it didn't work for me. In the end i tried sudo apt-get install python-is-python3 and that worked for me.