Introduction
本稿では、Alexander Mock氏の Image Perception Packageのインストールに必要なPowerShellとChocolateyをインストールします。これらは、PLY File Import/Exportで使用予定のツールの一部です。では、参りましょう。
PowerShell Installation
PowerShellはImage Perception Packageに要求されているROSの要求アイテムとなっています。Microsoftの公式ツールです。インストールはMicrosoftの公式サイトPowerShell ドキュメント – PowerShell | Microsoft Docsよりダウンロードしてサイト内の説明に沿って行えば、無事に完了します。
僕の場合、Windows 10用の実行ファイルをダウンロードしました。
Download File: PowerShell-7.1.0-win-x64.msi
インストールの際に、オプションは全て選択しました。
(Check) Add PowerShell to Path Environment Variable
(Check) Register Windows Event Logging Manifest
(Check) Enable PowerShell remoting
(Check) Add 'Open here' context menus to Explorer
(Check) Add 'Run with PowerShell 7' context menu for PowerShell files
Chocolatey Installation
ChocolateyはWindows Package Managerで、ROSインストールの必須プログラムとされています。是非、Installation/Windows – ROS Wikiを参照して下さい。
先ずは、x64 Native Tools Command Prompt for VS 2019を管理者権限で起動します。
Installation/Windows – ROS Wikiに説明されている通りに、「c:opt」 フォルダーを作成して、そこに移動します。ここで、以下の項目コピーして、コマンドプロンプトにペースト実行します。
Installation/Windows - ROS Wikiに指示されているコピー項目:(4. Install Windows Package Managerに有ります。) @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
こんな感じにコピーします。

こんな感じにペーストします。

無事にインストールできると、以下の様に表示されます。
Chocolatey (choco.exe) is now ready.
. . .
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
ここで、Chocolateyを使ってのGitアップデートが推奨されているので、行っておきます。
c:\opt > choco upgrade git -y
アップデートが完了すると、以下の様に表示されます。
. . .
Chocolatey upgrtaded 3/3 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
コマンドプロンプトにて「git –version」を実行して、確認が出来れば完了です。
c:\opt > git --version
-> (Above command displays example below.)
git version 2.29.2.wondows.3
Conclusion
如何でしたか。本稿では、PowerShellとChocolateyのインストールを紹介しました。最後までお読みいただき、ありがとうございました。