Ask Your Question

How to setup Intelisense on VS Code for ROS C++

asked 2018-02-09 19:43:02 -0600

horseatinweeds gravatar image

updated 2018-02-09 20:26:19 -0600

jayess gravatar image

#include "ros/ros.h" is even underlined in green. I have this added to the c_cpp_properties.json file. I also installed the ROS extension (which I'm not sure does anything).

    "configurations": [
            "browse": {
                "databaseFilename": "",
                "limitSymbolsToIncludedHeaders": true,
                "path": [
            "includePath": [
            "name": "Linux",
            "intelliSenseMode": "clang-x64"
    "version": 3

When I hover over top of the include, it gives me an error:

#include errors detected. Please update your includePath. IntelliSense features for this translation unit (/home/ben/workspaces/ROS/ackermann/src/twist_to_ackermann-1/src/twist_to_ackermann.cpp) will be provided by the Tag Parser.
cannot open source file "x86intrin.h" (dependency of "ros/ros.h")

Everything else ROS works... This in Ubuntu 16.04 and ROS Kinetic.

edit retag flag offensive close merge delete


I meet the same problem. I find "x86intrin.h" in /usr/lib/gcc/x86_64-linux-gnu/5/include. Add this path to c_cpp_properties.json and #include "ros/ros.h" is OK.

Amos gravatar imageAmos ( 2018-03-29 00:21:49 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-10 03:01:34 -0600

gvdhoorn gravatar image

It's probably doable to set this up manually, but I would recommend to take a look at wiki/IDEs - Visual Studio Code (VSCode). It has a link to an extension that should take care of all of this for you.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-02-09 19:43:02 -0600

Seen: 3,568 times

Last updated: Feb 10 '18