1 - Install XUbuntu 20 from the following link:
2 - Flash the image on the SD card from balenaEtcher:
3 - Extract the zip file you have downloaded and open XUbuntu and write the following commands to extract Xubutun image:
tar -xvjf Xubuntu-20.04-l4t-r32.3.1.tar.tbz2
open the program and select the image, then select the device port name.
*Notes: The flashing takes long time up to 30 minutes.
Get the commands from here: https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
apt-cache policy | grep universe or
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl gnupg2 lsb-release
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 $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
Now you are done installing ROS2, try to write command:
and you'll see the default two topics indicating that ros is successfully running.