Skip to main content

Dexmate Robot Configuration Utilities

Python

Type-safe dataclass configurations and a unified interface for accessing Dexmate robot information.

Installation

pip install dexbot-utils

Usage

RobotInfo (Recommended)

from dexbot_utils import RobotInfo

# Load by variant name
robot = RobotInfo("vega_1")

# Basic properties
print(robot.robot_model)     # "vega_1"
print(robot.robot_type)      # "vega"
print(robot.robot_version)   # "1"

# Component access
print(robot.has_left_arm)    # True
print(robot.get_component_list())
# ['left_arm', 'right_arm', 'torso', 'chassis', 'head', ...]

# Get component details
joints = robot.get_component_joints("left_arm")
# ['L_arm_j1', 'L_arm_j2', ..., 'L_arm_j7']

dof = robot.get_component_dof("left_arm")  # 7

# Access component config directly
arm_config = robot.get_component_config("left_arm")
print(arm_config.side)       # "left"
print(arm_config.pv_mode)    # False

# URDF queries (if URDF is loaded)
# URDF queries (if URDF is loaded)
if robot.has_urdf:
    joint_limits = robot.get_joint_limits()
    pos_limits = robot.get_joint_pos_limits()
    vel_limits = robot.get_joint_vel_limits()
    link_names = robot.get_link_names()

Environment Variables

Load configuration from environment:

export ROBOT_CONFIG=vega_1
# or derive from robot name
export ROBOT_NAME=dm/vgabcd123456-1  # -> vega_1
robot = RobotInfo()  # auto-loads from env

Direct Config Access

For direct access to configuration dataclasses:

from dexbot_utils.configs import get_robot_config, get_available_variants

# List available variants
variants = get_available_variants()
# ['vega_1', 'vega_1_gripper', ...]

# Get config directly
config = get_robot_config("vega_1")
left_arm = config.components["left_arm"]
print(left_arm.joints)

CLI

# List available configurations
# List available configurations
dexbot cfg list

# Show configuration details
dexbot cfg show vega_1

Advance Usage: Adding New Configs

1. Create Component Configs

Define components in configs/components/your_robot/:

# configs/components/my_robot/arm.py
from dataclasses import dataclass
from ..base import BaseJointComponentConfig

@dataclass
class MyArmConfig(BaseJointComponentConfig):
    side: str = "left"
    pv_mode: bool = False

    @property
    def joints(self) -> list[str]:
        prefix = "L" if self.side == "left" else "R"
        return [f"{prefix}_arm_j{i}" for i in range(1, 8)]

2. Create Robot Config

Define the robot in configs/robots/ with @register_variant:

# configs/robots/my_robot.py
from dataclasses import dataclass, field
from ..registry import register_variant
from ..components.my_robot import MyArmConfig
from .base import BaseRobotConfig, BaseComponentConfig

@register_variant("my_robot")
@dataclass
class MyRobotConfig(BaseRobotConfig):
    robot_model: str = "my_robot"
    abbr: str = "mr"
    urdf_path: str = "robots/my_robot/robot.urdf"

    components: dict[str, BaseComponentConfig] = field(
        default_factory=lambda: {
            "left_arm": MyArmConfig(side="left"),
            "right_arm": MyArmConfig(side="right"),
        }
    )

3. Register

Import in configs/robots/__init__.py:

from .my_robot import MyRobotConfig

Now use it:

robot = RobotInfo("my_robot")

Development

Setup

# Install dev dependencies
pip install -e ".[dev]"

# Setup pre-commit hooks
prek install

Licensing

This project is dual-licensed:

Open Source License

This software is available under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

Commercial License

For businesses that want to use this software in proprietary applications without the AGPL requirements, commercial licenses are available.


🤝 Ready to build amazing robots?

📧 Contact Us

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dexbot_utils-0.5.1-py3-none-any.whl (57.3 kB view details)

Uploaded Python 3

File details

Details for the file dexbot_utils-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: dexbot_utils-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 57.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for dexbot_utils-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c08c9facc664c5d6b8e81ca613010bf3fae3bd130bc97167e1de583d16385330
MD5 ebb24fb92ed729f5033bd21b6775fb35
BLAKE2b-256 3d01ac9675173168929e80e0be89561ec1e261cf7cecef7733dde85a33851f66

See more details on using hashes here.

Provenance

The following attestation bundles were made for dexbot_utils-0.5.1-py3-none-any.whl:

Publisher: pypi.yml on dexmate-ai/dexbot-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.2

1 file

This release

0.5.1 This release

1 file

0.5.0

1 file

0.4.5

1 file

0.4.4

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.4.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page