从零配置开发环境
Basic
- Ubuntu 22.04 & 配置源
- Clash
- GCC 11(>=C++17):
sudo apt install build-essential cmake git vim curl zsh openssh-client openssh-server net-tools - oh-my-zsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" - zsh-autosuggestions:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions - .zshrc:
ZSH_THEME=robbyrussellandplugins=(git zsh-autosuggestions) - Chrome & enable Sync
- VSCode & enable Sync
- CopyQ
- Pyenv & Python 3.10:
pyenv install 3.10andpyenv global 3.10.10 - ccache:
export PATH=/usr/lib/ccache:$PATH - mold
- Qt5 using
qt-*.run- GL/gl.h: No such file or directory:
sudo apt-get install mesa-common-dev - To obtain diagnostic information from Qt:
export QT_DEBUG_PLUGINS=1 - libxcb-xinerama.so.0: cannot open shared object file:
sudo apt install libxcb-xinerama0 - CMake:
-DQt5_DIR=$HOME/Qt/5.15.2/gcc_64/lib/cmake/Qt5or-DCMAKE_PREFIX_PATH=$HOME/Qt/5.15.2/gcc_64
- GL/gl.h: No such file or directory:
-
JetBrains Mono
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/install_manual.sh)”
- Intel One Mono
- LLVM
# Cite https://apt.llvm.org/
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh <version number> all
# Usages (https://stackoverflow.com/questions/7031126/switching-between-gcc-and-clang-llvm-using-cmake)
# export CC=/usr/lib/ccache/clang-16
# export CXX=/usr/lib/ccache/clang++-16
Robotics Tools
- Eigen(3.4.0):
sudo apt install libeigen3-dev - Boost(1.74.0):
sudo apt install libboost-all-dev - EigenPy(devel):
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/mylibs - urdfdom:
sudo apt install liburdfdom-dev - assimp:
sudo apt install libassimp-dev - octomap:
sudo apt install liboctomap-dev - hpp-fcl:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/mylibs -DENABLE_PYTHON_DOXYGEN_AUTODOC=FALSE - Pinocchio(pinocchio3-preview):
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/mylibs -DCMAKE_PREFIX_PATH=$HOME/mylibs -DBUILD_WITH_COLLISION_SUPPORT=ON - blasfeo:
make shared_library -j && make install_shared - LCM(v1.4.0):
sudo apt install libglib2.0-devandcmake .. && make && sudo make install - OpenGL Utility Toolkit:
sudo apt install freeglut3-dev - mujoco:
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev- Python Bindings:
pip install mujoco - FFmpeg:
sudo apt install ffmpeg
- Python Bindings:
-
pip setup
pip config set global.index https://pypi.doubanio.com/simple pip config set global.index-url https://pypi.doubanio.com/simple pip config set global.trusted-host pypi.doubanio.com -
Drake
pip install drake # Source Installation sudo ./setup/ubuntu/install_prereqs.sh # OR ./setup/mac/install_prereqs.sh bazel build //... # OR bazel build --config=clang //... # Building the Python Bindings using CMake cmake .. make -j export PYTHONPATH=${PWD}/install/lib/python3.X/site-packages:${PYTHONPATH} -
JupyterLab (Code Completion -> Continuous hinting: true)
pip install jupyterlab pip install jupyterlab-lsp jupyterlab-git jedi-language-server jupyterlab_code_formatter autopep8 isort