From 3945eec94795770f899cb767148f935bdac2ee5b Mon Sep 17 00:00:00 2001 From: chenjian Date: Tue, 27 Jan 2026 11:01:58 +0800 Subject: [PATCH 1/3] fix --- embodichain/lab/sim/cfg.py | 2 +- embodichain/lab/sim/objects/articulation.py | 4 ++-- embodichain/lab/sim/objects/robot.py | 4 ++-- embodichain/lab/sim/utility/sim_utils.py | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/embodichain/lab/sim/cfg.py b/embodichain/lab/sim/cfg.py index 68dc6d41..e30ed0bf 100644 --- a/embodichain/lab/sim/cfg.py +++ b/embodichain/lab/sim/cfg.py @@ -388,7 +388,7 @@ def attr(self) -> SoftBodyAttr: class JointDrivePropertiesCfg: """Properties to define the drive mechanism of a joint.""" - drive_type: Literal["force", "acceleration"] = "force" + drive_type: Literal["force", "acceleration", "none"] = "force" """Joint drive type to apply. If the drive type is "force", then the joint is driven by a force and the acceleration is computed based on the force applied. diff --git a/embodichain/lab/sim/objects/articulation.py b/embodichain/lab/sim/objects/articulation.py index 760f32c6..ef77f063 100644 --- a/embodichain/lab/sim/objects/articulation.py +++ b/embodichain/lab/sim/objects/articulation.py @@ -1386,9 +1386,9 @@ def _set_default_joint_drive(self) -> None: drive_pros = self.cfg.drive_pros if isinstance(drive_pros, dict): - drive_type = drive_pros.get("drive_type", None) + drive_type = drive_pros.get("drive_type", "none") else: - drive_type = getattr(drive_pros, "drive_type", None) + drive_type = getattr(drive_pros, "drive_type", "none") # Apply drive parameters to all articulations in the batch self.set_drive( diff --git a/embodichain/lab/sim/objects/robot.py b/embodichain/lab/sim/objects/robot.py index 09f8c3f1..cb35d62a 100644 --- a/embodichain/lab/sim/objects/robot.py +++ b/embodichain/lab/sim/objects/robot.py @@ -855,9 +855,9 @@ def _set_default_joint_drive(self) -> None: drive_pros = self.cfg.drive_pros if isinstance(drive_pros, dict): - drive_type = drive_pros.get("drive_type", None) + drive_type = drive_pros.get("drive_type", "force") else: - drive_type = getattr(drive_pros, "drive_type", None) + drive_type = getattr(drive_pros, "drive_type", "force") # Apply drive parameters to all articulations in the batch self.set_drive( diff --git a/embodichain/lab/sim/utility/sim_utils.py b/embodichain/lab/sim/utility/sim_utils.py index 6bf1d5fc..8086689c 100644 --- a/embodichain/lab/sim/utility/sim_utils.py +++ b/embodichain/lab/sim/utility/sim_utils.py @@ -73,6 +73,8 @@ def get_dexsim_drive_type(drive_type: str) -> DriveType: return DriveType.FORCE elif drive_type == "acceleration": return DriveType.ACCELERATION + elif drive_type == "none": + return DriveType.NONE else: logger.error(f"Invalid dexsim drive type: {drive_type}") @@ -97,6 +99,8 @@ def get_drive_type(drive_pros): drive_type = DriveType.FORCE elif drive_type == "acceleration": drive_type = DriveType.ACCELERATION + elif drive_type == "none": + return DriveType.NONE else: logger.log_error(f"Unknow drive type {drive_type}") From 029da7afd1665306e4ca879df265da490cea98ba Mon Sep 17 00:00:00 2001 From: chenjian Date: Tue, 27 Jan 2026 14:48:13 +0800 Subject: [PATCH 2/3] update --- embodichain/lab/sim/cfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/embodichain/lab/sim/cfg.py b/embodichain/lab/sim/cfg.py index e30ed0bf..8866fea0 100644 --- a/embodichain/lab/sim/cfg.py +++ b/embodichain/lab/sim/cfg.py @@ -393,6 +393,7 @@ class JointDrivePropertiesCfg: If the drive type is "force", then the joint is driven by a force and the acceleration is computed based on the force applied. If the drive type is "acceleration", then the joint is driven by an acceleration and the force is computed based on the acceleration applied. + If the drive type is "none", then no force will be applied to joint. """ stiffness: Union[Dict[str, float], float] = 1e4 From 58b4f10e1bd6c02548d28bbccef0904c4bf456b6 Mon Sep 17 00:00:00 2001 From: chenjian Date: Tue, 27 Jan 2026 15:36:52 +0800 Subject: [PATCH 3/3] update --- docs/source/overview/sim/sim_articulation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/overview/sim/sim_articulation.md b/docs/source/overview/sim/sim_articulation.md index 1fe6bac6..5e4c0669 100644 --- a/docs/source/overview/sim/sim_articulation.md +++ b/docs/source/overview/sim/sim_articulation.md @@ -32,7 +32,7 @@ The `drive_props` parameter controls the joint physics behavior. It is defined u | `max_effort` | `float` / `Dict` | `1.0e10` | Maximum effort (force/torque) the joint can exert. | | `max_velocity` | `float` / `Dict` | `1.0e10` | Maximum velocity allowed for the joint ($m/s$ or $rad/s$). | | `friction` | `float` / `Dict` | `0.0` | Joint friction coefficient. | -| `drive_type` | `str` | `"force"` | Drive mode: `"force"` or `"acceleration"`. | +| `drive_type` | `str` | `"force"` | Drive mode: `"force"`(driven by a force), `"acceleration"`(driven by an acceleration) or `none`(no force). | ### Setup & Initialization