/RoboND-myrobot

Gazebo basics through a two-wheeled robot creation

Primary LanguageC++MIT LicenseMIT

Gazebo world

The purpose of this repository is to learn, how to build a two-wheeled robot model with the Model Editor tool in Gazebo. Include this model in an empty Gazebo World. And, finally write a plugin to interact with this world.

Description

Overview of Gazebo through a two-wheeled robot model creation.

Getting Started

Directory structure

.myrobot                           # myrobot lab main folder 
├── images                         # Code output image                   
│   ├── myrobot.png
├── model                          # Model files of the two-wheeled robot
│   ├── robot
│   │   ├── model.config
│   │   ├── model.sdf
│   ├── mybuilding
│   │   ├── model.config
│   │   ├── model.sdf
├── script                         # Gazebo World plugin C++ script      
│   ├── hello.cpp
├── world                          # Gazebo main World empty scene
│   ├── myworld
├── CMakeLists.txt                 # Link libraries 
└──                              

Dependencies

  • Operating System — Ubuntu Bionic 18.04 LTS or 20.04 LTS (Focal Fossa), and WSL on Windows
  • Software packages — CMake 2.8 or later, ROS Noetic, Gazebo 11

Installing

gazebo

How to run

  • How to run the program

    • Update and upgrade the Workspace
    sudo apt-get update && sudo apt-get upgrade -y
    
    • Clone the lab folder in /home/workspace/
    cd /home/workspace/
    git clone https://github.com/udacity/RoboND-myrobot myrobot
    
    • Compile code
    mkdir build
    cd build/
    cmake ../
    make # You might get errors if your system is not up to date!
    
    • Add the library path to the Gazebo plugin path
    export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:/home/workspace/myrobot/build
    
    • Run Gazebo world
    cd /home/workspace/myrobot/world/
    gazebo myworld
    

Visualize output

A Hello World! message is printed in the terminal. This message interacts with the Gazebo World that includes the two-wheeled robot.

Reference repository

RoboND-myrobot