Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:ARISE Initiative Robosuite ConeObject

From Leeroopedia
Revision as of 11:59, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/ARISE_Initiative_Robosuite_ConeObject.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Robotics, Simulation, MJCF_Modeling
Last Updated 2026-02-15 07:00 GMT

Overview

ConeObject is a composite object that generates an approximate cone shape by stacking cylinder or box geoms of decreasing radius along the vertical axis.

Description

The ConeObject class extends CompositeObject to procedurally generate a cone-shaped object that approximates a true cone using a stack of primitive MuJoCo geometries. Since MuJoCo does not natively support cone primitives, this class stacks ngeoms cylinders (or boxes if use_box=True) vertically, each with a linearly interpolated radius between the outer_radius (base) and inner_radius (tip). The number of geoms is forced to be odd for symmetric computation.

Each geom layer has a uniform half-height computed as (height / ngeoms) / 2, and the radius decreases linearly from the base to the tip using a step size of (outer_radius - inner_radius) / (ngeoms - 1). The geoms are stacked symmetrically around the center in the z-direction, with the largest radius at the bottom and smallest at the top. When use_box=True, the result is a square pyramid approximation rather than a circular cone.

The object supports optional materials (must be a CustomMaterial instance), configurable density (default 1000 kg/m^3), friction, and MuJoCo solver parameters (solref and solimp). All geoms have condim=4 for consistency with other rounded objects in robosuite. A center site is included for reference point tracking.

Usage

Use ConeObject when you need a cone-shaped or pyramid-shaped object in simulation, such as for stacking tasks, insertion tasks, or as visual markers. Increase ngeoms for smoother cone approximation at the cost of more geoms in the simulation.

Code Reference

Source Location

Signature

class ConeObject(CompositeObject):
    def __init__(
        self,
        name,
        outer_radius=0.0425,
        inner_radius=0.03,
        height=0.05,
        ngeoms=8,
        use_box=False,
        rgba=None,
        material=None,
        density=1000.0,
        solref=(0.02, 1.0),
        solimp=(0.9, 0.95, 0.001),
        friction=None,
    ):

Import

from robosuite.models.objects.composite.cone import ConeObject

I/O Contract

Inputs

Name Type Required Description
name str Yes Name of this Cone object
outer_radius float No Radius of cone base. Default: 0.0425
inner_radius float No Radius of cone tip. Default: 0.03
height float No Height of cone. Default: 0.05
ngeoms int No Number of geoms for approximation (forced to odd). Default: 8 (becomes 9)
use_box bool No If True, use box geoms (square pyramid). Default: False (cylinders)
rgba tuple(4) or None No RGBA color values. Default: None
material CustomMaterial or None No Material for geom appearance. Default: None
density float No Density value for all geoms. Default: 1000.0
solref tuple(2) No MuJoCo solver reference parameters. Default: (0.02, 1.0)
solimp tuple(3) No MuJoCo solver impedance parameters. Default: (0.9, 0.95, 0.001)
friction tuple(3) or None No Friction values. Default: None

Outputs

Name Type Description
ConeObject instance CompositeObject Approximate cone object composed of stacked cylinder or box geoms

Usage Examples

from robosuite.models.objects.composite.cone import ConeObject

# Create a default cone
cone = ConeObject(name="my_cone")

# Create a taller cone with more geom approximation
cone = ConeObject(
    name="tall_cone",
    outer_radius=0.06,
    inner_radius=0.01,
    height=0.10,
    ngeoms=16,
    rgba=(1.0, 0.0, 0.0, 1.0),
)

# Create a square pyramid
pyramid = ConeObject(
    name="pyramid",
    outer_radius=0.05,
    inner_radius=0.01,
    height=0.08,
    ngeoms=10,
    use_box=True,
)

Related Pages

Page Connections

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