# References: 1.[【WSL教學】在Windows上執行Linux:簡單6步驟WSL的安裝與使用入門](https://bayareanotes.com/wsl-installation/) 2.[用 Vscode 連線至 WSL](https://vocus.cc/article/656448d4fd89780001496320) 3.[Install ROS Noetic in Windows Through WSL2 - Also Fix Graphical Issues of WSL2](https://www.youtube.com/watch?v=6D9qwmjDuv4&t=217s) 4.[ROS下载出现问题:Unable to locate package ros-noetic-desktop-full](https://blog.csdn.net/qq_42573052/article/details/118050415) # 1.WSL-Ubuntu 0.進到你自己電腦的 設定>系統>選用功能>更多Windows功能 勾選 ***windows子系統Linux版*** 以及 ***虛擬機器平台*** 1.以管理員身分運行PowerShell 2.安裝WSL `wsl --install` 3.重新啟動電腦 4.再次以管理員身分運行PowerShell,安裝Ubuntu `wsl --install -d Ubuntu-20.04`(20.04版是ROS noetic指定需求版本) 5.接著他會叫你設定自己的帳號密碼(請注意:輸入密碼時是blind input即看不到輸入顯示) 6.成功在子系統中灌好Ubuntu了! # 2.VScode-wsl 開發環境 1.vscode中下載WSL插件 2.點選左下角[><]的按鍵 3.選`Connect to WSL` 或選 `Connect to WSL using Distro > Ubuntu 20.04` 4.這下你就擁有連接至WSL的VScode開發環境了! # 3.ROS 1.查看並確保你的Ubuntu版本是20.04 * `lsb_release -a` 2.設置Ubuntu參數,解開限制 * `sudo add-apt-repository universe` * `sudo add-apt-repository multiverse` * `sudo add-apt-repository restricted` 3.更新環境 * `sudo apt-get update` * `sudo apt-get upgrade` 4.設置讓電腦可以接受來自packages.ros.org的軟體 * `sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'` 5.設key * `sudo apt install curl` * `curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -` 6.安裝ROS-noetic(理論上至此已完成ROS環境!) * `sudo apt-get update` * `sudo apt install ros-noetic-desktop-full` 7.設定環境變量參數(這裡開始已為ROS使用內容,詳請見其他ROS使用教學) * `echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc` * `source ~/.bashrc` 8.此時你可以輸入`rosversion -d`來檢查ros版本,應該會看到輸出`noetic` 9.安裝建置包的依賴項 * `sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential` * `sudo rosdep init` * `rosdep update` # 4.gazebo 在你安裝ros-noetic-full時,相應版本的gazebo也已包含在內。 現在可以試試`gazebo`,如果跳出空白的3D模擬介面,你便已經成功啟動gazebo! 也可以用`gazebo -version`來確認gazebo版本。 https://x.com/hanamiya_nina 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up