• Home
  • Blog
  • Tutorials
  • About
  • Contact
303-725-5814

Harmonic And Jazzy Tutorial

Setting up Gazebo Harmonic

Introduction and explanation

What software are we using and why

All of these instructions have been tested using the current version of Ubuntu: Noble Numbat.We are going to use two packages: Gazebo for the physics based Simulator and ROS2 (Robot Operating System) for the control system. There are many releases of each of these, and only some combinations are mutually compatible. Also, since we are focusing on a stable development platform, we will use the Long Term Support (LTS) versions that are current at the time we are posting this.
How will the demonstration proceed.We will go through 7 steps: 1) Install Gazebo Harmonic and confirm that it is correct. 2) Examine an empty world 3) Build a simple robot and test it using keyboard controls. 4) Build a 'world' for our robot to explore. 5) Install ROS2 (and its components) and confirm the installation. 6) Add Lidar to the robot 7) Write control software in ROS2 to make the robot autonomous.
This post covers Step 1
NOTE: If you already have a working copy of Gazebo Harmonic installed, you can skip ahead to Examining an Empty World

Install Gazebo Harmonic

Before doing any software install, make sure your system is up to date > sudo apt-get update > sudo apt-get upgrade
Get Privacy Guard so that you can pull the Gazebo package > sudo apt-get install lsb-release wget gnupg(These may already be installed)Get the pgp signature >sudo curl https://packages.osrfoundation.org/gazebo.gpg --output /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
Installing Gazebo > 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 gz-harmonic

Confirm your installation

At a command prompt type: > gz sim empty.sdfYou should see the following screen:
Notes: * You may get a warning about libEGL warning: egl: failed to create dri2 screen you can ignore this. * We have only tested on Ubuntu Numbat 24.04 build * These instructions were adapted from here:
Gazebo Web Site

building an empty world

The next thing we are going to do is to save the empty world, so we can look at the parts that make it up. If Gazebo is not open, begin by launching gazebo with this command: > gz sim empty.sdf So that you see the screen above
With that click, you have launched two programs, one is the visible one - the Gazebo client interface, the second is invisible, running in the background: the Gazebo Simulation Server. The interface is broken up into a top bar and two main panels. The top bar has a menu hamburger on the left and a plugin pull down on the right. The left panel is a visualization screen, currently showing an infinite plane with grid lines around the origin point. The right panel is showing information about the settings for the simulation. We'll talk about these next. But first, let's save a copy of this empty world and look at its parts. Use the gazebo menu (select the hamburger in the upper left and choose 'Save World ...' ) save this as pong-world-1.sdfOpen the file in a text editor and look at it. It is 89 lines of xml that defines the world. We will examine it in detail in the next part of the tutorial.
Previous Step
Current Step
Next Step
Why Simulate?
Installing Gazebo
Examining an Empty World
Copyright © 2021 - 2024 ReiFxSolutions.com. All Rights Reserved.

We use cookies to enable essential functionality on our website, and analyze website traffic. By clicking Accept you consent to our use of cookies. Read about how we use cookies.

Your Cookie Settings

We use cookies to enable essential functionality on our website, and analyze website traffic. Read about how we use cookies.

Cookie Categories
Essential

These cookies are strictly necessary to provide you with services available through our websites. You cannot refuse these cookies without impacting how our websites function. You can block or delete them by changing your browser settings, as described under the heading "Managing cookies" in the Privacy and Cookies Policy.

Analytics

These cookies collect information that is used in aggregate form to help us understand how our websites are being used or how effective our marketing campaigns are.