新版ros在.vscode目录下的setting.json文件更改
由
{
"python.autoComplete.extraPaths": [
"/opt/ros/noetic/lib/python3/dist-packages",
"/home/username/workspace/devel/lib/python3/dist-packages"
]
}
改为
{
"python.autoComplete.extraPaths": [
"/opt/ros/noetic/lib/python3/dist-packages",
"/home/username/workspace/devel/lib/python3/dist-packages"
],
"python.analysis.extraPaths": [
"/opt/ros/noetic/lib/python3/dist-packages",
"/home/username/workspace/devel/lib/python3/dist-packages"
]
}
可解决问题