Implementation:ARISE Initiative Robosuite MultiTableArena
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, MJCF_Modeling |
| Last Updated | 2026-02-15 07:00 GMT |
Overview
MultiTableArena is an arena class that procedurally generates a workspace containing multiple independently configured tables, each with customizable size, position, rotation, friction, and optional legs.
Description
The MultiTableArena class extends Arena to create workspaces with an arbitrary number of tables. The number of tables is inferred from the length of the table_offsets list. Each table can be independently configured with its own size, friction parameters, z-rotation, and leg presence. Parameters that accept either a single value or a list will be broadcast to all tables when a single value is provided.
Tables are generated during the _postprocess_arena() hook, which iterates over the table configurations and calls _add_table() for each one. Each table is created as a separate body element in the worldbody, containing a collision geom (group 0 with friction), a visual geom (group 1 with "table_ceramic" material), and a top site. The table body is positioned at the specified offset minus half its height, so the table_offsets z-value represents the table top surface height.
When legs are enabled for a table, four cylindrical leg geoms are added. The leg positions are intelligently adjusted: if a table dimension is large enough, legs are placed near the edges; otherwise, they are centered. Leg positions are rotated according to the table's z-rotation to maintain correct placement relative to the rotated table surface. The legs use the "table_legs_metal" material for visual rendering and have no physics interaction (visual group only).
The center_pos attribute stores the center positions of all tables (offset by half the table height), and configure_location() sets the floor position. Table half-sizes are automatically computed and stored in table_half_sizes for use by environments that need to place objects on specific tables.
Usage
Use MultiTableArena when your task requires multiple work surfaces, such as pick-and-place between tables, multi-station assembly tasks, or scenarios where objects need to be distributed across several surfaces.
Code Reference
Source Location
- Repository: ARISE_Initiative_Robosuite
- File: robosuite/models/arenas/multi_table_arena.py
Signature
class MultiTableArena(Arena):
def __init__(
self,
table_offsets,
table_rots=0,
table_full_sizes=(0.8, 0.8, 0.05),
table_frictions=(1, 0.005, 0.0001),
has_legs=True,
xml="arenas/multi_table_arena.xml",
)
Import
from robosuite.models.arenas.multi_table_arena import MultiTableArena
# Or via the package:
from robosuite.models.arenas import MultiTableArena
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| table_offsets | list of 3-array | Yes | (x, y, z) offset from arena center for each table. The z value sets the table top surface height. Number of tables inferred from list length. |
| table_rots | float or list of float | No | Z-rotation in radians for each table. Single value broadcast to all. Default: 0 |
| table_full_sizes | 3-array or list of 3-array | No | (L, W, H) full dimensions for each table. Single value broadcast to all. Default: (0.8, 0.8, 0.05) |
| table_frictions | 3-array or list of 3-array | No | (sliding, torsional, rolling) friction per table. Single value broadcast to all. Default: (1, 0.005, 0.0001) |
| has_legs | bool or list of bool | No | Whether each table has legs. Single value broadcast to all. Default: True |
| xml | str | No | XML file to load base arena from. Default: "arenas/multi_table_arena.xml" |
Outputs
| Name | Type | Description |
|---|---|---|
| n_tables | int | Number of tables in the arena |
| table_offsets | np.array | Array of (x, y, z) offsets for each table |
| table_full_sizes | np.array | Array of (L, W, H) full sizes for each table |
| table_half_sizes | np.array | Array of (L/2, W/2, H/2) half sizes for each table |
| table_rots | np.array | Array of z-rotations for each table |
| table_frictions | np.array | Array of friction parameters for each table |
| center_pos | np.array | Array of center positions (offset adjusted by half height) for each table |
Usage Examples
from robosuite.models.arenas import MultiTableArena
import numpy as np
# Create a workspace with two tables side by side
arena = MultiTableArena(
table_offsets=np.array([
[0.0, -0.5, 0.8], # Left table
[0.0, 0.5, 0.8], # Right table
]),
table_full_sizes=(0.6, 0.6, 0.05),
table_frictions=(1.0, 0.005, 0.0001),
has_legs=True,
)
# Create a workspace with tables of different sizes and rotations
arena = MultiTableArena(
table_offsets=np.array([
[-0.3, 0.0, 0.8],
[ 0.3, 0.0, 0.9],
[ 0.0, 0.5, 0.8],
]),
table_rots=[0, np.pi/4, 0],
table_full_sizes=[
(0.8, 0.8, 0.05),
(0.5, 0.5, 0.05),
(0.6, 0.6, 0.05),
],
has_legs=[True, True, False],
)
# Access table properties
print("Number of tables:", arena.n_tables)
print("Table centers:", arena.center_pos)
print("Table half sizes:", arena.table_half_sizes)