kgreenek / vim-ros-ycm

Full YouCompleteMe support for catkin workspaces
Apache License 2.0
10 stars 6 forks source link

catkin_ws , #1

Open jrjfonseca opened 4 years ago

jrjfonseca commented 4 years ago

So i am new to ROS. And relative new do vim. So this is not an issue but more a doubt. In order to create my catkin_ws i did : image After that i did: image and put this in bashrc image after this i created a package and runes my two first nodes one in python and the other in c++, that print the classic hello world the code of python and c++ works well and i was able to run the program, however the autocomplete from YouCompleteMe worked on python but didn't recongnize the #include <ros/ros.h> prompting 'ros/ros.h' file no found ( i am still able to compile and run this program but vim doesn't complete things) So my doubts are If i just install your plugin with a plugin manager mi issue is solved ? Do i need to run: catkin config --install -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo catkin build ? do i need to add something to my bashrc to work ? thanks a lot

kgreenek commented 4 years ago

Hmm, it should just work if you install the plugin, run the configure command, and have sourced the setup.bash script for your workspace, which it looks like you have.

To help debug, if you have the time, open a cpp file in your workspace and then type :YcmDebugInfo in your vim. It'll show you the path to the ycm server log files. If you paste the contents of those files here, I can see what flags it tried to use for your file

image

jrjfonseca commented 4 years ago

here it is screenshots1587056783_abr16_18:06:23

kgreenek commented 4 years ago

I meant the contents of the log files. Open them in an editor and copy-paste the contents here after following the steps above.

khssnv commented 4 years ago

I have an issue the same, please find my YCM logs below.

YCM tab in vim ```console Printing YouCompleteMe debug information... -- Completion API: 0 -- Client logfile: /tmp/ycm_q3vn175h.log -- Server Python interpreter: /usr/bin/python3 -- Server Python version: 3.6.9 -- Server has Clang support compiled in: True -- Clang version: clang version 10.0.0 (https://github.com/ycm-core/llvm 038587147cf2f97d1c3e677042f69560c65b5bea) -- No extra configuration file found -- C-family completer debug information: -- Clangd running -- Clangd process ID: 1548 -- Clangd executable: ['/usr/bin/clangd', '-header-insertion-decorators=0', '-limit-results=500'] -- Clangd logfiles: -- /tmp/clangd_stderrfy7c0uwr.log -- Clangd Server State: Initialized -- Clangd Project Directory: /home/khassanov/Workspace/catkin_ws -- Clangd Settings: {} -- Clangd Compilation Command: False -- Server running at: http://127.0.0.1:40027 -- Server process ID: 1489 -- Server logfiles: -- /tmp/ycmd_40027_stdout_3qehqha9.log -- /tmp/ycmd_40027_stderr_3ehu55wp.log Press ENTER or type command to continue ```
$ cat /tmp/ycmd_40027_stdout_3qehqha9.log ```console $ cat /tmp/ycmd_40027_stdout_3qehqha9.log serving on http://localhost:40027 ```
$ cat /tmp/ycmd_40027_stderr_3ehu55wp.log ```console $ cat /tmp/ycmd_40027_stderr_3ehu55wp.log 2020-05-08 12:02:24,295 - INFO - Received ready request 2020-05-08 12:02:24,307 - INFO - Received signature help available request 2020-05-08 12:02:24,322 - INFO - Received event notification 2020-05-08 12:02:24,325 - INFO - Received event notification 2020-05-08 12:02:24,326 - INFO - Adding buffer identifiers for file: /home/khassanov/Workspace/catkin_ws/src/visual_perception/src/pcl_generator.cpp 2020-05-08 12:02:24,386 - INFO - Using Clangd from /usr/bin/clangd 2020-05-08 12:02:24,386 - INFO - Computed Clangd command: ['/usr/bin/clangd', '-header-insertion-decorators=0', '-limit-results=500'] 2020-05-08 12:02:24,387 - INFO - Returning cached Clangd command: ['/usr/bin/clangd', '-header-insertion-decorators=0', '-limit-results=500'] 2020-05-08 12:02:24,389 - INFO - Starting Clangd: ['/usr/bin/clangd', '-header-insertion-decorators=0', '-limit-results=500'] 2020-05-08 12:02:24,393 - INFO - Clangd started 2020-05-08 12:02:24,409 - INFO - Language server requires sync type of Incremental 2020-05-08 12:02:24,409 - INFO - cfamily: Using characters for signature triggers: (,, 2020-05-08 12:02:24,429 - INFO - Received filetype completion available request 2020-05-08 12:02:27,667 - INFO - Received debug info request ```