Skip to content
Maze Generator for Gazebo
C++ CMake Shell
Branch: master
Clone or download
Pull request Compare This branch is even with PeterMitrano:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gui_plugin
maze_base
maze_plugin
mouse
mouse_plugin
.gitignore
CMakeLists.txt
ReadMe.md
empty.mz
gzmaze.world
sample_maze.mz
setup.sh
simple.mz
wall_follow.mz

ReadMe.md

What is gzmaze?

gzmaze is an attempt at flexing the power of Gazebo The main goal here is to generate a maze in gazebo from a text file.

How it works

There are two components, a GUI overlay plugin and a world plugin.

GUI overlay

Gazebo has a tutorial on simple GUI overlays. I followed that tutorial, and extended it slightly. There are two buttons and a textedit. When the buttons are clicked, a message is published to the topic ~/maze/regenerate

World plugin

This is where the meat of the code is. We subscribe to ~/maze/regenerate and build mazes using gazebo messages. This plugin took example from the gazebo Model editor. Essentially, it uses gazebo messages to construct Collision and Links. There links are then converted to and sdf::ElementPtr via the convenient funtions VisualToSDF and CollisionToSDF.

Requirements

cmake 2.8 Gazebo 9

To get the dependencies, you can probably just run

sudo apt install gazebo9 libgazebo9-dev

Building

mkdir build
cd build
cmake .. && make

Running

Be sure to add the following to your .gazebo/gui.ini file

    [overlay_plugins]
    filenames=libregenerate_widget.so
./setup.sh #this will setup the environment variables you need and run gazebo

The input files

look at sample_maze.mz for an example

TODO:

  • let the mouse model actually drive around
You can’t perform that action at this time.