0
$\begingroup$

Rosanswers logo

i am trying to go throught this tutorial

http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20broadcaster%20%28Python%29

but when i use

$ roslaunch learning_tf start_demo.launch

i am getting this error

[turtle1_tf_broadcaster-4] process has died [pid 12905, exit code 127, cmd /home/ros/catkin_ws/src/learning_tf/nodes/turtle_tf_broadcaster.py __name:=turtle1_tf_broadcaster __log:=/home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/turtle1_tf_broadcaster-4.log]. log file: /home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/turtle1_tf_broadcaster-4*.log

this is the complete thing

... logging to /home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/roslaunch-ros-12878.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.

started roslaunch server http://ros:38657/

SUMMARY

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.8
 * /turtle1_tf_broadcaster/turtle: turtle1
 * /turtle2_tf_broadcaster/turtle: turtle2

NODES
  /
    listener (learning_tf/turtle_tf_listener.py)
    sim (turtlesim/turtlesim_node)
    teleop (turtlesim/turtle_teleop_key)
    turtle1_tf_broadcaster (learning_tf/turtle_tf_broadcaster.py)
    turtle2_tf_broadcaster (learning_tf/turtle_tf_broadcaster.py)

auto-starting new master
process[master]: started with pid [12886]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 81a985dc-2506-11eb-987b-d17fa1d300a7
process[rosout-1]: started with pid [12896]
started core service [/rosout]
process[sim-2]: started with pid [12899]
process[teleop-3]: started with pid [12900]
process[turtle1_tf_broadcaster-4]: started with pid [12905]
/usr/bin/env: ‘python’: No such file or directory
process[turtle2_tf_broadcaster-5]: started with pid [12906]
/usr/bin/env: ‘python’: No such file or directory
process[listener-6]: started with pid [12912]
/usr/bin/env: ‘python’: No such file or directory
Reading from keyboard
---------------------------
Use arrow keys to move the turtle. 'q' to quit.
[turtle1_tf_broadcaster-4] process has died [pid 12905, exit code 127, cmd /home/ros/catkin_ws/src/learning_tf/nodes/turtle_tf_broadcaster.py __name:=turtle1_tf_broadcaster __log:=/home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/turtle1_tf_broadcaster-4.log].
log file: /home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/turtle1_tf_broadcaster-4*.log
[turtle2_tf_broadcaster-5] process has died [pid 12906, exit code 127, cmd /home/ros/catkin_ws/src/learning_tf/nodes/turtle_tf_broadcaster.py __name:=turtle2_tf_broadcaster __log:=/home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/turtle2_tf_broadcaster-5.log].
log file: /home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/turtle2_tf_broadcaster-5*.log
[listener-6] process has died [pid 12912, exit code 127, cmd /home/ros/catkin_ws/src/learning_tf/nodes/turtle_tf_listener.py __name:=listener __log:=/home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/listener-6.log].
log file: /home/ros/.ros/log/81a985dc-2506-11eb-987b-d17fa1d300a7/listener-6*.lo

thanks


Originally posted by harish556 on ROS Answers with karma: 74 on 2020-11-12

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

From:

/usr/bin/env: ‘python’: No such file or directory
process[turtle2_tf_broadcaster-5]: started with pid [12906]
/usr/bin/env: ‘python’: No such file or directory
process[listener-6]: started with pid [12912]
/usr/bin/env: ‘python’: No such file or directory

It seems you dont have python installed or in your $PATH. Those nodes are implemented in Python, so you will need to install Python before you can launch the nodes.

If you do have python installed, you can check which python. You might need to add it to your $PATH.

EDIT: I see you are running Noetic. It is possible the shebang hasn't been changed to point to Python3. You should replace the first line of the node files with #!/usr/bin/env python3.


Originally posted by navdlee with karma: 61 on 2020-11-12

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by harish556 on 2020-11-13:
thank you very much

Comment by Fenix0817 on 2021-06-11:
Hi, thank you so much for your help. the line (#!/usr/bin/env python3) resolved the problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.