EP3.2 - How to install ROS and Linux (on your current PC)
Video: https://youtu.be/kjFoWj0GC5E
#Robotics #Hardware #ROS #Linux #VirtualisationRead more here
Table of Contents:
Introduction: Follow-Up on Setting Up a ROS Development Environment
Hey everyone! This is a quick follow-up to my video on setting up a ROS development environment in Linux. In that video, I mentioned that the best way for beginners to get started is to have a dedicated computer running Linux and ROS. While I still think that’s the ideal approach, I understand that not everyone has a spare computer lying around, and buying a new one can be expensive. So, in this video, we’re going to look at three ways to get started with Linux and ROS on your current computer.
Three Methods for Running Linux and ROS on Your Current Computer
The three options we’ll explore are:
- Virtual Machines: We’ll spend most of our time on this.
- Partitioning Your Hard Drive.
- Adding an Additional Drive.
After that, I’ll discuss a couple of other alternatives as well.
Option 1: Using Virtual Machines
In my previous video, I was a bit critical of virtual machines because they can have some issues for beginners. However, they are a really useful tool that can make setting up a new environment quick and easy.
What is a Virtual Machine?
A virtual machine uses a process called virtualization.
With virtualization software, you can create a virtual computer that runs inside your actual computer.
This allows you to install a new operating system and run programs without needing extra hardware.
Limitations of Virtual Machines
There are three main limitations with virtual machines due to shared resources between the host (your main operating system) and the guest (the virtual machine):
-
Resource Sharing: Resources like RAM and CPU are split between the host and guest. For example, if you have 8GB of RAM and assign 4GB to the virtual machine, your host will only have 4GB left. This can affect performance if your hardware is low-end.
-
Graphics Issues: Virtual machines create a virtual graphics card, which may not work as well as the real one. This can cause problems with 3D graphics, such as using RViz for visualization or running simulations in Gazebo.
-
External Hardware: Connecting external hardware (e.g., sensors or cameras) to a virtual machine can be tricky. The virtualization software usually supports this, but it requires extra configuration.
Despite these limitations, virtual machines are one of the easiest ways to get started. If it works for you, great! If not, you can try other methods.
Setting Up a Virtual Machine for Linux and ROS
Let’s walk through how to set up Linux and ROS inside a virtual machine.
We’ll be using VMware Workstation Player for this demo.
Step-by-Step Guide:
- Install VMware Workstation Player:
After installation, click “Create a New Virtual Machine.”
- Select the Operating System: Choose “Install the operating system later,”
then select Linux and Ubuntu 64-bit.
Give it a Name and a Location,
- Create a Virtual Hard Disk: Specify the maximum disk size for the virtual machine.
Note: The file will grow as more space is used.
We can click Finish,
- Select the Linux ISO File: In the settings,
select the ISO file for Ubuntu,
then start the virtual machine.
The installation process is the same as on a physical computer.
-
Install ROS and Gazebo: Once Ubuntu is installed, follow the usual steps to install ROS and Gazebo.
-
Test ROS and Gazebo: After installation, run Gazebo and check that ROS works by running a demo. If everything’s working, you’re good to go!
Option 2: Partitioning Your Hard Drive
If your hardware isn’t powerful enough to run a virtual machine, or you prefer not to deal with the performance limitations, you can partition your hard drive.
What is Partitioning?
Partitioning divides your hard drive
into separate sections, allowing you to install Linux alongside your existing operating system (e.g., Windows).
Advantages of Partitioning
- It’s a good option if your computer has enough RAM and CPU but limited disk space.
- You can easily reclaim the partitioned space later if needed.
Risks of doing a Partitioning
Partitioning carries some risks, such as accidentally deleting important files or causing boot issues. Make sure to back up your data before proceeding.
Tutorial <----------------------
Video: https://youtu.be/aKKdiqVHNqw
Option 3: Adding an Additional Drive
If your hardware can’t handle a virtual machine and you don’t have enough space to partition your hard drive, another option is to add an additional drive.
Why Add an Extra Drive?
This method is particularly useful for desktop computers, but some laptops also allow you to add extra drives.
You can buy a solid-state drive (SSD) for as little as $20 to $30 and install Linux on that drive.
Advantages:
- You keep Windows on its own drive and Linux on another, avoiding conflicts.
- You can easily switch between operating systems using the BIOS boot selector.
Other Options: Running ROS Without Installing a New Operating System
There are also other methods for running ROS without installing Linux, including:
- Running ROS on Windows.
- Using Windows Subsystem for Linux (WSL).
- Using Docker.
While these are useful for advanced users, they can introduce additional complexity that may be frustrating for beginners. If you’re new to ROS, I recommend sticking to one of the first three methods.
Conclusion: Getting Started Without a Dedicated Computer
I hope this video helps those of you who want to start developing with ROS but don’t have a spare computer to dedicate to it. Thanks I’ll see you next time!
Z) 🗃️ Glossary
File | Definition |
---|
Uncreated files | Origin Note |
---|