Last active
June 11, 2022 12:44
-
-
Save mayataka/7504e592e5ffe970304cb5f74616244f to your computer and use it in GitHub Desktop.
Setup Ubuntu 20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']" | |
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt autoremove -y | |
sudo apt install build-essential cmake git libeigen3-dev vim tmux doxygen graphviz ffmpeg libglpk-dev -y | |
sudo apt install python3-sphinx -y | |
# install docker | |
sudo apt install lsb-release -y | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt update | |
sudo apt install docker-ce docker-ce-cli -y | |
# install Python3 and useful packages | |
sudo apt install python3-pip jupyter -y | |
pip3 install numpy matplotlib seaborn casadi torch jax optuna meshcat pybullet gym | |
# install Pinocchio | |
sudo apt install -qqy lsb-release gnupg2 curl -y | |
echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" | sudo tee /etc/apt/sources.list.d/robotpkg.list | |
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add - | |
sudo apt update -y | |
sudo apt install -qqy robotpkg-py38-pinocchio -y | |
echo export PATH=/opt/openrobots/bin:$PATH >> ~/.bashrc | |
echo export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH >> ~/.bashrc | |
echo export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH >> ~/.bashrc | |
echo export PYTHONPATH=/opt/openrobots/lib/python3.8/site-packages:$PYTHONPATH >> ~/.bashrc | |
echo export CMAKE_PREFIX_PATH=/opt/openrobots:$CMAKE_PREFIX_PATH >> ~/.bashrc | |
source ~/.bashrc | |
sudo apt update && sudo apt install robotpkg-py38-qt5-gepetto-viewer-corba -y | |
# install acados | |
cd | |
git clone https://github.com/acados/acados.git | |
cd acados | |
git submodule update --recursive --init | |
mkdir -p build | |
cd build | |
cmake -DACADOS_WITH_QPOASES=ON -DACADOS_WITH_OSQP=ON .. | |
sudo make install -j4 | |
cd .. | |
pip3 install -e ./interfaces/acados_template | |
echo export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH >> ~/.bashrc | |
echo export ACADOS_SOURCE_DIR=$PWD >> ~/.bashrc | |
source ~/.bashrc | |
cd | |
# install ros-noetic | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - | |
sudo apt update | |
sudo apt install ros-noetic-desktop-full -y | |
sudo apt install python3-catkin-tools -y | |
# install ros2-foxy | |
sudo apt update && sudo apt install curl gnupg2 lsb-release | |
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null | |
sudo apt update | |
sudo apt install ros-foxy-desktop -y | |
sudo apt install python3-colcon-common-extensions -y | |
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool -y | |
sudo rosdep init && rosdep update | |
sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment