robosuite.models.objects.composite package#
Submodules#
robosuite.models.objects.composite.hammer module#
- class robosuite.models.objects.composite.hammer.HammerObject(name, handle_shape='box', handle_radius=(0.015, 0.02), handle_length=(0.1, 0.25), handle_density=(100, 250), handle_friction=(3.0, 5.0), head_density_ratio=2.0, use_texture=True, rgba_handle=None, rgba_head=None, rgba_face=None, rgba_claw=None)#
Bases:
CompositeObject
Generates a Hammer object with a cylindrical or box-shaped handle, cubic head, cylindrical face and triangular claw (used in Handover task)
- Parameters:
name (str) – Name of this Hammer object
handle_shape (str) – Either “box”, for a box-shaped handle, or “cylinder”, for a cylindrically-shaped handle
handle_radius (float or 2-array of float) – Either specific or range of values to draw randomly from uniformly for the handle radius
handle_length (float or 2-array of float) – Either specific or range of values to draw randomly from uniformly for the handle length
handle_density (float or 2-array of float) – Either specific or range of values to draw randomly from uniformly for the handle density (in SI units). Note that this value is scaled x4 for the hammer head
handle_friction (float or 2-array of float) – Either specific or range of values to draw randomly from uniformly for the handle friction. Note that Mujoco default values are used for the head
head_density_ratio (float) – Ratio of density of handle to head (including face and claw)
use_texture (bool) – If true, geoms will be defined by realistic textures and rgba values will be ignored
rgba_handle (4-array or None) – If specified, sets handle rgba values
rgba_head (4-array or None) – If specified, sets handle rgba values
rgba_face (4-array or None) – If specified, sets handle rgba values
rgba_claw (4-array or None) – If specified, sets handle rgba values
- Raises:
ValueError – [Invalid handle shape]
- property all_geoms#
Returns: list of str: geom names corresponding to all hammer components
- 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 claw_geoms#
Returns: list of str: geom names corresponding to hammer claw
- property face_geoms#
Returns: list of str: geom names corresponding to hammer face
- property handle_geoms#
Returns: list of str: geom names corresponding to hammer handle
- property head_geoms#
Returns: list of str: geom names corresponding to hammer head
- 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
- property init_quat#
Generates a new random orientation for the hammer
- Returns:
(x, y, z, w) quaternion orientation for the hammer
- Return type:
np.array
- 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.composite.pot_with_handles module#
- class robosuite.models.objects.composite.pot_with_handles.PotWithHandlesObject(name, body_half_size=(0.07, 0.07, 0.07), handle_radius=0.01, handle_length=0.09, handle_width=0.09, handle_friction=1.0, density=1000, use_texture=True, rgba_body=None, rgba_handle_0=None, rgba_handle_1=None, solid_handle=False, thickness=0.01)#
Bases:
CompositeObject
Generates the Pot object with side handles (used in TwoArmLift)
- Parameters:
name (str) – Name of this Pot object
body_half_size (3-array of float) – If specified, defines the (x,y,z) half-dimensions of the main pot body. Otherwise, defaults to [0.07, 0.07, 0.07]
handle_radius (float) – Determines the pot handle radius
handle_length (float) – Determines the pot handle length
handle_width (float) – Determines the pot handle width
handle_friction (float) – Friction value to use for pot handles. Defauls to 1.0
density (float) – Density value to use for all geoms. Defaults to 1000
use_texture (bool) – If true, geoms will be defined by realistic textures and rgba values will be ignored
rgba_body (4-array or None) – If specified, sets pot body rgba values
rgba_handle_0 (4-array or None) – If specified, sets handle 0 rgba values
rgba_handle_1 (4-array or None) – If specified, sets handle 1 rgba values
solid_handle (bool) – If true, uses a single geom to represent the handle
thickness (float) – How thick to make the pot body walls
- 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 handle0_geoms#
Returns: list of str: geom names corresponding to handle0 (green handle)
- property handle1_geoms#
Returns: list of str: geom names corresponding to handle1 (blue handle)
- property handle_distance#
Calculates how far apart the handles are
- Returns:
handle distance
- Return type:
float
- property handle_geoms#
Returns: list of str: geom names corresponding to both handles
- 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
- property important_sites#
Returns: dict: In addition to any default sites for this object, also provides the following entries
- ‘handle0’:
Name of handle0 location site
- ‘handle1’:
Name of handle1 location site
- 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