Windows 11 + WSL 2 made ROS development easy on Windows Platform, this is a an attempt to install ROS 2 (Iron), Rviz, Gazebo on Windows using WSL2
Follow instructions in this official link.
Download XLaunch using this link.
Set it up like this
- Select any window configuration
- Set display number to 0
- Uncheck Native opnegl
- Check Disable access control
Available on Microsoft Store Set up a username and password.
export GAZEBO_IP=127.0.0.1
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
export LIBGL_ALWAYS_INDIRECT=0
Go to ROS Installation Documentation for detailed instructions or follow the steps below directly.
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update && sudo apt install ros-dev-tools
sudo apt update
sudo apt upgrade
sudo apt install ros-iron-desktop
sudo apt install ros-iron-ros-base
source /opt/ros/iron/setup.bash
Just following single command works
curl -sSL http://get.gazebosim.org | sh
For more details official Gazebo tutorial
gazebo