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

Hello there,

You have to add 2 python paths into your settings.json file into VS Code.

These are the paths: The first path is for all packages of your local workspace and the second is for the global package.

{
    "python.autoComplete.extraPaths": [
        "/home/<pc-name>/<ws-name>/devel/lib/python3/dist-packages",
        "/opt/ros/noetic/lib/python3/dist-packages"
    ]
}

Hello there,

You have to add 2 python paths into your settings.json file into VS Code.

These are the paths: The first path is for all packages of your local workspace and the second is for the global package.

{
    "python.autoComplete.extraPaths": [
        "/home/<pc-name>/<ws-name>/devel/lib/python3/dist-packages",
        "/opt/ros/noetic/lib/python3/dist-packages"
    ]
}

If you are using CPP then you have to add the path in the c_cpp_properties.json file.

The location of setting and c_cpp_properties JSON files will be :

 /home/<user-name>/<ws-name>/src/<package-name>/.vscode/

Try this you will be able to solve your problem and if you have any issues feel free to drop a comment.

Hello there,

You have to add 2 python paths into your settings.json file into VS Code.

These are the paths: The first path is for all packages of your local workspace and the second is for the global package.

{
    "python.autoComplete.extraPaths": [
        "/home/<pc-name>/<ws-name>/devel/lib/python3/dist-packages",
        "/opt/ros/noetic/lib/python3/dist-packages"
    ]
}

If you are using CPP then you have to add the path in the c_cpp_properties.json file.

The location of setting and c_cpp_properties JSON files will be :

 /home/<user-name>/<ws-name>/src/<package-name>/.vscode/

Just to note for Pycharm Users: if you are using Pycharm then give this both paths by following these steps: 1. Go to settings. 2. Project: src > Project Structure > On the right-hand side click on + Add Content Root and locate both paths.

Try this you will be able to solve your problem and if you have any issues feel free to drop a comment.

Hello there,

You have to add 2 python paths into your settings.json file into VS Code.

These are the paths: The first path is for all packages of your local workspace and the second is for the global package.

{
    "python.autoComplete.extraPaths": [
        "/home/<pc-name>/<ws-name>/devel/lib/python3/dist-packages",
        "/opt/ros/noetic/lib/python3/dist-packages"
    ]
}

If you are using CPP then you have to add the path in the c_cpp_properties.json file.

The location of setting and c_cpp_properties JSON files will be :

 /home/<user-name>/<ws-name>/src/<package-name>/.vscode/

Just to note for Pycharm Users: Users: if you are using Pycharm then give this both paths by following these steps: 1.

  1. Go to settings. 2. settings.
  2. Project: src > Project Structure > On the right-hand side click on + Add Content Root and locate both paths.

Try this you will be able to solve your problem and if you have any issues feel free to drop a comment.

Hello there,

You have to add 2 python paths into your settings.json file into VS Code.

These are the paths: The first path is for all packages of your local workspace and the second is for the global package.

{
    "python.autoComplete.extraPaths": [
        "/home/<pc-name>/<ws-name>/devel/lib/python3/dist-packages",
        "/opt/ros/noetic/lib/python3/dist-packages"
    ]
}

If you are using CPP then you have to add the path in the c_cpp_properties.json file.

The location of setting and c_cpp_properties JSON files will be :

 /home/<user-name>/<ws-name>/src/<package-name>/.vscode/
"~/<work-space>/devel/include"

Just to note for Pycharm Users: if you are using Pycharm then give this both paths by following these steps:

  1. Go to settings.
  2. Project: src > Project Structure > On the right-hand side click on + Add Content Root and locate both paths.

Try this you will be able to solve your problem and if you have any issues feel free to drop a comment.