Skip to content

elastic_band: stiffness and damping are hard-coded, making it hard to use for heavier robots #125

Description

@michaellin6

The ElasticBand class in simulate_python/unitree_sdk2py_bridge.py (and equivalently in the C++ simulator) has its stiffness and damping values baked in:

class ElasticBand:
    def __init__(self):
        self.stiffness = 200
        self.damping = 100
        self.point = np.array([0, 0, 3])
        self.length = 0

For lighter robots like G1 these defaults work fine, but for heavier robots (e.g. H1/H2) a stiffness of 200 N/m is far too soft.

Proposed fix: expose elastic_band_stiffness, elastic_band_damping, and optionally elastic_band_attachment_height as config parameters in both config.yaml (C++ simulator) and config.py (Python simulator), alongside the existing enable_elastic_band flag.

Example (Python config.py):

ENABLE_ELASTIC_BAND = True
ELASTIC_BAND_STIFFNESS = 200   # N/m, increase for heavier robots
ELASTIC_BAND_DAMPING   = 100   # N·s/m
ELASTIC_BAND_HEIGHT    = 3.0   # m, attachment point height above origin

Example (C++ config.yaml):

enable_elastic_band: 1
elastic_band_stiffness: 200    # N/m
elastic_band_damping: 100      # N·s/m
elastic_band_height: 3.0       # m

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions