Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agent_context/topics/robot-system/robot-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ObjectBaseCfg uid, init_pos, init_rot, init_local_pose
│ disable_self_collision, init_qpos, body_scale,
│ build_pk_chain, use_usd_properties
└─ RobotCfg control_parts, urdf_cfg, solver_cfg, drive_pros (override default to "force")
├─ DexforceW1Cfg version, arm_kind, with_default_eef
├─ DexforceW1Cfg version, with_default_eef
└─ CobotMagicCfg (dual-arm defaults)
```

Expand All @@ -46,7 +46,7 @@ Key fields on `RobotCfg`:
| `solver_cfg` | `SolverCfg \| Dict[str, SolverCfg] \| None` | IK solver config; dict keys must match `control_parts` keys |
| `drive_pros` | `JointDrivePropertiesCfg` | Default drive type is `"force"` (overrides Articulation's `"none"`) |
| `attrs` | `RigidBodyAttributesCfg` | Rigid-body physics attributes (mass, friction, damping, ...) |
| variant fields | `enum \| str \| bool` | Optional subclass fields (e.g. `version`, `arm_kind`, `with_default_eef`) |
| variant fields | `enum \| str \| bool` | Optional subclass fields (e.g. `version`, `with_default_eef`) |
| `_pk_urdf_path` | `property \| method → str` | URDF for the FK/IK serial chain (one source, so it can't drift from sim) |

## The robot config protocol
Expand Down Expand Up @@ -134,7 +134,7 @@ Serialization (`to_dict` / `save_to_file`) is inherited — no need to implement

| Robot | Config Class | Module | Structure | Notes |
|---|---|---|---|---|
| DexForce W1 | `DexforceW1Cfg` | `embodichain/lab/sim/robots/dexforce_w1/` | Package (`cfg.py`, `types.py`, `params.py`, `utils.py`) | Humanoid; versions: V021; arm kinds: ANTHROPOMORPHIC, INDUSTRIAL; component types: chassis, torso, eyes, head, left/right arm/hand |
| DexForce W1 | `DexforceW1Cfg` | `embodichain/lab/sim/robots/dexforce_w1/` | Package (`cfg.py`, `types.py`, `params.py`, `utils.py`) | Humanoid; versioned chassis, torso, head, left/right arm and hand components |
| CobotMagic | `CobotMagicCfg` | `embodichain/lab/sim/robots/cobotmagic.py` | Single file | Dual-arm; 6-DOF arms + 2-DOF grippers; uses OPW solver |

## Common Failure Modes
Expand Down
Binary file not shown.
5 changes: 2 additions & 3 deletions docs/source/features/workspace_analyzer/workspace_analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ sim = SimulationManager(SimulationManagerCfg(headless=False, sim_device="cpu"))
# Add robot
robot = sim.add_robot(DexforceW1Cfg.from_dict({
"uid": "dexforce_w1",
"version": "v021",
"arm_kind": "industrial"
"version": "v021"
}))

# Quick analysis with defaults
Expand Down Expand Up @@ -175,7 +174,7 @@ sim = SimulationManager(SimulationManagerCfg(headless=False, sim_device="cpu"))

# Add robot
robot = sim.add_robot(DexforceW1Cfg.from_dict({
"uid": "dexforce_w1", "version": "v021", "arm_kind": "industrial"
"uid": "dexforce_w1", "version": "v021"
}))

# 1. Joint Space Analysis
Expand Down
2 changes: 1 addition & 1 deletion docs/source/guides/add_robot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Key parameters
| ``attrs`` | RigidBodyAttributesCfg | Rigid-body physics attributes |
+---------------------+----------------------------------+----------------------------------+
| variant fields | enum / str / bool | Optional subclass fields |
| | | (e.g. ``version``, ``arm_kind``) |
| | | (e.g. ``version``) |
+---------------------+----------------------------------+----------------------------------+
| ``_pk_urdf_path`` | property or method → str | URDF for the FK/IK serial chain |
+---------------------+----------------------------------+----------------------------------+
Expand Down
2 changes: 0 additions & 2 deletions docs/source/overview/sim/solvers/srs_solver.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ SRSSolver is configured via the `SRSSolverCfg` class, allowing detailed control
from embodichain.data import get_data_path
from embodichain.lab.sim.robots.dexforce_w1.types import (
DexforceW1ArmSide,
DexforceW1ArmKind,
DexforceW1Version,
)
from embodichain.lab.sim.robots.dexforce_w1.params import (
Expand All @@ -41,7 +40,6 @@ from embodichain.lab.sim.solvers.srs_solver import SRSSolver, SRSSolverCfg

arm_params = W1ArmKineParams(
arm_side=DexforceW1ArmSide.RIGHT,
arm_kind=DexforceW1ArmKind.ANTHROPOMORPHIC,
version=DexforceW1Version.V021,
)

Expand Down
120 changes: 100 additions & 20 deletions docs/source/resources/robot/dexforce_w1.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,29 @@

# Dexforce W1

Dexforce W1 is a versatile robot developed by DexForce Technology Co., Ltd., supporting both industrial and anthropomorphic arm types. It is suitable for various simulation and real-world application scenarios.
Dexforce W1 is a dual-arm humanoid robot developed by DexForce Technology Co., Ltd.

<div style="display: flex; justify-content: center; align-items: flex-start; gap: 20px; flex-wrap: wrap;">
<figure style="text-align: center; margin: 10px;">
<img src="../../_static/robots/dexforcew1_anthropomorphic.jpg" alt="Anthropomorphic Version" style="height: 400px; width: auto;"/>
<figcaption><b>Anthropomorphic Version</b></figcaption>
</figure>
<figure style="text-align: center; margin: 10px;">
<img src="../../_static/robots/dexforcew1_industrial.jpg" alt="Industrial Version" style="height: 400px; width: auto;"/>
<figcaption><b>Industrial Version</b></figcaption>
<img src="../../_static/robots/dexforcew1.jpg" alt="Dexforce W1" style="height: 400px; width: auto;"/>
<figcaption><b>Dexforce W1</b></figcaption>
</figure>
</div>

## Key Features

- Supports multiple arm types (industrial, anthropomorphic)
- Supports dual 7-DOF arms
- Supports version-owned asset layouts and calibration parameters
- Configurable left/right hand brand and version
- Flexible URDF assembly and simulation configuration
- Compatible with SimulationManager simulation environment

## Method 1: Fine-grained configuration with `build_dexforce_w1_cfg`

This method allows you to specify detailed parameters for each arm and hand. Recommended for advanced users who need full control over robot hardware options.
This method allows you to specify detailed parameters for each arm and hand.

**Parameters:**

- `arm_kind`: Arm type, e.g., `DexforceW1ArmKind.ANTHROPOMORPHIC` or `DexforceW1ArmKind.INDUSTRIAL`.
- `hand_types`: Dict specifying hand brand for each arm side (`LEFT`/`RIGHT`).
- `hand_versions`: Dict specifying hand version for each arm side.

Expand All @@ -37,11 +33,11 @@ hand_types = {
DexforceW1ArmSide.RIGHT: DexforceW1HandBrand.BRAINCO_HAND,
}
hand_versions = {
DexforceW1ArmSide.LEFT: DexforceW1Version.V021,
DexforceW1ArmSide.RIGHT: DexforceW1Version.V021,
DexforceW1ArmSide.LEFT: DexforceW1Version.V025,
DexforceW1ArmSide.RIGHT: DexforceW1Version.V025,
}
cfg = build_dexforce_w1_cfg(
arm_kind=DexforceW1ArmKind.ANTHROPOMORPHIC,
version=DexforceW1Version.V025,
hand_types=hand_types,
hand_versions=hand_versions,
)
Expand All @@ -56,14 +52,11 @@ This method allows fast setup using a dictionary, suitable for simple scenarios
**Parameters:**

- `uid`: Unique robot identifier (string).
- `version`: Robot version, e.g., `v021`.
- `arm_kind`: Arm type, e.g., `anthropomorphic` or `industrial` (string).
- `version`: Robot version, e.g., `v021`, `v022`, or `v025`.

```python
from embodichain.lab.sim.robots import DexforceW1Cfg
cfg = DexforceW1Cfg.from_dict(
{"uid": "dexforce_w1", "version": "v021", "arm_kind": "anthropomorphic"}
)
cfg = DexforceW1Cfg.from_dict({"uid": "dexforce_w1", "version": "v025"})
robot = sim.add_robot(cfg=cfg)
print("DexforceW1 robot added to the simulation.")
```
Expand Down Expand Up @@ -98,7 +91,94 @@ Choose `build_dexforce_w1_cfg` for maximum flexibility and hardware customizatio

| Type | Options / Values | Description |
|-------------------------|-------------------------------------------------------|------------------------------------|
| `DexforceW1ArmKind` | `ANTHROPOMORPHIC`, `INDUSTRIAL` | Arm type |
| `DexforceW1HandBrand` | `BRAINCO_HAND`, `DH_PGC_GRIPPER`, `DH_PGC_GRIPPER_M` | Hand brand |
| `DexforceW1Version` | `V021` | Release version |
| `DexforceW1Version` | `V021`, `V022`, `V025` | Release version |
| `DexforceW1ArmSide` | `LEFT`, `RIGHT` | Left/right hand identifier |

## Unified asset layout and version extension

V022 and V025 use one unified Hugging Face archive per release:

```text
dexforce_w1/<version>/w1.zip
└── w1/
├── robot.urdf
├── chassis.urdf
├── torso.urdf
├── head.urdf
├── left_arm.urdf
├── right_arm.urdf
├── visual/
└── collision/
```

The runtime downloads each release archive once. Direct FK/IK uses `robot.urdf`
or the arm URDFs, while configurable robot assembly reads all components from
the same extracted directory. V022 and V025 assets are resolved through the
registered Hugging Face dataset archives and the shared asset cache.

### Version-owned end-effector offset

Different arm revisions may place the physical mounting surface at different
positions relative to the arm `ee` frame. This difference belongs to the W1
revision, not to a BrainCo hand, DH gripper, PIKA gripper, or any other
end-effector.

`W1VersionSpec.default_eef_attach_xpos` is the single source of truth for this
revision offset:

| Version | Left arm | Right arm |
|---------|----------|-----------|
| V021 | Identity | Identity |
| V022 | Identity (provisional; calibration required) | Identity (provisional; calibration required) |
| V025 | `+0.012 m` along the `ee` frame Z axis | `+0.012 m` along the `ee` frame Z axis |

The final assembly transform and solver TCP are derived as follows:

```python
final_attach_xpos = version_attach_xpos @ eef_attach_xpos
final_tcp = version_attach_xpos @ solver_tcp
```

Therefore, the V025 offset affects both the assembled end-effector position and
FK/IK results. The offset is also applied when callers provide a custom
`hand_attach_xposes` value, a custom `left_hand`/`right_hand` component
transform, or an explicit arm TCP through `DexforceW1Cfg.from_dict`.
Serialization removes the derived offset and restores it on loading, so a
configuration round trip does not apply the offset twice.

Do not manually add the 12 mm correction to an end-effector transform or TCP.
Those values must describe the end-effector relative to the standard mounting
surface; the W1 version layer adds the robot revision correction.

Per-component version overrides are supported for controlled migrations:

```python
cfg = DexforceW1Cfg.from_dict(
{
"uid": "dexforce_w1",
"version": "v021",
"component_versions": {
"left_arm": "v025",
"right_arm": "v025",
},
}
)
```

To add another W1 revision:

1. Register the new `DexforceW1Version` value and dataset archive.
2. Add one `W1VersionSpec` entry in
`embodichain/lab/sim/robots/dexforce_w1/specs.py`.
3. Register component URDF paths and the full-robot URDF path.
4. Set the arm kinematic parameters and
`default_eef_attach_xpos` for both sides. Use identity only after confirming
that the arm `ee` frame is already at the physical mounting surface.
5. Verify that the same version offset is present in both the assembled
end-effector pose and the final FK/IK TCP.
6. Validate hand/gripper mounting, wrist cameras, FK/IK, VR teleoperation, and
real2sim task regression.

Builders, control parts, assembly, TCP selection, analytical parameters and
FK/IK then use the version specification without revision-specific branches.
3 changes: 1 addition & 2 deletions docs/source/tutorial/modular_env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ The main environment configuration inherits from :class:`envs.EmbodiedEnvCfg` an
Uses the pre-configured :class:`DexforceW1Cfg` with customizations:

- **Version**: Specific robot variant (v021)
- **Arm Type**: Anthropomorphic configuration
- **Position**: Initial placement in the scene

**Sensor Configuration**
Expand Down Expand Up @@ -241,4 +240,4 @@ This tutorial demonstrates the full power of EmbodiChain's modular environment s
**Using an AI coding agent?** These skills can help you build on this tutorial:

- **/add-task-env** — Scaffold a new task environment with the correct file structure, ``@register_env`` decorator, base class methods, ``__init__.py`` update, and test stub.
- **/add-functor** — Add observation, reward, event, or randomization functors with the correct signature and module placement.
- **/add-functor** — Add observation, reward, event, or randomization functors with the correct signature and module placement.
Loading
Loading