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

Pycharm 'No module named rospy'

asked 2022-09-18 02:56:50 -0600

amit_z gravatar image

Pycharm IDE doesn't seem to recognize ROS modules (It underlines them and doesn't autocomplete), even though when I run the script, the interpreter does recognize them. I should add that I am opening pycharm from a linux terminal, after I have sourced the ROS environment (/opt/ros/noetic/setup.bash) and the local catkin worksapce. How can I solve the problem?

image description

edit retag flag offensive close merge delete

Comments

ravijoshi gravatar image ravijoshi  ( 2022-09-18 08:56:25 -0600 )edit

Thanks! it was helpful indeed

amit_z gravatar image amit_z  ( 2022-09-20 05:39:13 -0600 )edit

glad you made it work.

ravijoshi gravatar image ravijoshi  ( 2022-09-20 06:06:14 -0600 )edit

Please add a text solution as an answer, videos and websites may be taken down later, future readers then will not benefit from your help now

ljaniec gravatar image ljaniec  ( 2022-09-20 17:09:26 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2022-09-21 03:40:17 -0600

GeorgNo gravatar image

It will also work to start pycharm from a terminal where ROS is already sourced

edit flag offensive delete link more
1

answered 2022-09-21 02:35:21 -0600

amit_z gravatar image

The solution was presented here by ravijoshi: https://youtu.be/lTew9mbXrAs

(adding the ros python3/dist-packages library as a content root in the Project Structure)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-09-18 02:56:50 -0600

Seen: 3,676 times

Last updated: Sep 21 '22