More than a tutorial, this is going to be a summary of the links I used and the hiccups I found in the process of learning Gazebo and ROS 2.
I installed an Ubuntu 22.04 VM. One important thing to consider is that Gazebo requires significant CPU power, so at least 3-4 cores are needed for the simulations to run smoothly.
These are the steps that I followed for the VM:
Step 1: Download and Install VirtualBox
- Go to the VirtualBox website.
- Click on "Download VirtualBox."
- Choose the appropriate version for your operating system (Windows, macOS, Linux).
- Download and install VirtualBox by following the on-screen instructions.
Step 2: Download Ubuntu 22.04 ISO
- Go to the Ubuntu website.
- Click on "Download" for Ubuntu 22.04 LTS.
- Save the ISO file to your computer.
Step 3: Create a New Virtual Machine
- Open VirtualBox.
- Click on "New" to create a new virtual machine.
- Enter a name for your VM (e.g., "Ubuntu 22.04").
- Choose the type as "Linux" and the version as "Ubuntu (64-bit)."
- Click "Next."
Step 4: Allocate Memory (RAM)
- Allocate the desired amount of RAM for the VM. A minimum of 2 GB (2048 MB) is recommended, but 4 GB or more is preferred for better performance.
- Click "Next."
Step 5: Create a Virtual Hard Disk
- Choose "Create a virtual hard disk now" and click "Create."
- Select "VDI (VirtualBox Disk Image)" and click "Next."
- Choose "Dynamically allocated" and click "Next."
- Set the size of the virtual hard disk. A minimum of 25 GB is recommended.
- Click "Create."
Step 6: Configure the VM Settings
- Select your newly created VM and click on "Settings."
- Go to the "System" tab, then the "Processor" tab, and allocate at least 2 CPU cores.
- Go to the "Storage" tab, click on the empty optical drive, and choose "Choose a disk file."
- Select the Ubuntu 22.04 ISO file you downloaded earlier and click "Open."
- Go to the "Network" tab and ensure that "Attached to" is set to "NAT."
Step 7: Start the VM and Install Ubuntu
- Click "Start" to boot the VM.
- The VM will boot from the Ubuntu ISO. Select "Install Ubuntu" from the menu.
- Follow the on-screen instructions to install Ubuntu. This will include selecting your language, keyboard layout, and installation type (usually "Erase disk and install Ubuntu" for a clean installation).
- Set your timezone, create a user account, and set a password.
- Continue with the installation process. This may take some time.
Step 8: Complete Installation and Reboot
- Once the installation is complete, you will be prompted to restart the VM.
- After restarting, you may need to remove the ISO from the virtual drive. Go to "Devices" > "Optical Drives" > "Remove disk from virtual drive."
- Restart the VM again if necessary.
Step 9: Install VirtualBox Guest Additions (Optional but Recommended)
With the VM running, go to "Devices" > "Insert Guest Additions CD image."
Open a terminal in Ubuntu and run the following commands to install the necessary packages:
sudo apt update sudo apt install build-essential dkms linux-headers-$(uname -r)
Mount the Guest Additions CD if not already mounted, and run the installer:
sudo /media/$USER/VBox_GAs_*/VBoxLinuxAdditions.runReboot the VM after the installation is complete.
Now you have Ubuntu 22.04 installed and running in a VirtualBox VM!
Gazebo Installation
As I have ubuntu 22.04 the guide recommends gazebo fortress
The following are the instruction from Gazebo ignition fortress.....
https://gazebosim.org/docs/fortress/install_ubuntu
Binary Installation on Ubuntu![](https://gazebosim.org/assets/icon/baseline-link-24px.svg)
Fortress binaries are provided for Ubuntu Bionic, Focal and Jammy. All of the Fortress binaries are hosted in the osrfoundation repository. To install all of them, the metapackage ignition-fortress
can be installed.
First install some necessary tools:
sudo apt-get update sudo apt-get install lsb-release wget gnupg
Then install Ignition Fortress:
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null sudo apt-get update sudo apt-get install ignition-fortress
All libraries should be ready to use and the ign gazebo
app ready to be executed.
No comments:
Post a Comment