ROS melodic import error "No name hello in module XXXXX" in VScode
Hi there!
I was trying to create a proper structure for my ROS project in python, following this guide: http://wiki.ros.org/rospy_tutorials/T...
I successfully got to the end of the tutorial and ran my "hello" script correctly, that printed the message "Hello my friend!"
My question is about VScode. In fact, opening the working "hello" script, located in my_package/bin
, gives me this import error in VScode and i can not figure out why...
No name 'hello' in module 'XXXX' pylint(no-name-in-module)
Unable to import 'XXXXX.hello' pylint(import-error)
I have installed the ROS extension as this page said http://wiki.ros.org/IDEs, but nothing changed...
This is not a problem right now, because the script, ran by terminal, works fine, but in a future where my code will be more complex, this VScode issue could be very annoying.
I am not posting my code because it's the same of the link above.
I am new to ROS and i cannot understand why i got this problem, can someone help me?
Thanks a lot
First stop for all IDE related questions would be wiki/IDEs, specifically, the VSCode section.
Not claiming this will solve all your problems, but please take a look there first.
not quite sure if this solves the problem. however, I've found the VScode plugin does not automatically always pick up the right paths.
What I've found to work quite well is: