How to setup Intelisense on VS Code for ROS C++
#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": [
"/home/ben/workspaces/ROS/cir-kit/devel/include",
"/opt/ros/kinetic/include",
"/home/ben/workspaces/ROS/ackermann/src/twist_to_ackermann-1/include",
"/usr/include"
]
},
"includePath": [
"/home/ben/workspaces/ROS/cir-kit/devel/include",
"/opt/ros/kinetic/include",
"/home/ben/workspaces/ROS/ackermann/src/twist_to_ackermann-1/include",
"/usr/include",
"/usr/include/c++/5",
"/usr/include/x86_64-linux-gnu/c++/5",
"/usr/include/linux",
"/opt/ros/kinetic/include/ros",
"/usr/include/x86_64-linux-gnu"
],
"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.
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.
Have you solved this problem ?
There are suggested answers to this problem under another question.