Giter Club home page Giter Club logo

gap's Introduction

Gazebo Awesome Plugins


GAP is a set of tools written in C++ for Gazebo which provide an interface to interact programatically with the simulator. We built GAP to support our research in Domain Randomization. Unlike most similar software, these tools do not strictly depend on ROS. They include:

  1. [NEW] Domain Randomization plugin, a multi-purpose plugin to change physical properties of models, as well as visual appearence.

  2. Camera Utils plugin, to control camera objects, namely moving the camera and saving rendered frames at specific instants.

  3. Visual Utils plugin, to control the visual appearance of an object during simulation, including changing the Visual object's pose, material and scale.

  4. World Utils plugin, that allows you to spawn models either by a uri reference or directly with an sdf string.

This project was originally conceived so we could develop a scene generator in Gazebo, employing domain randomisation in an attempt to bridge the reality gap between real life images and synthetically generated frames.

Check out tf-object-detection, in which we trained a state--of--the--art deep CNN using this synthetic dataset.

Examples

Check out the examples and see what you can achieve with these plugins.

shadowhand scene_example

Documentation

Take a look at the automatic documentation for file and class description.

Dependencies

The code has been tested in Gazebo 9.0.0 from the official stable repository as well as built from source 9.4.1 and running on Ubuntu 16.04.5 and 18.04.

Gazebo internal message passing relies on Protobuf, which is why the compiler needs to be installed in order to generate the tools' custom messages. Eigen 3 is required for scene_example.

sudo apt install protobuf-compiler  # Required
sudo apt install libeigen3-dev      # Required for scene_example

For custom texture generation, we have developed a pattern generation tool, which can randomly generate a high number of 4 different types of textures and produces materials in a format Gazebo can recognise.

Compilation

Clone the repository to your workspace directory and build from source.

cd ~/workspace/gap/ &&
mkdir build && cd build && cmake ../ && make -j8

Alternatively you can build each plugin/tool individually in a similar fashion.

Initialization

Make sure you properly initialise the required environment variables. We provide a simple script for this:

cd ~/workspace/gap &&
source setup.sh

Reference

These tools were developed to further our research regarding domain randomisation. We include a published conference paper and its reference for citation purposes.

@inproceedings{borrego2018,
  author = {J. Borrego and R. Figueiredo and A. Dehban and P. Moreno and A. Bernardino and J. Santos-Victor},
  booktitle = {2018 IEEE International Conference on Autonomous Robot Systems and Competitions (ICARSC)},
  title = {A generic visual perception domain randomisation framework for Gazebo},
  year = {2018},
  pages = {237-242},
  keywords = {Machine learning;Neural networks;Object detection;Proposals;Robots;Task analysis;Training},
  doi = {10.1109/ICARSC.2018.8374189},
  month = {April}
}

Disclaimer

This project is not directly affiliated with Gazebo.

gap's People

Contributors

joao-borrego avatar ruipimentelfigueiredo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gap's Issues

Trouble with opencv

Installing the plugin was an extremely thorny experience because of OpenCV. I used (2.4.9.1) and I had to modify many things. Maybe just specify exactly which version of OpenCV you used, or even better, migrate to OpenCV 3.3.0 ๐Ÿ˜‰

Best documentation ever :/

Hi there,

I am just writing this issue to tell you to follow the steps you described in the documentation of this project and also of the tf-shape-detection project. Please try to follow them exactly as you described. I am pretty sure you won't achieve anything.

I am glad that you worked on these awesome projects, but it's so sad that you can't write a proper documentation or atleast some clear usage steps.

Have an awesome day!

scene_example CameraUtils plugin

Attempting to run scene_example, ubuntu 18.04, gazebo 9.0.0, running spawner.world in gzserver.
Code stalls at line 143 of scene_example.cc pub_camera->WaitForConnection();

Protobuf message error, possible gazebo::Transport race condition

In the capture example client I randomly get the terminal output:

Master Unknown message type[] From[60586]
[libprotobuf ERROR google/protobuf/message_lite.cc:123] Can't parse message of type "gazebo.msgs.Packet" because it is missing required fields: stamp, type, serialized_data

However everything seems to work.
Gazebo's own issue 821 seems to address this and suggests it is a race condition.

Change license to Apache 2.0

For total compatibility with Gazebo, we should use the same license.
I plan on doing this very soon.
It involves changing the header of each source file, so keep that in mind if altering the code in a separate branch.

Create CMake package

This is needed for proper dependency check and to import our tools as an external library for 3rd party projects.
Catkinizing the package may also be useful, so it can be easily integrated into the ROS work flow and compiled from a catkin workspace.
Current temporary solution in 1a104cd.

Saving images to disk

At the moment, storing captured camera frames on the disk seems to be the bottleneck of the pipeline. One possible solution: the camera plugin could rely on a buffer (e.g. FIFO queue) that keeps captured images in memory and a dedicated worker thread for saving those images to disk. @jsbruglie what do you think?

About gazebo API

Your code is awesome but I wonder where did you find the API about "gazebo::msgs::Visual"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.