kwonathan / ycb_urdfs

Repository containing the YCB object models as URDF files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YCB URDFs

This repository contains the YCB object models as URDF files, for use in simulation environments.

More information on the objects can be found here.

Download All Objects

To download all object models, clone the repository or download it as a ZIP file:

git clone https://github.com/kwonathan/ycb_urdfs.git

Build Objects from Scratch

You can also build all or a subset of the object models from scratch by following these steps:

  1. Download this script.

  2. Choose which objects you would like to download, by changing the objects_to_download variable, as shown in the comments. The full list of available objects can be found here.

  3. Choose the file types to download, by changing the files_to_download variable. You can find more information on the different file types here. The objects in this repository were downloaded with files_to_download = ["google_16k"].

  4. Run the script to download the object models:

    python download_ycb_dataset.py
    

    Note that it may take some time for the object models to finish downloading.

  5. Now that the object models have finished downloading, we need to generate URDF files for each object. First, clone this repository:

    git clone https://github.com/harvard-microrobotics/object2urdf.git
    
  6. Move the newly downloaded object models to object2urdf/examples/ycb. You will find a few object models already in this directory.

  7. Replace the code in object2urdf/examples/build_object_library.py with the following:

    import os
    import sys
    from object2urdf import ObjectUrdfBuilder
    
    # Build entire libraries of URDFs
    object_folder = "ycb"
    builder = ObjectUrdfBuilder(object_folder)
    builder.build_library(decompose_concave=True)

    You can find more information on the code in the object2urdf repository.

  8. Navigate to the object2urdf/examples directory:

    cd object2urdf/examples
    

    Then, generate the URDF files:

    python build_object_library.py
    

    You will find the URDF files in the object2urdf/examples/ycb directory.

You can then move the downloaded object asset files and the generated URDF files to your working directory to load them in the simulator.

Usage

You can find an example script to load the objects in the PyBullet simulation environment in this repository.

Run the example script with the following command:

python example.py

More information on PyBullet can be found here. The GitHub page can be found here. A useful quickstart guide can be found here.

About

Repository containing the YCB object models as URDF files.


Languages

Language:Python 100.0%