Getting Started with WSL-ROS2 on the University Managed Desktops
Prerequisites¶
Launching WSL-ROS2¶
-
Then, start typing
wsl-rosand click on the application shortcut that should appear in the list:Make sure you select WSL-ROS2!
You'll then be presented with the following screen:
WSL-ROS2 is now being installed, which may take a couple of minutes to complete. Once it's done, the Windows Terminal should automatically launch:
This is a WSL-ROS2 Terminal Instance!
Backing-Up (and Restoring) your Data¶
If you're working with WSL-ROS on a university managed desktop machine, the WSL-ROS Environment will only be preserved for a limited time on the machine that you installed it on. As such, any work that you do within WSL-ROS will not be preserved between sessions or across different machines automatically! It's therefore really important that you run a backup script before you close WSL-ROS down. To do so is very easy, simply run the command below from any WSL-ROS Terminal Instance:
This will create an archive of your Home Directory (more detail here) and save it to your University U: Drive. Whenever you launch a fresh WSL-ROS2 Environment again on another day, or on a different machine, simply run the following command to restore your work to it:
To make things a little easier, on launching WSL-ROS the system will check to see if a backup file already exists from a previous session. If it does, then you will be asked if you want to restore it straight away:
It looks like you already have a backup from a previous session:
U:\wsl-ros\ros2-backup-XXX.tar.gz
Do you want to restore this now? [y/n]
Enter Y+Enter to restore your data from this backup file, or N+Enter to leave the backup file alone and work from fresh (none of your previous work will be restored).
Re-Launching the Environment¶
As discussed above, the WSL-ROS2 environment is not preserved on the university managed desktops indefinitely. If you log back in to the same machine within a few hours however, then it may still be there, and you'll be presented with the following message when you launch it:
Enter Y+Enter to continue where you left things previously, or N+Enter to start from a fresh installation.
Warning
If you select N then any work that you have created in the existing environment will be deleted! Always make sure you back up your work using the procedure outlined above!
