If you ask a random roboticist to give you the definition of a robot, everyone will give you a different answer. If you do an online search, here is what you might get for the top result:
A robot is “a machine—especially one programmable by a computer— capable of carrying out a complex series of actions automatically (Wikipedia).” However, this definition falls short of what a robot really is. Just based on that definition, one could consider a dishwasher a robot. But a dishwasher is not a robot.
So back to the original topic of this post. What is a robot? The best definition of a robot I have seen is in Maja Matarić’s book, The Robotics Primer. Maja Matarić is the Director of the Robotics and Autonomous Systems Center at the University of Southern California. She received her PhD in Computer Science and Artificial Intelligence from MIT in 1994, where she studied under Rodney Brooks a founder and former Chief Technical Officer of iRobot, one of the largest consumer robotics companies in the world.
Here is Professor Matarić’s definition:
“A robot is an autonomous system which exists in the physical world, can sense its environment, and can act on it to achieve some goals.”
I love this definition.
A robot must be autonomous, which means it acts based on its own decisions.
A robot must exist in the physical world, which mean it has to deal with gravity and the laws of physics just like we all do.
A robot must have sensors (look, hear, smell, and/or touch) to gather information about the world around it.
A robot must perform some computation based on what it has sensed and then act on the external world in some way. This is called the sense-think-act model, which has been the dominant paradigm for robotics for over 40 years.
Going back to the dishwasher example I mentioned earlier…a dishwasher is not a robot because it does not act on the external world. However, an autonomous robotic vacuum cleaner like the Roomba is a robot. The Roomba sucks up dirt on the floor.
So the next time you are wondering if something is a robot or just a robot wannabe, come back to this definition for clarification.
I get asked all the time, “What is computer vision?”. Computer vision has been around since the late 1960s. Although the field has evolved significantly since then, the basic idea of computer vision remains the same.
Computer vision deals with how computers extract meaningful pieces of information from digital image or video pixels (i.e. “picture elements”), and then match these pieces of information to known, labeled ones in order to achieve understanding.
In this project, we will get started on our Robot Operating System (ROS) programming journey by installing Ubuntu. Ubuntu is a popular distribution (i.e. flavor) of the Linux operating system and is fully supported by ROS, the most popular framework for writing robotics software. If you have a Windows PC (I have Windows 10), I recommend you install a VirtualBox first and then install Ubuntu in the Virtual Box. I’ll show you how to do all that below.
The process for installing Ubuntu has a lot of steps, so hold on tight, don’t give up if something goes wrong, and go slowly so that you get your installation setup properly. Let’s get started!
Here are the project requirements:
Install Virtual Box
Install Ubuntu on VirtualBox
Learn Important Linux Terminal Commands
You Will Need
The following components are used in this project. You will need:
Check Ubuntu Releases to find the latest version of Ubuntu that has long term support (LTS). As of this writing, the latest release is Ubuntu 18.04.3 LTS (Bionic Beaver).
Click on the latest release of Ubuntu, and download the 64-bit PC (AMD64) desktop image (.iso file).
Before installing Ubuntu, you need to install Virtual Box. Virtual Box extends the capabilities of your host computer (i.e. your laptop or desktop PC) by enabling you to install and run an operating system in a new environment on top of your current operating system (Windows 10 in my case). The environment the new operating system will run in is known as a virtual machine (or guest).
Type in a descriptive name for your operating system. You can stick with the default machine folder. The machine folder is where your virtual machines will be stored.
Also, select the operating system that you want to later install (Linux in this case).
Click Next to proceed.
The default memory size for me is 1024 MB. That is not enough. Raise it to 6470 MB, and then click Next to proceed.
Make sure “Create a virtual hard disk now” is selected, and click Create.
Select “VirtualBox Disk Image (VDI)”, and click Next.
Choose a Fixed size virtual hard disk so that you have better performance, and click next.
You can stick with the default hard disk space (10GB as of the time of this writing) or go with something like 50 GB. I went with 50 GB. I also prefer to save my hard disk on my D drive (which has more space than my C drive). Then click Create.
Double-click on the left panel where it says “Ubuntu 18.04.” A startup window will appear.
Click the Folder icon next to Empty and select the Ubuntu image you downloaded earlier in this tutorial. It is a .iso file. You can make sure that your .iso file is somewhere in your C drive (doesn’t have to be on your Desktop). Then click Start to proceed.
You might get an error that looks like this.
Click Close VM.
Enable Virtualization Technology on Your Computer
The error above arises because virtualization technology is disabled on your computer by default. We need to enable it. Let’s do that now.
Go down to the search area on your computer in the bottom left of your screen, and searched for “Advanced Startup”.
Click “Change Advanced Startup Options.”
Click Restart Now.
Click Advanced Options.
Click UEFI Firmware Settings.
Click Restart to change the UEFI Firmware Settings.
Click F10 BIOS Setup.
Press the right arrow to go to System Configuration.
Scroll down to Virtualization Technology.
Press Enter to select Enabled.
Press the down arrow and then Enter to select Enabled.
Press F10 to save and exit.
Press Enter on Yes to save the changes.
Your computer will reboot.
Double-click on the VirtualBox icon to start it.
Click on the left panel of the window to start the Ubuntu virtual machine. Or you can just click Start in the toolbar.
You should see the Ubuntu window appear.
Click on “Install Ubuntu” to install Ubuntu.
Click “Continue” to save the keyboard layout. The default English one is fine.
Keep clicking Continue through all the prompts. The options you want selected as you go through the prompts are the following:
Download updates while installing Ubuntu
Erase disk and install Ubuntu
You will get to a point where you will need to set your time zone. It will be a big map of the world that should automatically detect your location.
Type in a computer name and pick a username and password. I select the “Log in automatically” option.
When installation is complete, click “Restart Now.”
When you reboot, you will go to the Ubuntu desktop.
If at any time you want to exit Ubuntu, go to File → Close. You will be given the option to save your machine state so that you can pick up where you left off the next time you login to Ubuntu.
Two additional notes….when you power up your VirtualBox, it is a good idea to go to Settings → Display and change your Video Memory to 128 MB. This will give you ample video memory.
Also go to Settings → System → Processor, and adjust the number of CPUs to 4.
If you at any point in the future run out of hard drive space for your virtual machine, you can move it to another drive (e.g. D drive) by following this article at Tech Republic.
Here are the complete settings on my Windows machine.
Getting Used to Ubuntu
Similar to the C drive in Windows 10, Linux has a file system (everything branches from the / symbol). You can find it by clicking the icon of the file cabinet on the right side of the desktop. It is the third icon down in the image below.
Click “Other Locations.”
You will see all the files. For example, the path to the bin file is /bin
You can find popular software applications for download in the Ubuntu Software module. It is the sixth icon in the left-hand panel.
Linux Terminal Commands With the Ubuntu Command-Line Interface
We could certainly navigate around Ubuntu using the graphical user interface, but we would miss out on being able to run advanced processes for ROS. This is where the Terminal application comes in handy. The Terminal application is the Ubuntu command-line interface and is similar to the Command Prompt on a Windows 10 system. It enables us to use Linux terminal commands.
To open the Terminal, click the bottom left where you see those nine white dots and search for “Terminal” at the top.
Click on Terminal.
If you do a Google search for “common Linux terminal commands,” you should find some nice cheat sheets to use as a reference. Let’s try a few common commands below.
The following command retrieves a list of all the files and folders in the current directory.
If you want to change to the desktop, type:
If you want to get the path to the current directory, type:
To go up one directory, type:
To update the list of packages, type:
sudo apt-get update
The sudo keyword enables you to run a command as an administrator.
At this stage, it would be useful for you to install htop, an interactive system-monitor process-viewer and process-manager. To install it, type the following command:
sudo apt-get install htop
If at any point you want to remove it, you can type the following command:
sudo apt-get remove htop
To run, htop, you type:
You can reboot the system using the following command:
Finally, to shutdown the system, you type the following command: