GithubHelp home page GithubHelp logo

cheneating716 / pybullet-urdf-models Goto Github PK

View Code? Open in Web Editor NEW
72.0 1.0 8.0 449.7 MB

Collection of urdf models (including part of YCB dataset). Made for robot manipulation and grasping simulation, tested with PyBullet.

License: MIT License

Python 100.00%
grasping pybullet urdf robotics ycb

pybullet-urdf-models's Introduction

pybullet_URDF_models

Collection of urdf models (part of it comes from YCB dataset).

Made for robot manipulation and grasping simulation, tested with PyBullet.

example

This collection contains more than 90+ daily supplies urdf models, which can be encountered in kitchen, desk, workshop and dinner scenario.

The model data follows format below:

urdf_models/
—— models/ 
———— fork/
—————— collision.obj
—————— model.urdf
—————— texture_map.png
—————— textured.obj
—————— textured.obj.mtl
—————— visual.ply

You are also welcome to add your own models under the urdf_models/models/ directory follow the same format. Nothing more needs to be done.

Installation

Download with

git clone https://github.com/ChenEating716/pybullet-URDF-models.git 

Install with

pip3 install -e pybullet-URDF-models/

Usage

# import module
import urdf_models.models_data as md

# create model library
models_lib = md.model_lib()

# get the name list of all models
print(models_lib.model_name_list)

# get the absolute path of all models in your computer
print(models_lib.model_path_list)

# find the corresponding abs path for desired model
print(models_lib['knife'])

# get random model file path
print(models_lib.random)

Example

example

import os
import time
import pybullet as p
import pybullet_data
from urdf_models import models_data
import random

# initialize the GUI and others
p.connect(p.GUI)
p.resetDebugVisualizerCamera(3, 90, -30, [0.0, -0.0, -0.0])
p.setTimeStep(1 / 240.)
p.setAdditionalSearchPath(pybullet_data.getDataPath())

# load urdf data
models = models_data.model_lib()

# load model list
namelist = models.model_name_list
print("Look at what we have {}".format(namelist))

# Load table and plane
p.loadURDF("plane.urdf")
p.loadURDF("table/table.urdf")

# load the randomly picked model
flags = p.URDF_USE_INERTIA_FROM_FILE
# randomly get a model
for i in range(8):
    random_model = namelist[random.randint(0, len(namelist))] 
    p.loadURDF(models[random_model], [0., 0., 0.8 + 0.15*i], flags=flags)

p.setGravity(0, 0, -9.8)

while 1:
    p.stepSimulation()
    time.sleep(1./240)

Acknowledgement

URDF models are created from the data provided by Open Cloud Robot Table Organization Challenge (OCRTOC). All credit goes to the organizers of OCRTOC.

I do not claim copyright for any model files under this repo.

pybullet-urdf-models's People

Contributors

cheneating716 avatar ethanabrooks 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

Watchers

 avatar

pybullet-urdf-models's Issues

How to generate collision.obj files?

Hi,
I'd like to know how to generate collision.obj files for YCB models or my own models(any textured.obj). I can't seem to find a way to do this. Can you tell me how you did it? Thank you.

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.