하루의 쉼터

[VisualCode] #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit 본문

프로그래밍/ROS

[VisualCode] #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit

Changun An 2023. 4. 6. 14:06
반응형

Ros1,2를 개발하는 경우 VisualCode를 이용하여 ssh접속으로 개발하는 경우가 발생한다.

이때 아래와 같은 오류가 뜨는데

오류 내용은 아래와 같다.

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit
cannot open source file "rclcpp/rclcpp.hpp"C/C++(1696)

내용을 읽어보면 소스 파일을 열 수 없다는 소리인데 즉, 헤더파일이 어딨는지 모른다는 것이다.

* ctrl+shift+p 입력 후 C/C++ Configurations를 입력

위 증상을 해결 하기 위해서 C/C++ Configurations 설정을 열어보면 아래와 같이 나올텐데

여기에 ros에서 사용되는 include 파일을 넣어주면 된다.

*  그냥 엔터 치고 기입하면된다.

필자는 foxy환경에서 사용하였으므로 아래와 같이 기입하여줬다. 

${workspaceFolder}/../**
/opt/ros/foxy/include/**

설정 후 확인해보면 정상적으로 작동할 것이다.

반응형
Comments