Tools Setup - AD-EYE/AD-EYE_Core GitHub Wiki
IDE: Visual Studio Code
The IDE recommended is VSCode and can be downloaded here.
Extensions
Extensions can be installed following these instructions.
The extensions listed below are strongly recommended to work on AD-EYE.
C++
https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
Python
https://marketplace.visualstudio.com/items?itemName=ms-python.python
ROS
https://marketplace.visualstudio.com/items?itemName=ms-iot.vscode-ros
After installing the ROS extension, go to its settings and set the distribution to kinetic
.
C++ formatter: clang-format
clang-format should be installed using the following command:
sudo apt-get install clang-format
The installation can be verified with clang-format --version
.
Setting up the git hook to autoformat on commit
Make sure your version of git is higher than 2.10 (git --version
). If it is not, update it.
Then use the following command inside the repository git config core.hooksPath .githooks
.
After that, every time the command git commit
is ran, the terminal should display Pre-commit hook: formatting using clang-format.
Setting up VSCode to use clang-format
The setting in VSCode should be set as on the following picture:
The code can then be automatically formatted using ctrl + shift + i
.
If VSCode ask which formatter should be use, choose C/C++ as shown in the following picture: