Skip to main content

Parametrically defined mesh objects

Project description

Objects for robotic manipulation.

This folder provides various physical objects and software utilities used to build simulated environments for robotic manipulation. In particular, it provides a way to generate parametric objects with OnShape's Python API.

An object in simulation.

It's worth pointing out that in the context of this codebase when we refer to "objects" we don't have in mind a software object but rather a physical object with attributes such as mass, shape and texture. The codebase helps with generating objects representations (e.g. .STL files) with the OnShape python API client. OnShape is cloud-based CAD software which helps creating three-dimensional shapes and their parameterizations.

Parametric objects

An important component of this codebase is the ParametricObject class which can be used to represent a parametric object and check its consitency. A ParametricObject is a collection of two ParametricProperties, one representing the shape and the other representing the texture.

Parametric objects documentation

Parametric RGB-objects 🛑🟩🔷

An example of ParametricObject are the RGB-objects. The RGB-objects are a set of parametric objects designed in OnShape. Their shape has been designed to offer a multitude of different affordances for a parallel gripper grapsing and stacking. The basic idea behind RGB-objects' shapes is to start from a 2D shape and to extrude this shape along an axis. Both the 2D shape and the extrusion are parameterized by a few parameters, described in the documentation page.

RGB-objects 🛑🟩🔷 documentation

Usage example

RGB-objects are located in props/rgb_objects and can be initialized as following.

from dm_robotics.manipulation.props.rgb_objects import rgb_object

 color_set = [
      [1, 0, 0, 1],  # RED
      [0, 1, 0, 1],  # GREEN
      [0, 0, 1, 1],  # BLUE
  ]

# Only a name of the object and its color are required. Optional parameters
# include scaling, mass etc.
prop_1 = rgb_object.RgbObjectProp(obj_id='r3', color=color_set[0])
prop_2 = rgb_object.RgbObjectProp(obj_id='g2', color=color_set[1])
prop_3 = rgb_object.RgbObjectProp(obj_id='b1', color=color_set[2])

# When a list of all available objects could be accessed with
ids_list =  rgb_object.ids_list

Objects could be created individually as in the above snippet. Some predefined object sets have been defined in rgb_object.PROP_SETS. These sets can be used for training and evaluation on the RGB-stacking task.

object_set = 'rgb_test_set1'
_, obj_ids = rgb_object.PROP_SETS[object_set]
task_props = []
for i, obj_id in enumerate(objects):
  prop = rgb_object.RgbObjectProp(
        obj_id=obj_id, color=color_set[i], name=f'rgb_object_{obj_id}')
  task_props.append(prop)

We also provide some utilities to randomly sample objects. The following snippet allows to create sets of random objects at every call of the function PROP_SETS[object_set].

object_set = 'rgb_train_random'

for i in range(num_episodes):
  _, obj_ids = rgb_object.PROP_SETS[object_set]
  # `obj_ids` will provide different object ids for every access.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dm_robotics_manipulation-0.0.1rc1-py3-none-any.whl (181.3 kB view details)

Uploaded Python 3

File details

Details for the file dm_robotics_manipulation-0.0.1rc1-py3-none-any.whl.

File metadata

  • Download URL: dm_robotics_manipulation-0.0.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 181.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2

File hashes

Hashes for dm_robotics_manipulation-0.0.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 051b6e2440eb099dea9d2fd689b378b9d9f86b20d6ee7112ac4e8bde8e5584b7
MD5 d627122ccda829c771e335c5c8c091dd
BLAKE2b-256 e4f0a5f0d4a3f3c926b83e4c04db5cf689ae6f6b6f93ab5325e15e1f722f7efe

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page