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

rqt tutorial python version

asked 2021-05-16 03:12:33 -0600

Aradra gravatar image

updated 2021-05-16 03:15:28 -0600

ROS Version Noetic

Hello i am trying to develop a custom GUI using PyQt5 and embed RViz into it. Hence i started learning RQT to create a plugin, when i was running the tutorial code i got error. /usr/bin/env: ‘python’: No such file or directory

The code i used to run in PC is attached below.

link text

I placed this code under Catkin_ws/src/

i assumed the error is due to python version, since Noetic supports Python 3 and the tutorial seems to be in Python2. weather my assumption is correct or have i done something wrong. How can i overcome this error should i rewrite in Python3 or any steps missing ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-05-16 07:50:23 -0600

arjo129 gravatar image

updated 2021-05-16 07:52:43 -0600

Have you tried changing the shebang of your script (in the scripts folder) like so?

#!/usr/bin/env python3

Alternatively you could symlink python3 to python on ubuntu 20.04 if thats the system you are using

sudo apt install python-is-python3

edit flag offensive delete link more


When i tried #!/usr/bin/env python3 it showed a print syntax error in line 24 and 25 of python file.

link text

by using bracket in those lines print ('arguments :', args) and print ('unknowns :', unknowns) error vanished.

Aradra gravatar image Aradra  ( 2021-05-16 08:01:44 -0600 )edit

Can i get any suggestion to embed RViz to custom PyQt5 based GUI. I want my GUI to display all Joint states values from robot and Rviz screen which displays the robot movement ?

I tried looking into many resource still i am not clear how should i proceed ? I know to develop standalone GUI using PyQt5 and signals and slot connection. but how should i link them to ROS and Rviz ?

Aradra gravatar image Aradra  ( 2021-05-16 08:12:02 -0600 )edit

Question Tools



Asked: 2021-05-16 03:12:33 -0600

Seen: 255 times

Last updated: May 16 '21