Coder Social home page Coder Social logo

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 YCB web page. 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.

python3 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:

python3 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.

python3 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.

ycb-tools's People

Contributors

sea-bass 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  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

ycb-tools's Issues

The {image, mask} pair

Hi there! Thanks for the code! I've used it and downloaded the dataset. However, I could not find the mask of the objects. Could you please give suggestion where I can get the data if I want to use this for a object segmentation? Many thanks!

Sliding in some objects

Hi, any idea on why the objects slide?, or better, how to stop it?

We been using this data-set for a project and implemented a similar approach using trimesh to generate the objects properties for the SDF like you did, but some of them start sliding or having some jittering in Gazebo and we haven't found out why.

(We used a different method for the collision models with Meshlab and its quadric edge collapse decimation process, and also got sliding problems.)

sliding

Also thanks for uploading this code, it was a pain for us when we had to do it.

unable to load YCB texture map image to pybullet

I obtained object mesh, mtl files and texture map images from YCB dataset

However, I get this following error when loading it with pybullet:
b3Printf: Unsupported texture image format
any resolution for this?
Also, noting that using these works fine with blender.

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.