Skip to content

Instantly share code, notes, and snippets.

@tarukosu
Last active April 10, 2019 02:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarukosu/c58f5b43b591990cf11655d14aeb1828 to your computer and use it in GitHub Desktop.
Save tarukosu/c58f5b43b591990cf11655d14aeb1828 to your computer and use it in GitHub Desktop.
Ubuntu 初期セットアップ
# バージョン
- Ubuntu 16.04
# パッケージのアップデート
```
sudo apt update
sudo apt upgrade
```
*** Error in `appstreamcli': double free or corruption (fasttop): 0x00000000010f7960 ***
というエラーが出る場合
http://grainrigi.hatenablog.com/entry/2017/08/26/232405
```
sudo killall -KILL apt.systemd.daily
sudo mv /etc/apt/apt.conf.d/50appstream /etc/apt/apt.conf.d/50appstream.disable
#apt update/upgrade
sudo apt update -y
sudo apt upgrade -y
#appstreamを有効化して再度update
sudo mv /etc/apt/apt.conf.d/50appstream.disable /etc/apt/apt.conf.d/50appstream
sudo apt update -y
```
# ツールをインストール
```
sudo apt install emacs git tmux vim
```
## VSCode
https://code.visualstudio.com/Download
Settings Sync をインストール
VSCode を再起動後、Sync
# 設定
## capslock を Ctrl に
/etc/default/keyboard を編集
```
XKBOPTIONS="ctrl:nocaps"
```
## フォルダ名を英語に
```
LANG=C xdg-user-dirs-gtk-update
```
## ssh key
```
ssh-keygen
```
githubに登録
# ROS kinetic のインストール
http://wiki.ros.org/kinetic/Installation/Ubuntu
```
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt update
sudo apt install ros-kinetic-desktop-full
```
## Initialize rosdep
```
sudo rosdep init
rosdep update
```
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
## ビルドツール
```
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
```
## workspace
```
sudo apt install python-catkin-tools
source /opt/ros/kinetic/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin build
source devel/setup.bash
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
```
# RealSense
https://github.com/intel-ros/realsense
https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages
```
cd ~/catkin_ws/src
git clone git@github.com:intel-ros/realsense.git
catkin build
```
# RealSense Mobile Robot
https://github.com/tarukosu/realsense_mobile_robot
```
cd ~/catkin_ws/src
git clone git@github.com:tarukosu/realsense_mobile_robot.git
git clone git@github.com:AutonomyLab/create_autonomy.git
rosdep update
rosdep install --from-paths . --ignore-src
catkin build
```
ルンバをUSBでコントロールする場合
```
sudo usermod -a -G dialout $USER
```
# xbox one コントローラを Bluetooth で接続する
edit /etc/default/grub
```
GRUB_CMDLINE_LINUX="bluetooth.disable_ertm=1"
```
```
sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot
```
https://bbs.archlinux.org/viewtopic.php?pid=1726909#p1726909
## マウスが動いてしまう場合
https://askubuntu.com/questions/1000501/turn-off-controller-from-moving-mouse
/user/share/X11/xorg.conf.d/50-joystick.conf を以下の内容で作成
```
Section "InputClass"
Identifier "joystick catchall"
MatchIsJoystick "on"
MatchDevicePath "/dev/input/event*"
Driver "joystick"
Option “StartKeysEnabled” “False” #Disable mouse
Option “StartMouseEnabled” “False” #support
EndSection
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment