ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Introduction to tf2 on NOETIC

asked 2021-11-15 05:23:40 -0500

Ktysai gravatar image

Hi there!

i was trying to learn more about TF2, but running the

roslaunch turtle_tf2 turtle_tf2_demo.launch

it is obtained

Use arrow keys to move the turtle. 'q' to quit.
process[turtle_pointer-6]: started with pid [2221]
/usr/bin/env: ‘python’: No such file or directory
[turtle1_tf2_broadcaster-4] process has died [pid 2210, exit code 127, cmd /opt/ros/noetic/lib/turtle_tf2/turtle_tf2_broadcaster.py __name:=turtle1_tf2_broadcaster __log:=/home/vivio/.ros/log/2f5f5452-4605-11ec-acdb-556470342d91/turtle1_tf2_broadcaster-4.log].

I guess the the line regarding python is important "/usr/bin/env: ‘python’:" In Ubuntu 20.04 Python3 is default. I have to find the file of turtlesim and add "/usr/bin/env: python3"?

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2021-11-15 06:17:29 -0500

Ktysai gravatar image

updated 2021-11-15 06:18:05 -0500

I've found several solutions:

  1. Create a symlink between python & python3

  2. use sudo apt-get install python-is-python3, but I'm not sure if it creates just a symlink

  3. The solution I have adopted after testing all 3:

Go to /opt/ros/noetic/lib/turtle_tf2 and modify the first line in f all the python files there #!/usr/bin/env python to #!/usr/bin/env python3. Credits go to https://github.com/ros/geometry_tutor...

edit flag offensive delete link more

Comments

Pls accept your answer by clicking on the check mark

osilva gravatar image osilva  ( 2021-11-15 09:43:53 -0500 )edit

I think (2) is a better choice than (3). There could be a lot more ros files with the same assumption.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-11-19 19:25:38 -0500 )edit

Question Tools

Stats

Asked: 2021-11-15 05:23:40 -0500

Seen: 355 times

Last updated: Nov 15 '21