Published on
Repository
https://github.com/Tomohiro-Nagasaka/Tomohiro-Nagasaka.github.io
ifconfig
sudo apt install net-tools
Teamviewer
wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo dpkg -i teamvieweramd64.deb sudo apt -f install -y sudo dpkg -i teamvieweramd64.deb
General > Incomming LAN > accept Security > Personal password
Syncthing
sudo apt-get install curl
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
sudo apt update
sudo systemctl enable syncthing@tomo.service
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install syncthing
Node.js, npm
sudo apt install nodejs npm -y
npm config set registry https://registry.npm.taobao.org
Is it better to use nvm (version manager)?
sudo chown -R tomo /usr/local/lib/node_modules
Gatsby
sudo npm config set registry https://registry.npm.taobao.org
sudo npm install -g gatsby-cli
Without sudo, might not be able to access /usr/local/lib
CUDA
sudo apt install nvidia-cuda-toolkit
nvcc --version
Torch cuda10.1
https://pytorch.org/get-started/locally/
pip3 install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
https://download.pytorch.org/whl/torch_stable.html
https://download.pytorch.org/whl/cu101/torch-1.7.1%2Bcu101-cp38-cp38-linuxx8664.whl
https://download.pytorch.org/whl/cu101/torchvision-0.8.2%2Bcu101-cp38-cp38-linuxx8664.whl
https://download.pytorch.org/whl/torchaudio-0.7.2-cp38-cp38-linuxx8664.whl
PYTHON
sudo apt install python3-pip
virtualenv /path/to/venv --python=python3
source /path/to/venv/bin/activate
pip3 install numpy matplotlib ipython -i https://pypi.tuna.tsinghua.edu.cn/simple
mirror
-i https://pypi.tuna.tsinghua.edu.cn/simple
修改 pip.conf 文件 (没有就创建一个)
$HOME/.config/pip/pip.conf
修改内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple12
Dart
sudo apt-add-repository ppa:dartsim/ppa
sudo apt-get install libdart6-all-dev
or
Manual from DART(http://dartsim.github.io/installdarton_ubuntu.html)
- install required dependencies
sudo apt-get install build-essential cmake pkg-config git -y
sudo apt-get install libeigen3-dev libassimp-dev libccd-dev libfcl-dev libboost-regex-dev libboost-system-dev -y
sudo apt-get install libopenscenegraph-dev -y
sudo apt-get install coinor-libipopt-dev libtinyxml2-dev liburdfdom-dev libxi-dev libxmu-dev freeglut3-dev liboctomap-dev libbullet-dev -y
NOTE: Maybe we should manually install boost ** libfcl-dev libboost-regex-dev libboost-system-dev ** Install > Uninstall > Install??
- install DART v6.3.0
git clone git://github.com/dartsim/dart.git
cd dart
git checkout tags/v6.3.0
mkdir build
cd build
cmake ..
make -j4
sudo make install
Mass
sudo apt-get install libtinyxml-dev libeigen3-dev libxi-dev libxmu-dev freeglut3-dev libassimp-dev libpython3-dev python3-tk python3-numpy virtualenv ipython3 cmake-curses-gui -y
Boost
** NOTE: We should install python packages first with apt, since we need boost-python. **
"We strongly recommand that you install boost libraries from the source code"
- Download boost sources with the version over 1.66.(https://www.boost.org/users/history/version166_0.html) ** NOTE: I downloaded 1.71 **
- Compile and Install the sources
cd /path/to/boost_1_xx/
./bootstrap.sh --with-python=python3
sudo ./b2 --with-python --with-filesystem --with-system --with-regex install
Source install : /usr/local/lib
Apt install :/usr/lib/x86_64-linux-gnu/cmake
CMakeLists.txt in render and python
find_package(Boost 1.66.0 COMPONENTS filesystem python3 numpy3) >>
find_package(Boost 1.71.0 COMPONENTS filesystem python numpy)
Compile and Run
mkdir build
cd build
cmake ..
make -j8
- Run Training
cd python
source /path/to/virtualenv/
python3 main.py -d ../data/metadata.txt
All the training networks are saved in /nn folder.
- Run UI
source /path/to/virtualenv/
./render/render ../data/metadata.txt
- Run Trained data
source /path/to/virtualenv/
./render/render ../data/metadata.txt ../nn/xxx.pt ../nn/xxx_muscle.pt
If you are simulating with the torque-actuated model,
source /path/to/virtualenv/
./render/render ../data/metadata.txt ../nn/xxx.pt
Uninstall boost
# to uninstall deb version
sudo apt-get -y --purge remove libboost-all-dev libboost-doc libboost-dev
# to uninstall the version which we installed from source
sudo rm -f /usr/local/lib/libboost_*
/usr/local/lib/libboost_*
cmake ../ -Dboostpython3DIR=/usr/local/lib/cmake/boostpython-1.71.0 -Dboostnumpy3DIR=/usr/local/lib/cmake/boostnumpy-1.71.0
VScode
sudo snap install --classic code
Extension:
C++
Cmake
Ctrl + Shift + P > Debug
WireGuard
sudo apt install wireguard -y
If you like it, share it!