採用理由:たいていの外部デバイスは動くらしい

1)HyperVをアンインストール

2)HyperV停止コマンドを実行

  Windows 10で VirtualBoxが動かない場合の対処方法、Hyper-Vと Vx-Tの喧嘩を解消する (VirtualBoxが WHvSetupPartition VERR_NEM_VM_CREATE_FAILED ConsoleWrapで動かない場合の解決方法) (neko.ne.jp)

3)あとは他と同じ。

display memory 128MB

プロセッサ4つ

  4GBRAM

4)ホームキーを設定すること。(たいていのキーボードにはデフォルト指定の右CTRLはないので)

  右ALTあたりがお勧め

5)以下、インストール

sudo apt-get update
sudo apt-get upgrade

sudo apt-get install net-tools
sudo apt-get install lxterminal
sudo apt-get install terminator
sudo apt-get install fcitx-mozc
sudo apt-get install fdclone
sudo apt-get install tightvncserver
sudo apt-get install xrdp
sudo apt-get install remmina
sudo apt-get install gddrescue
sudo apt-get install parted gparted
sudo apt-get install ksnapshot(世代交代で以下に置き換えられた)
sudo apt-get install kde-spectacle

sudo apt-get install scratch
sudo apt-get install geany

sudo apt install python3-pip
sudo apt  install curl
pip3 install thonny
sudo apt-get install thonny
sudo apt-get install -y chromium-browser

https://codechacha.com/ja/ubuntu-install-microsoft-edge/




6)デスクトップによく使うアプリを貼り付ける
「/usr/share/applications/」からデスクトップに置きたいアプリを探してコピー
コピー後、右クリックして「この実行ファイルを信用する(trust this executable)」をクリック(そうしないと毎回起動時に実行していいかどうか聞かれる)

7)バーチャルボックスのエクステンションをインストールする
sudo bash /media/(user name)/VBox_GAs_6.1.36/VBoxLinuxAdditions.run

再起動すると今後は、「home+f」で全画面表示できる。

6)VirtualBOXのコントローラからホストPCと共有フォルダを設定

7)ROS2インストール(APTでやっちゃった)
参考URL
https://kurukuruway.com/kaihatsu/raspberry-pi-4%E3%81%ABubuntu-20-04%E3%81%A8ros2%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB/

コマンド
①リポジトリ追加
$ sudo apt update && sudo apt install curl gnupg2 lsb-release
$ curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -

②aptからUpdateを検索可能にするためにROS2のアドレス構成と追加
$ sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list'

$sudo apt install ros-foxy-desktop python3-argcomplete
$source /opt/ros/foxy/setup.bash

$pip3 install -U argcomplete
$echo "source /opt/ros/foxy/setup.bash" >> ~/.bashrc

$sudo apt install python3-colcon-common-extensions

以下に従ってテスト

①Hello_world的なテスト
https://note.com/npaka/n/n62b371b2900d

②簡単なROSの通信試験
https://qiita.com/ItoMasaki/items/6acabc94b040f8b0f7cd

これを、①でいう
ノード名をpublisher_node
パッケージ名をtalkerとlistener、
でそれぞれパッケージを作ってテストをすればよい。
(python3でも実行可能)

ただし、このソースコード数箇所間違えていて
  rclpy.init(arg=arg)のカッコ内はいらない
  create_subscription(String, "chatter", self.callback)は、talker,listenerともにカッコ内末尾にサイズ情報がたりないので,10とでも追加しておく必要あり


・参考
https://qiita.com/Dorebom/items/47fb67e5e47a205f1395
・Pythonの演習

・ROS2の演習
https://demura.net/robot/ros2/20748.html



7)VSCodeインストール

https://invisiblepotato.com/ubuntu01/

ーーーーーーーーーーーーーーーーー以下検証中ーーーーーーーーーーーーーーーー

8)VSCodeにpico環境を仕込む(cベースっぽい)

9)micro-ROSをpicoで使う準備

https://ubuntu.com/blog/getting-started-with-micro-ros-on-raspberry-pi-pico