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

Revision history [back]

click to hide/show revision 1
initial version

In general this is not an issue. Because your vscode workspace does not know from where the std_msgs or any ros includes are coming from. But still you will be able to run your code without any error.

To get rid of the warning underline, you can add following thing to your .vscode/settings.json

"python.autoComplete.extraPaths": [ "/opt/ros/noetic/lib/python3/dist-packages/ ], "

For an example of a good vscode configuration you can visit here. The only thing is it is for ros2.

In general this is not an issue. Because your vscode workspace does not know from where the std_msgs or any ros includes are coming from. But still you will be able to run your code without any error.

To get rid of the warning underline, you can add following thing to your .vscode/settings.json

"python.autoComplete.extraPaths": [ "/opt/ros/noetic/lib/python3/dist-packages/ ], "

For an example of a good vscode configuration you can visit here. The only thing is it is for ros2.