Unable to launch a python node using rosrun in ROS-Noetic (Ubuntu20)
COMMAND:
rosrun my_robot_tutorial robot_news_radio_transmitter.py //python publisher node
rosrun my_robot_tutorial smartphone.py //python subscriber node
ERROR:
/opt/ros/noetic/bin/rosrun: /home/rishav/catkin_ws/src/my_robot_tutorials/scripts/smartphone.py: **usr/bin/env: bad interpreter: No such file or directory**
/opt/ros/noetic/bin/rosrun: line 150: /home/rishav/catkin_ws/src/my_robot_tutorials/scripts/smartphone.py: Success
FILE CONTENT OF smartphone.py:
#!usr/bin/env python3
import rospy
from std_msgs.msg import String
def callback_receive_radio_data(msg):
rospy.loginfo("Message received : ")
rospy.loginfo(msg)
if __name__ == '__main__':
rospy.init_node('smartphone')
sub = rospy.Subscriber("/robot_news_radio", String, callback_receive_radio_data)
rospy.spin()
ISSUE:
This error occurred when I tried to launch the python subscriber node. please give me a solution
Could you please refrain from using CAPITALS everywhere?
I've already removed quite a few (changed them to regular title case), please keep it in mind for next time.
yeah sure, I will keep that noted the next time.