ls | awk '{print $1 " " $1 ".msg"}' | xargs -L 1 mv
メモ ubuntu エイリアス
if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi if [ -f /etc/bash_completion.d/git-prompt ]; then export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w$(__git_ps1)\[\033[00m\](\t)\$ ' else export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w \$ ' fi if [ "$0" = "bash" ]; then /usr/bin/wmctrl -r :ACTIVE: -b add,above; fi ## Docker xhost +local:docker ## Alias set by yourself alias sb='source ~/.bashrc' alias vs='vim ~/.bashrc' alias v='vim' alias c.='cd ..' alias c-='cd -' alias cl='cd ~/Documents/paper/latex/paper' alias h='htop' alias lo='gnome-screensaver-command -l' alias x="perl -pe 's/\n/ /' | xsel --clipboard --input" alias gm='git commit' alias gs='git status' alias gc='git clone' alias gct='git checkout' alias gp='$(git push |& grep "git push")' alias gpu='git pull' alias cb='catkin build' alias sd='source devel/setup.bash' alias rdi='rosdep install -r -y --from-paths --ignore-src ./' alias rc='roscore' alias rs='rosrun' alias rl='roslaunch' alias rte='rostopic echo' alias rtl='rostopic list' alias rtt='rostopic type' alias rti='rostopic info' alias rd='roscd' alias mkc='make && make clean' ####################################
WSLでRVizを使用する
概要
WSL(ubuntu 18.04)でRVizを使用する際にエラーが出たので 上手く行った方法を備ぼる。
結論
WSL2を使おう docs.microsoft.com
手順
①WSLを入れる
②ros melodic desktopを入れる
③X Window Systemのインストール
④RVizを立ち上げるために設定を行う
xming Serverを立ち上げる必要があるので XLaunchを起動します。
立ち上げるとこんな感じの画面がでてくる そのまま次へを選択
この画面では一番上を選択して次へを選択
この画面ではDisable access control
をチェックするのと
パラメータとして-nowgl
を追加する必要がある
終わったら次へを選択する
この画面ではそのまま完了を押せば良い
これでxming serverの立ち上げは完了
続いてmesa-utils
をインストールする
sudo apt install mesa-utils
続いて設定を~/.bashrcに書きます
export DISPLAY=localhost:0.0 #0.0は上の絵のポップアップで出てくる数字に合わせる export LIBGL_ALWAYS_INDIRECT= export GAZEBO_IP=127.0.0.1
追加し終えたらsource ~/.bashrc
を実行
④RVizを起動 これで上手くRVizを立ち上げることができると思います
ターミナルが一つのみの場合 roscore & rosrun rviz rviz
確認が終わったら
killall -9 rosmaster
でrosmasterのプロセスを落とす
複数ターミナルの場合 roscore rosrun rviz rviz
こちらはctl+cでroscore
を落とせば良い
raspiホットスポット化
sudo apt install hostapd dnsmasq iptables git clone https://github.com/oblique/create_ap.git cd create_ap sudo make install
sudo iw dev wlan0 interface add ap0 type __ap sudo create_ap --no-virt ap0 wlan0 raspi
上手く行くと、このようなログが出てくる。
ubuntu@ubuntu:~$ sudo create_ap --no-virt ap0 wlan0 raspicatv2 WARN: brmfmac driver doesn't work properly with virtual interfaces and it can cause kernel panic. For this reason we disallow virtual interfaces for your adapter. For more info: https://github.com/oblique/create_ap/issues/203 Config dir: /tmp/create_ap.ap0.conf.6ESuWyuv PID: 2225 Network Manager found, set ap0 as unmanaged device... DONE Sharing Internet using method: nat hostapd command-line interface: hostapd_cli -p /tmp/create_ap.ap0.conf.6ESuWyuv/hostapd_ctrl WARN: Low entropy detected. We recommend you to install `haveged' Configuration file: /tmp/create_ap.ap0.conf.6ESuWyuv/hostapd.conf ap0: Could not connect to kernel driver Using interface ap0 with hwaddr e4:5f:01:68:fb:5c and ssid "raspicatv2" ap0: interface state UNINITIALIZED->ENABLED ap0: AP-ENABLED ap0: STA 80:32:53:62:73:c5 IEEE 802.11: associated ap0: AP-STA-CONNECTED 80:32:53:62:73:c5 ap0: STA 80:32:53:62:73:c5 RADIUS: starting accounting session EDCAFFAFD8EE1847
raspiインターネット時刻合わせ
ファイルの編集を行う。
sudo vim /etc/systemd/timesyncd.conf
なぜか、ntp.nict.jp
だと上手く行かなかったで、pool.ntp.org
を選択した。
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # # Entries in this file show the compile time defaults. # You can change settings by editing this file. # Defaults can be restored by simply deleting this file. # # See timesyncd.conf(5) for details. [Time] NTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 0.jp.pool.ntp.org
修正内容を反映し、サービスを再起動。
sudo systemctl daemon-reload sudo timedatectl set-ntp true sudo systemctl restart systemd-timesyncd.service
こんな感じのログが出てくれば大丈夫そう。
ubuntu@ubuntu:~(17:54:19)$ sudo systemctl status systemd-timesyncd.service ● systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2022-02-19 17:53:05 JST; 1min 16s ago Docs: man:systemd-timesyncd.service(8) Main PID: 1935 (systemd-timesyn) Status: "Connecting to time server 129.250.35.251:123 (pool.ntp.org)." Tasks: 2 (limit: 4442) CGroup: /system.slice/systemd-timesyncd.service └─1935 /lib/systemd/systemd-timesyncd 2月 19 17:53:05 ubuntu systemd[1]: Starting Network Time Synchronization... 2月 19 17:53:05 ubuntu systemd[1]: Started Network Time Synchronization. 3月 06 14:03:56 ubuntu systemd-timesyncd[18103]: Synchronized to time server 129.250.35.250:123 (2.arch.pool.ntp.org).