dexcontrol 0.2.1__py3-none-any.whl → 0.2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dexcontrol might be problematic. Click here for more details.
- dexcontrol/__init__.py +14 -3
- dexcontrol/apps/dualsense_teleop_base.py +16 -11
- dexcontrol/config/__init__.py +10 -5
- dexcontrol/config/core/__init__.py +8 -3
- dexcontrol/config/core/arm.py +8 -3
- dexcontrol/config/core/chassis.py +10 -5
- dexcontrol/config/core/hand.py +14 -9
- dexcontrol/config/core/head.py +8 -3
- dexcontrol/config/core/misc.py +8 -3
- dexcontrol/config/core/torso.py +8 -3
- dexcontrol/config/sensors/__init__.py +8 -3
- dexcontrol/config/sensors/cameras/__init__.py +9 -4
- dexcontrol/config/sensors/cameras/rgb_camera.py +18 -5
- dexcontrol/config/sensors/cameras/zed_camera.py +36 -0
- dexcontrol/config/sensors/imu/__init__.py +10 -5
- dexcontrol/config/sensors/imu/chassis_imu.py +21 -0
- dexcontrol/config/sensors/imu/zed_imu.py +21 -0
- dexcontrol/config/sensors/lidar/__init__.py +8 -3
- dexcontrol/config/sensors/lidar/rplidar.py +9 -3
- dexcontrol/config/sensors/ultrasonic/__init__.py +8 -3
- dexcontrol/config/sensors/ultrasonic/ultrasonic.py +9 -3
- dexcontrol/config/sensors/vega_sensors.py +34 -21
- dexcontrol/config/vega.py +14 -6
- dexcontrol/core/__init__.py +9 -0
- dexcontrol/core/arm.py +21 -6
- dexcontrol/core/chassis.py +8 -3
- dexcontrol/core/component.py +26 -6
- dexcontrol/core/hand.py +8 -3
- dexcontrol/core/head.py +18 -3
- dexcontrol/core/misc.py +94 -16
- dexcontrol/core/torso.py +8 -3
- dexcontrol/proto/dexcontrol_msg_pb2.py +17 -15
- dexcontrol/proto/dexcontrol_msg_pb2.pyi +24 -0
- dexcontrol/robot.py +82 -28
- dexcontrol/sensors/__init__.py +13 -8
- dexcontrol/sensors/camera/__init__.py +11 -6
- dexcontrol/sensors/camera/rgb_camera.py +33 -24
- dexcontrol/sensors/camera/zed_camera.py +364 -0
- dexcontrol/sensors/imu/__init__.py +13 -8
- dexcontrol/sensors/imu/chassis_imu.py +155 -0
- dexcontrol/sensors/imu/{nine_axis_imu.py → zed_imu.py} +41 -26
- dexcontrol/sensors/lidar/__init__.py +11 -1
- dexcontrol/sensors/lidar/rplidar.py +8 -3
- dexcontrol/sensors/manager.py +22 -9
- dexcontrol/sensors/ultrasonic.py +8 -3
- dexcontrol/utils/__init__.py +8 -3
- dexcontrol/utils/constants.py +10 -0
- dexcontrol/utils/io_utils.py +8 -3
- dexcontrol/utils/motion_utils.py +8 -3
- dexcontrol/utils/os_utils.py +23 -4
- dexcontrol/utils/pb_utils.py +8 -3
- dexcontrol/utils/rate_limiter.py +8 -3
- dexcontrol/utils/rtc_utils.py +144 -0
- dexcontrol/utils/subscribers/__init__.py +11 -3
- dexcontrol/utils/subscribers/base.py +26 -5
- dexcontrol/utils/subscribers/camera.py +10 -6
- dexcontrol/utils/subscribers/decoders.py +8 -3
- dexcontrol/utils/subscribers/generic.py +8 -3
- dexcontrol/utils/subscribers/imu.py +8 -3
- dexcontrol/utils/subscribers/lidar.py +8 -3
- dexcontrol/utils/subscribers/protobuf.py +8 -3
- dexcontrol/utils/subscribers/rtc.py +315 -0
- dexcontrol/utils/timer.py +8 -3
- dexcontrol/utils/trajectory_utils.py +8 -3
- dexcontrol/utils/viz_utils.py +8 -3
- dexcontrol/utils/zenoh_utils.py +83 -0
- dexcontrol-0.2.3.dist-info/METADATA +265 -0
- dexcontrol-0.2.3.dist-info/RECORD +72 -0
- {dexcontrol-0.2.1.dist-info → dexcontrol-0.2.3.dist-info}/WHEEL +1 -2
- dexcontrol-0.2.3.dist-info/licenses/LICENSE +184 -0
- dexcontrol/config/sensors/cameras/gemini_camera.py +0 -16
- dexcontrol/config/sensors/imu/gemini_imu.py +0 -15
- dexcontrol/config/sensors/imu/nine_axis_imu.py +0 -15
- dexcontrol/sensors/camera/gemini_camera.py +0 -139
- dexcontrol/sensors/imu/gemini_imu.py +0 -139
- dexcontrol/utils/reset_orbbec_camera_usb.py +0 -98
- dexcontrol-0.2.1.dist-info/METADATA +0 -369
- dexcontrol-0.2.1.dist-info/RECORD +0 -72
- dexcontrol-0.2.1.dist-info/licenses/LICENSE +0 -188
- dexcontrol-0.2.1.dist-info/licenses/NOTICE +0 -13
- dexcontrol-0.2.1.dist-info/top_level.txt +0 -1
dexcontrol/__init__.py
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
10
|
+
# See README.md for details
|
|
5
11
|
|
|
6
12
|
"""DexControl: Robot Control Interface Library.
|
|
7
13
|
|
|
@@ -15,6 +21,9 @@ import os
|
|
|
15
21
|
from pathlib import Path
|
|
16
22
|
from typing import Final
|
|
17
23
|
|
|
24
|
+
from loguru import logger
|
|
25
|
+
from rich.logging import RichHandler
|
|
26
|
+
|
|
18
27
|
# DO NOT REMOVE this following import, it is needed for hydra to find the config
|
|
19
28
|
import dexcontrol.config # pylint: disable=unused-import
|
|
20
29
|
from dexcontrol.robot import Robot
|
|
@@ -24,6 +33,8 @@ from dexcontrol.utils.constants import COMM_CFG_PATH_ENV_VAR
|
|
|
24
33
|
LIB_PATH: Final[Path] = Path(__file__).resolve().parent
|
|
25
34
|
CFG_PATH: Final[Path] = LIB_PATH / "config"
|
|
26
35
|
|
|
36
|
+
logger.configure(handlers=[{"sink": RichHandler(markup=True), "format": "{message}"}])
|
|
37
|
+
|
|
27
38
|
|
|
28
39
|
def get_comm_cfg_path() -> Path:
|
|
29
40
|
default_path = list(
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
"""DualSense controller teleoperation base module.
|
|
7
12
|
|
|
@@ -10,9 +15,9 @@ with safety features, emergency stop handling, and customizable control mappings
|
|
|
10
15
|
"""
|
|
11
16
|
|
|
12
17
|
import threading
|
|
18
|
+
import time
|
|
13
19
|
from abc import ABC, abstractmethod
|
|
14
20
|
from enum import Enum
|
|
15
|
-
import time
|
|
16
21
|
|
|
17
22
|
from dualsense_controller import DualSenseController
|
|
18
23
|
from loguru import logger
|
|
@@ -31,10 +36,10 @@ class ControlMode(Enum):
|
|
|
31
36
|
|
|
32
37
|
class ButtonState:
|
|
33
38
|
"""Class to track button state with debouncing."""
|
|
34
|
-
|
|
39
|
+
|
|
35
40
|
def __init__(self, debounce_time: float = 0.05):
|
|
36
41
|
"""Initialize button state.
|
|
37
|
-
|
|
42
|
+
|
|
38
43
|
Args:
|
|
39
44
|
debounce_time: Time in seconds to wait before considering a state change valid.
|
|
40
45
|
"""
|
|
@@ -43,10 +48,10 @@ class ButtonState:
|
|
|
43
48
|
self._last_change_time = 0.0
|
|
44
49
|
self._debounce_time = debounce_time
|
|
45
50
|
self._lock = threading.Lock()
|
|
46
|
-
|
|
51
|
+
|
|
47
52
|
def update(self, new_state: bool) -> None:
|
|
48
53
|
"""Update the button state with debouncing.
|
|
49
|
-
|
|
54
|
+
|
|
50
55
|
Args:
|
|
51
56
|
new_state: New raw button state.
|
|
52
57
|
"""
|
|
@@ -55,11 +60,11 @@ class ButtonState:
|
|
|
55
60
|
if new_state != self._raw_state:
|
|
56
61
|
self._last_change_time = current_time
|
|
57
62
|
self._raw_state = new_state
|
|
58
|
-
|
|
63
|
+
|
|
59
64
|
# Only update debounced state if enough time has passed
|
|
60
65
|
if current_time - self._last_change_time >= self._debounce_time:
|
|
61
66
|
self._debounced_state = self._raw_state
|
|
62
|
-
|
|
67
|
+
|
|
63
68
|
@property
|
|
64
69
|
def state(self) -> bool:
|
|
65
70
|
"""Get the current debounced button state."""
|
|
@@ -189,7 +194,7 @@ class DualSenseTeleopBase(ABC):
|
|
|
189
194
|
|
|
190
195
|
def _update_button_state(self, button: str, state: bool) -> None:
|
|
191
196
|
"""Update the state of a button with debouncing.
|
|
192
|
-
|
|
197
|
+
|
|
193
198
|
Args:
|
|
194
199
|
button: Name of the button being updated.
|
|
195
200
|
state: New raw button state.
|
dexcontrol/config/__init__.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from hydra.core.config_store import ConfigStore
|
|
7
12
|
|
|
@@ -10,5 +15,5 @@ from .vega import Vega1Config, VegaConfig
|
|
|
10
15
|
# Register the configs
|
|
11
16
|
cs = ConfigStore.instance()
|
|
12
17
|
cs.store(name="vega", node=VegaConfig)
|
|
13
|
-
cs.store(name="
|
|
14
|
-
cs.store(name="
|
|
18
|
+
cs.store(name="vega-rc2", node=VegaConfig)
|
|
19
|
+
cs.store(name="vega-1", node=Vega1Config)
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from .arm import ArmConfig
|
|
7
12
|
from .chassis import ChassisConfig
|
dexcontrol/config/core/arm.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass, field
|
|
7
12
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass, field
|
|
7
12
|
|
|
@@ -15,8 +20,8 @@ class ChassisConfig:
|
|
|
15
20
|
center_to_wheel_axis_dist: float = (
|
|
16
21
|
0.219 # the distance between base center and wheel axis in m
|
|
17
22
|
)
|
|
18
|
-
wheels_dist: float = 0.
|
|
23
|
+
wheels_dist: float = 0.45 # the distance between two wheels in m (0.41 for vega-rc2, 0.45 for vega-1)
|
|
19
24
|
joint_name: list[str] = field(
|
|
20
25
|
default_factory=lambda: ["L_wheel_j1", "L_wheel_j2", "R_wheel_j1", "R_wheel_j2"]
|
|
21
26
|
)
|
|
22
|
-
max_vel: float = 0.
|
|
27
|
+
max_vel: float = 0.8
|
dexcontrol/config/core/hand.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass, field
|
|
7
12
|
|
|
@@ -28,15 +33,15 @@ class HandConfig:
|
|
|
28
33
|
default_factory=lambda: ["th_j1", "ff_j1", "mf_j1", "rf_j1", "lf_j1", "th_j0"]
|
|
29
34
|
)
|
|
30
35
|
joint_pos_open: list[float] = field(
|
|
31
|
-
default_factory=lambda: [0.
|
|
36
|
+
default_factory=lambda: [0.1834, 0.2891, 0.2801, 0.284, 0.2811, -0.0158]
|
|
32
37
|
)
|
|
33
38
|
joint_pos_close: list[float] = field(
|
|
34
39
|
default_factory=lambda: [
|
|
35
|
-
-0.
|
|
36
|
-
-1.
|
|
37
|
-
-1.
|
|
38
|
-
-1.
|
|
39
|
-
-1.
|
|
40
|
+
-0.3468,
|
|
41
|
+
-1.0946,
|
|
42
|
+
-1.0844,
|
|
43
|
+
-1.0154,
|
|
44
|
+
-1.0118,
|
|
40
45
|
1.6,
|
|
41
46
|
]
|
|
42
47
|
)
|
dexcontrol/config/core/head.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass, field
|
|
7
12
|
|
dexcontrol/config/core/misc.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
"""Miscellaneous robot component configurations."""
|
|
7
12
|
|
dexcontrol/config/core/torso.py
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass, field
|
|
7
12
|
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
|
-
from .gemini_camera import GeminiCameraConfig
|
|
7
11
|
from .rgb_camera import RGBCameraConfig
|
|
12
|
+
from .zed_camera import ZedCameraConfig
|
|
@@ -1,15 +1,28 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
|
-
from dataclasses import dataclass
|
|
11
|
+
from dataclasses import dataclass, field
|
|
7
12
|
|
|
8
13
|
|
|
9
14
|
@dataclass
|
|
10
15
|
class RGBCameraConfig:
|
|
11
16
|
_target_: str = "dexcontrol.sensors.camera.rgb_camera.RGBCameraSensor"
|
|
12
|
-
topic: str = "/camera/rgb"
|
|
13
17
|
name: str = "rgb_camera"
|
|
14
18
|
enable_fps_tracking: bool = False
|
|
15
19
|
fps_log_interval: int = 30
|
|
20
|
+
enable: bool = False
|
|
21
|
+
subscriber_config: dict = field(
|
|
22
|
+
default_factory=lambda: dict(
|
|
23
|
+
rgb=dict(
|
|
24
|
+
enable=True,
|
|
25
|
+
info_key="camera/rgb/info",
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
|
+
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
10
|
+
|
|
11
|
+
from dataclasses import dataclass, field
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class ZedCameraConfig:
|
|
16
|
+
_target_: str = "dexcontrol.sensors.camera.zed_camera.ZedCameraSensor"
|
|
17
|
+
name: str = "zed_camera"
|
|
18
|
+
enable_fps_tracking: bool = False
|
|
19
|
+
fps_log_interval: int = 30
|
|
20
|
+
enable: bool = False
|
|
21
|
+
subscriber_config: dict = field(
|
|
22
|
+
default_factory=lambda: dict(
|
|
23
|
+
left_rgb=dict(
|
|
24
|
+
enable=True,
|
|
25
|
+
info_key="camera/head/left_rgb/info",
|
|
26
|
+
),
|
|
27
|
+
right_rgb=dict(
|
|
28
|
+
enable=True,
|
|
29
|
+
info_key="camera/head/right_rgb/info",
|
|
30
|
+
),
|
|
31
|
+
depth=dict(
|
|
32
|
+
enable=True,
|
|
33
|
+
topic="camera/head/depth",
|
|
34
|
+
),
|
|
35
|
+
)
|
|
36
|
+
)
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
10
|
+
from .chassis_imu import ChassisIMUConfig
|
|
11
|
+
from .zed_imu import ZedIMUConfig
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
|
+
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
10
|
+
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class ChassisIMUConfig:
|
|
16
|
+
_target_: str = "dexcontrol.sensors.imu.chassis_imu.ChassisIMUSensor"
|
|
17
|
+
topic: str = "state/chassis_imu"
|
|
18
|
+
name: str = "chassis_imu"
|
|
19
|
+
enable_fps_tracking: bool = False
|
|
20
|
+
fps_log_interval: int = 30
|
|
21
|
+
enable: bool = False
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
|
+
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
10
|
+
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class ZedIMUConfig:
|
|
16
|
+
_target_: str = "dexcontrol.sensors.imu.zed_imu.ZedIMUSensor"
|
|
17
|
+
topic: str = "/imu/head_camera"
|
|
18
|
+
name: str = "head_camera_imu"
|
|
19
|
+
enable_fps_tracking: bool = False
|
|
20
|
+
fps_log_interval: int = 30
|
|
21
|
+
enable: bool = False
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from .rplidar import RPLidarConfig
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass
|
|
7
12
|
|
|
@@ -13,3 +18,4 @@ class RPLidarConfig:
|
|
|
13
18
|
name: str = "rplidar"
|
|
14
19
|
enable_fps_tracking: bool = False
|
|
15
20
|
fps_log_interval: int = 30
|
|
21
|
+
enable: bool = False
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from .ultrasonic import UltraSonicConfig
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass
|
|
7
12
|
|
|
@@ -13,3 +18,4 @@ class UltraSonicConfig:
|
|
|
13
18
|
name: str = "ultrasonic"
|
|
14
19
|
enable_fps_tracking: bool = False
|
|
15
20
|
fps_log_interval: int = 30
|
|
21
|
+
enable: bool = False
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
"""Configuration dataclass for Vega robot sensors.
|
|
7
12
|
|
|
@@ -13,24 +18,29 @@ LiDAR and ultrasonic sensors.
|
|
|
13
18
|
from collections.abc import Callable
|
|
14
19
|
from dataclasses import dataclass, field
|
|
15
20
|
|
|
16
|
-
from .cameras import
|
|
17
|
-
from .imu import
|
|
21
|
+
from .cameras import RGBCameraConfig, ZedCameraConfig
|
|
22
|
+
from .imu import ChassisIMUConfig, ZedIMUConfig
|
|
18
23
|
from .lidar import RPLidarConfig
|
|
19
24
|
from .ultrasonic import UltraSonicConfig
|
|
20
25
|
|
|
21
26
|
|
|
22
|
-
def _make_rgb_camera(
|
|
27
|
+
def _make_rgb_camera(name: str) -> Callable[[], RGBCameraConfig]:
|
|
23
28
|
"""Helper function to create RGB camera config factory.
|
|
24
29
|
|
|
25
30
|
Args:
|
|
26
|
-
topic: Camera topic name
|
|
27
31
|
name: Camera instance name
|
|
28
32
|
|
|
29
33
|
Returns:
|
|
30
34
|
Factory function that creates an RGBCameraConfig
|
|
31
35
|
"""
|
|
32
36
|
return lambda: RGBCameraConfig(
|
|
33
|
-
|
|
37
|
+
subscriber_config=dict(
|
|
38
|
+
rgb=dict(
|
|
39
|
+
enable=True,
|
|
40
|
+
info_key=f"camera/base/{name}/rgb/info",
|
|
41
|
+
)
|
|
42
|
+
),
|
|
43
|
+
name=f"base_{name}_camera",
|
|
34
44
|
)
|
|
35
45
|
|
|
36
46
|
|
|
@@ -39,27 +49,30 @@ class VegaSensorsConfig:
|
|
|
39
49
|
"""Configuration for all sensors on the Vega robot.
|
|
40
50
|
|
|
41
51
|
Contains default configurations for:
|
|
42
|
-
- Head camera (
|
|
52
|
+
- Head camera (Zed)
|
|
43
53
|
- Base cameras (RGB) - left, right, front, back
|
|
44
|
-
- IMUs - base
|
|
54
|
+
- IMUs - base and head (Zed)
|
|
45
55
|
- LiDAR
|
|
46
56
|
- Ultrasonic sensors
|
|
47
57
|
"""
|
|
48
58
|
|
|
49
|
-
head_camera:
|
|
50
|
-
base_left_camera: RGBCameraConfig = field(
|
|
51
|
-
default_factory=_make_rgb_camera("left", "left")
|
|
52
|
-
)
|
|
59
|
+
head_camera: ZedCameraConfig = field(default_factory=ZedCameraConfig)
|
|
60
|
+
base_left_camera: RGBCameraConfig = field(default_factory=_make_rgb_camera("left"))
|
|
53
61
|
base_right_camera: RGBCameraConfig = field(
|
|
54
|
-
default_factory=_make_rgb_camera("right"
|
|
62
|
+
default_factory=_make_rgb_camera("right")
|
|
55
63
|
)
|
|
56
64
|
base_front_camera: RGBCameraConfig = field(
|
|
57
|
-
default_factory=_make_rgb_camera("front"
|
|
65
|
+
default_factory=_make_rgb_camera("front")
|
|
58
66
|
)
|
|
59
|
-
base_back_camera: RGBCameraConfig = field(
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
base_imu: NineAxisIMUConfig = field(default_factory=NineAxisIMUConfig)
|
|
63
|
-
head_imu: GeminiIMUConfig = field(default_factory=GeminiIMUConfig)
|
|
67
|
+
base_back_camera: RGBCameraConfig = field(default_factory=_make_rgb_camera("back"))
|
|
68
|
+
base_imu: ChassisIMUConfig = field(default_factory=ChassisIMUConfig)
|
|
69
|
+
head_imu: ZedIMUConfig = field(default_factory=ZedIMUConfig)
|
|
64
70
|
lidar: RPLidarConfig = field(default_factory=RPLidarConfig)
|
|
65
71
|
ultrasonic: UltraSonicConfig = field(default_factory=UltraSonicConfig)
|
|
72
|
+
|
|
73
|
+
def __post_init__(self) -> None:
|
|
74
|
+
self.head_camera.enable = False
|
|
75
|
+
self.base_left_camera.enable = False
|
|
76
|
+
self.base_right_camera.enable = False
|
|
77
|
+
self.base_front_camera.enable = False
|
|
78
|
+
self.base_back_camera.enable = False
|
dexcontrol/config/vega.py
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
# Copyright (
|
|
1
|
+
# Copyright (C) 2025 Dexmate Inc.
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
3
|
+
# This software is dual-licensed:
|
|
4
|
+
#
|
|
5
|
+
# 1. GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
6
|
+
# See LICENSE-AGPL for details
|
|
7
|
+
#
|
|
8
|
+
# 2. Commercial License
|
|
9
|
+
# For commercial licensing terms, contact: contact@dexmate.ai
|
|
5
10
|
|
|
6
11
|
from dataclasses import dataclass, field
|
|
7
12
|
from typing import ClassVar
|
|
8
13
|
|
|
9
14
|
from omegaconf import OmegaConf
|
|
10
15
|
|
|
16
|
+
from dexcontrol.utils.os_utils import get_robot_model
|
|
17
|
+
|
|
11
18
|
from .core import (
|
|
12
19
|
ArmConfig,
|
|
13
20
|
BatteryConfig,
|
|
@@ -178,9 +185,10 @@ def get_vega_config(variant: str | None = None) -> VegaConfig:
|
|
|
178
185
|
Returns:
|
|
179
186
|
The configuration for the specified Vega robot variant as an OmegaConf object.
|
|
180
187
|
"""
|
|
181
|
-
if variant is None
|
|
182
|
-
|
|
183
|
-
|
|
188
|
+
if variant is None:
|
|
189
|
+
variant = get_robot_model()
|
|
190
|
+
|
|
191
|
+
if variant in VegaConfig._variants:
|
|
184
192
|
config_class = VegaConfig._variants[variant]
|
|
185
193
|
else:
|
|
186
194
|
raise ValueError(
|