Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:ARISE Initiative Robosuite Choose Environment And Robots

From Leeroopedia
Attribute Value
sources ARISE Initiative robosuite
domains Robotics_Simulation, Configuration
last_updated 2026-02-15 12:00 GMT

Overview

Concrete tool for interactive environment and robot selection provided by the robosuite utilities module.

Description

The robosuite.utils.input_utils module provides two key functions for interactive configuration of robosuite simulations:

choose_environment(): This function provides a command-line interface for environment selection. It queries the REGISTERED_ENVS dictionary to retrieve all available environment names, prints them in a formatted list, and prompts the user to select one. The function returns the user's selection as a string that can be directly passed to robosuite.make().

choose_robots(): This function provides robot selection with built-in filtering capabilities. It accesses the REGISTERED_ROBOTS registry and applies filters based on robot morphology type. The function supports three filtering parameters:

  • exclude_bimanual: Removes two-armed robots from the selection menu
  • use_humanoids: Shows only humanoid robot models
  • exclude_single_arm: Removes single-arm robots from options

The filtering logic enables task-specific robot selection. For example, a manipulation task requiring precise single-arm control can exclude bimanual and humanoid options, presenting users with only relevant choices.

Both functions handle user input validation and provide clear error messages for invalid selections, making them robust choices for interactive scripts and educational materials.

Usage

Import these functions when building interactive scripts that need user input for environment and robot selection, or use them for configuration at the start of any robosuite workflow.

These utilities are particularly valuable in:

  • Interactive demonstrations: Allow users to explore different scenarios
  • Educational notebooks: Let students experiment with various configurations
  • Prototyping scripts: Quickly test different environment-robot combinations
  • Configuration workflows: Standardize the setup phase of robosuite applications

The functions integrate seamlessly with the robosuite.make() factory function, creating a smooth workflow from selection to instantiation.

Code Reference

Source Location

Function Signatures

choose_environment:

def choose_environment():
    """
    Prints out environment options, and returns the selected env_name choice
    Returns:
        str: Chosen environment name
    """

choose_robots:

def choose_robots(exclude_bimanual=False, use_humanoids=False, exclude_single_arm=False):
    """
    Prints out robot options, and returns the requested robot.
    Args:
        exclude_bimanual (bool): If set, excludes bimanual robots
        use_humanoids (bool): If set, use humanoid robots
        exclude_single_arm (bool): If set, excludes single-arm robots
    Returns:
        str: Requested robot name
    """

Import Statement

from robosuite.utils.input_utils import choose_environment, choose_robots

I/O Contract

Inputs

Function Parameter Type Required Description
choose_environment (none) - - No parameters required
choose_robots exclude_bimanual bool No If True, excludes bimanual robots from selection
choose_robots use_humanoids bool No If True, shows only humanoid robots
choose_robots exclude_single_arm bool No If True, excludes single-arm robots from selection

Outputs

Function Return Type Description
choose_environment str Name of the selected environment (e.g., "Lift", "PickPlace")
choose_robots str Name of the selected robot (e.g., "Panda", "Sawyer", "Baxter")

Usage Examples

Complete Interactive Workflow

This example demonstrates the full workflow of interactively selecting an environment and robot, then using those selections to create a simulation:

from robosuite.utils.input_utils import choose_environment, choose_robots
import robosuite

# 1. Select environment interactively
env_name = choose_environment()

# 2. Select robot interactively (exclude bimanual)
robot_name = choose_robots(exclude_bimanual=True)

# 3. Use selections to create environment
env = robosuite.make(
    env_name,
    robots=robot_name,
    has_renderer=True,
    control_freq=20,
)

Filtering for Single-Arm Tasks

from robosuite.utils.input_utils import choose_environment, choose_robots
import robosuite

# Select environment
env_name = choose_environment()

# Select only single-arm robots (exclude bimanual and humanoid)
robot_name = choose_robots(
    exclude_bimanual=True,
    exclude_single_arm=False
)

# Create environment with single-arm robot
env = robosuite.make(
    env_name,
    robots=robot_name,
    has_renderer=False,
    control_freq=20,
)

Humanoid Robot Selection

from robosuite.utils.input_utils import choose_environment, choose_robots
import robosuite

# Select environment suitable for humanoids
env_name = choose_environment()

# Select from humanoid robots only
robot_name = choose_robots(use_humanoids=True)

# Create environment with humanoid
env = robosuite.make(
    env_name,
    robots=robot_name,
    has_renderer=True,
    control_freq=20,
)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment