robosuite.models.arenas package#
Submodules#
robosuite.models.arenas.arena module#
- class robosuite.models.arenas.arena.Arena(fname)#
Bases:
MujocoXML
Base arena class.
- set_camera(camera_name, pos, quat, camera_attribs=None)#
Sets a camera with @camera_name. If the camera already exists, then this overwrites its pos and quat values.
- Parameters:
camera_name (str) – Camera name to search for / create
pos (3-array) – (x,y,z) coordinates of camera in world frame
quat (4-array) – (w,x,y,z) quaternion of camera in world frame
camera_attribs (dict) – If specified, should be additional keyword-mapped attributes for this camera. See http://www.mujoco.org/book/XMLreference.html#camera for exact attribute specifications.
- set_origin(offset)#
Applies a constant offset to all objects.
- Parameters:
offset (3-tuple) – (x,y,z) offset to apply to all nodes in this XML
robosuite.models.arenas.bins_arena module#
- class robosuite.models.arenas.bins_arena.BinsArena(bin1_pos=(0.1, -0.5, 0.8), table_full_size=(0.39, 0.49, 0.82), table_friction=(1, 0.005, 0.0001))#
Bases:
Arena
Workspace that contains two bins placed side by side.
- Parameters:
bin1_pos (3-tuple) – (x,y,z) position to place bin1
table_full_size (3-tuple) – (L,W,H) full dimensions of the table
table_friction (3-tuple) – (sliding, torsional, rolling) friction parameters of the table
- configure_location()#
Configures correct locations for this arena
robosuite.models.arenas.empty_arena module#
robosuite.models.arenas.pegs_arena module#
- class robosuite.models.arenas.pegs_arena.PegsArena(table_full_size=(0.45, 0.69, 0.05), table_friction=(1, 0.005, 0.0001), table_offset=(0, 0, 0))#
Bases:
TableArena
Workspace that contains a tabletop with two fixed pegs.
- Parameters:
table_full_size (3-tuple) – (L,W,H) full dimensions of the table
table_friction (3-tuple) – (sliding, torsional, rolling) friction parameters of the table
table_offset (3-tuple) – (x,y,z) offset from center of arena when placing table. Note that the z value sets the upper limit of the table
robosuite.models.arenas.table_arena module#
- class robosuite.models.arenas.table_arena.TableArena(table_full_size=(0.8, 0.8, 0.05), table_friction=(1, 0.005, 0.0001), table_offset=(0, 0, 0.8), has_legs=True, xml='arenas/table_arena.xml')#
Bases:
Arena
Workspace that contains an empty table.
- Parameters:
table_full_size (3-tuple) – (L,W,H) full dimensions of the table
table_friction (3-tuple) – (sliding, torsional, rolling) friction parameters of the table
table_offset (3-tuple) – (x,y,z) offset from center of arena when placing table. Note that the z value sets the upper limit of the table
has_legs (bool) – whether the table has legs or not
xml (str) – xml file to load arena
- configure_location()#
Configures correct locations for this arena
- property table_top_abs#
Grabs the absolute position of table top
- Returns:
(x,y,z) table position
- Return type:
np.array
robosuite.models.arenas.wipe_arena module#
- class robosuite.models.arenas.wipe_arena.WipeArena(table_full_size=(0.8, 0.8, 0.05), table_friction=(0.01, 0.005, 0.0001), table_offset=(0, 0, 0.8), coverage_factor=0.9, num_markers=10, table_friction_std=0, line_width=0.02, two_clusters=False)#
Bases:
TableArena
Workspace that contains an empty table with visual markers on its surface.
- Parameters:
table_full_size (3-tuple) – (L,W,H) full dimensions of the table
table_friction (3-tuple) – (sliding, torsional, rolling) friction parameters of the table
table_offset (3-tuple) – (x,y,z) offset from center of arena when placing table. Note that the z value sets the upper limit of the table
coverage_factor (float) – Fraction of table that will be sampled for dirt placement
num_markers (int) – Number of dirt (peg) particles to generate in a path on the table
table_friction_std (float) – Standard deviation to sample for the peg friction
line_width (float) – Diameter of dirt path trace
two_clusters (bool) – If set, will generate two separate dirt paths with half the number of sensors in each
- configure_location()#
Configures correct locations for this arena
- reset_arena(sim)#
Reset the visual marker locations in the environment. Requires @sim (MjSim) reference to be passed in so that the Mujoco sim can be directly modified
- Parameters:
sim (MjSim) – Simulation instance containing this arena and visual markers
- sample_path_pos(pos)#
Helper function to add a sampled dirt (peg) position to a pre-existing dirt path, whose most recent dirt position is defined by @pos
- Parameters:
pos (np.array) – (x,y) value of most recent dirt position
- Returns:
the (x,y) value of the newly sampled dirt position to add to the current dirt path
- Return type:
np.array
- sample_start_pos()#
Helper function to return sampled start position of a new dirt (peg) location
- Returns:
the (x,y) value of the newly sampled dirt starting location
- Return type:
np.array