Coder Social home page Coder Social logo

ambitious-octopus / ycb-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sea-bass/ycb-tools

1.0 0.0 0.0 329 KB

Tools to download models from the YCB dataset and use them with the Gazebo simulator.

License: MIT License

Python 97.76% Shell 2.24%

ycb-tools's Introduction

YCB Tools

Tools to download models from the YCB dataset and use them with the Gazebo simulator.

By Sebastian Castro, 2020-2021

YCB Models in Gazebo

Python Setup

You only need to install a few Python packages to get these tools running.

pip install numpy pillow scipy shapely trimesh

Downloading YCB objects

You can download the models using a variant of the download script provided on the [http://ycb-benchmarks.s3-website-us-east-1.amazonaws.com/). However, this script has been modified to work with Python 3.

python download_ycb_dataset.py

You can configure a few options in the script, including choosing which objects and model types to download. However, the default options will get all of the YCB object models and may take a few minutes to download.

Using YCB Object Models in Gazebo

After you have downloaded the YCB models, you can run the following script.

python create_ycb_sdf.py

This by default uses the ./models/ycb and ./templates/ycb folder, assuming you are running the script from the top-level folder of this repo. You can always modify this if you want:

python create_ycb_sdf.py --template-folder /path/to/templates/ycb --ycb-folder /path/to/models.ycb

There is also a --downsample_ratio argument set in this script which uses rejection sampling to randomly remove faces from the mesh to get a subset of faces. This downsampled mesh is used only for collision detection, so it will not affect the visuals, but it should make simulation faster if you don't need perfect collision fidelity (i.e., if you're not trying to do manipulation). The Google 16k meshes are fairly high-resolution, so this should not have a huge impact, but if you want the full meshes used for collision, you can leave this parameter at its default value of 1.

python create_ycb_sdf.py --downsample-ratio 0.5

NOTE: A few of the models in the dataset do not have either of the google_16k or tsdf meshes available, so these will not work with Gazebo.

Finally, you need to make sure the folder containing your models is included in your GAZEBO_MODEL_PATH environment variable. We recommend setting this in your ~/.bashrc file as follows.

export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$REPO_BASE_FOLDER/models/ycb

where $REPO_BASE_FOLDER is the folder containing this README file.

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.