robosuite.models.objects.primitive package#

Submodules#

robosuite.models.objects.primitive.ball module#

class robosuite.models.objects.primitive.ball.BallObject(name, size=None, size_max=None, size_min=None, density=None, friction=None, rgba=None, solref=None, solimp=None, material=None, joints='default', obj_type='all', duplicate_collision_geoms=True)#

Bases: robosuite.models.objects.generated_objects.PrimitiveObject

A ball (sphere) object.

Parameters

size (1-tuple of float) – (radius) size parameters for this ball object

property bottom_offset#

Returns vector from model root body to model bottom. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

property horizontal_radius#

Returns maximum distance from model root body to any radial point of the model.

Helps us put models programmatically without them flying away due to a huge initial contact force. Must be defined by subclass.

Returns

radius

Return type

float

sanity_check()#

Checks to make sure inputted size is of correct length

Raises

AssertionError – [Invalid size length]

property top_offset#

Returns vector from model root body to model top. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

robosuite.models.objects.primitive.box module#

class robosuite.models.objects.primitive.box.BoxObject(name, size=None, size_max=None, size_min=None, density=None, friction=None, rgba=None, solref=None, solimp=None, material=None, joints='default', obj_type='all', duplicate_collision_geoms=True)#

Bases: robosuite.models.objects.generated_objects.PrimitiveObject

A box object.

Parameters

size (3-tuple of float) – (half-x, half-y, half-z) size parameters for this box object

property bottom_offset#

Returns vector from model root body to model bottom. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

property horizontal_radius#

Returns maximum distance from model root body to any radial point of the model.

Helps us put models programmatically without them flying away due to a huge initial contact force. Must be defined by subclass.

Returns

radius

Return type

float

sanity_check()#

Checks to make sure inputted size is of correct length

Raises

AssertionError – [Invalid size length]

property top_offset#

Returns vector from model root body to model top. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

robosuite.models.objects.primitive.capsule module#

class robosuite.models.objects.primitive.capsule.CapsuleObject(name, size=None, size_max=None, size_min=None, density=None, friction=None, rgba=None, solref=None, solimp=None, material=None, joints='default', obj_type='all', duplicate_collision_geoms=True)#

Bases: robosuite.models.objects.generated_objects.PrimitiveObject

A capsule object.

Parameters

size (2-tuple of float) – (radius, half-length) size parameters for this capsule object

property bottom_offset#

Returns vector from model root body to model bottom. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

property horizontal_radius#

Returns maximum distance from model root body to any radial point of the model.

Helps us put models programmatically without them flying away due to a huge initial contact force. Must be defined by subclass.

Returns

radius

Return type

float

sanity_check()#

Checks to make sure inputted size is of correct length

Raises

AssertionError – [Invalid size length]

property top_offset#

Returns vector from model root body to model top. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

robosuite.models.objects.primitive.cylinder module#

class robosuite.models.objects.primitive.cylinder.CylinderObject(name, size=None, size_max=None, size_min=None, density=None, friction=None, rgba=None, solref=None, solimp=None, material=None, joints='default', obj_type='all', duplicate_collision_geoms=True)#

Bases: robosuite.models.objects.generated_objects.PrimitiveObject

A cylinder object.

Parameters

size (2-tuple of float) – (radius, half-length) size parameters for this cylinder object

property bottom_offset#

Returns vector from model root body to model bottom. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

static get_collision_attrib_template()#

Generates template with collision attributes for a given geom

Extends super method for better stability for contacts

Returns

Initial template with ‘pos’ and ‘group’ already specified

Return type

dict

property horizontal_radius#

Returns maximum distance from model root body to any radial point of the model.

Helps us put models programmatically without them flying away due to a huge initial contact force. Must be defined by subclass.

Returns

radius

Return type

float

sanity_check()#

Checks to make sure inputted size is of correct length

Raises

AssertionError – [Invalid size length]

property top_offset#

Returns vector from model root body to model top. Useful for, e.g. placing models on a surface. Must be defined by subclass.

Returns

(dx, dy, dz) offset vector

Return type

np.array

Module contents#