Skip to content

Commit a323f8d

Browse files
chase6305Jietao Chenyuecideng
authored
Porf: modify URDF path handling: Pass from urdf_cfg to solver_cfg (#135)
Co-authored-by: Jietao Chen <chenjietao@dexforce.com> Co-authored-by: Yueci Deng <dengyueci@qq.com>
1 parent 83ce429 commit a323f8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

embodichain/lab/sim/sim_manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,12 @@ def add_robot(self, cfg: RobotCfg) -> Robot | None:
10851085

10861086
cfg.fpath = cfg.urdf_cfg.assemble_urdf()
10871087

1088+
if cfg.solver_cfg is not None:
1089+
if isinstance(cfg.solver_cfg, dict):
1090+
for key, value in cfg.solver_cfg.items():
1091+
if hasattr(value, "urdf_path") and value.urdf_path is None:
1092+
value.urdf_path = cfg.fpath
1093+
10881094
if uid is None:
10891095
uid = os.path.splitext(os.path.basename(cfg.fpath))[0]
10901096
cfg.uid = uid

0 commit comments

Comments
 (0)