Ask Your Question
0

rqt tutorial python version

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

Aradra gravatar image

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

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
0

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

arjo129 gravatar image

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

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

Comments

When i tried #!/usr/bin/env python3 it showed a print syntax error in line 24 and 25 of my_module.py 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 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 40 times

Last updated: May 16