v1.1.3; fix friction calc err (x0.4)

This commit is contained in:
wty-yy
2026-02-10 16:52:27 +08:00
parent 4086357ad5
commit 075e4cc5c7
9 changed files with 19 additions and 16 deletions

8
CMD.md
View File

@@ -38,7 +38,7 @@ python robogauge/scripts/run.py \
--multi \
--num-processes 5 \
--seeds 0 1 2 \
--frictions 0.5 1.0 1.5 2.0 2.5 \
--frictions 0.2 0.4 0.6 0.8 1.0 \
--compress-logs \
--headless
@@ -49,7 +49,7 @@ python robogauge/scripts/run.py \
--multi \
--num-processes 5 \
--seeds 0 1 2 \
--frictions 2.0 \
--frictions 0.8 \
--level 10 \
--spawn-type level_eval \
--goals max_velocity diagonal_velocity\
@@ -68,7 +68,7 @@ python robogauge/scripts/run.py \
--search-max-level \
--seeds 0 1 2 \
--search-seeds 0 1 2 3 4 \
--frictions 1.0 \
--frictions 0.4 \
--compress-logs \
--headless
```
@@ -85,7 +85,7 @@ python robogauge/scripts/run.py \
--num-processes 50 \
--seeds 0 1 2 \
--search-seeds 0 1 2 3 4 \
--frictions 0.5 0.75 1.0 1.25 1.5 1.75 2.0 2.25 2.5 \
--frictions 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 \
--compress-logs \
--headless
```

View File

@@ -114,7 +114,7 @@ All evaluations are run with configured domain randomization (DR). Below are com
| - | - | - |
| Random action execution delay | `action delay` | `<= RL control interval` |
| Base payload mass | `base mass` | `-1, 0, 1, 2, 3 kg` |
| Ground friction | `friction` | `0.4, 0.7, 1.0, 1.3, 1.6` |
| Ground friction | `friction` | `0.2 ~ 1.0 (step 0.1)` |
#### Terrains

View File

@@ -100,7 +100,7 @@ while True:
| - | - | - |
| 电机动作执行随机延迟 | `action delay` | `<= RL控制间隔` |
| base负重 | `base mass` | `-1, 0, 1, 2, 3 kg` |
| 地面摩擦力 | `friction` | `0.4, 0.7, 1.0, 1.3, 1.6` |
| 地面摩擦力 | `friction` | `0.2 ~ 1.0 (step 0.1)` |
#### 地形
1. 支持legged_gym中的部分地形, 包括: `wave, slope, stairs up, stairs down, obstacles, flat`, 除`flat`地形外其他地形可进行难度系数提升

View File

@@ -1,4 +1,7 @@
# UPDATE
## 20260210
### v1.1.3
1. 修复摩擦计算问题之前的所有stress的摩擦*0.4后才是真实摩擦系数所以之前用的摩擦范围是0.2~1.0步长0.1
## 20260204
### v1.1.2
1. 加入手柄JoystickGoal功能

View File

@@ -18,6 +18,6 @@
<worldbody>
<light pos="0 0 1.5" dir="0 0 -1" directional="true"/>
<geom name="floor" size="0 0 0.05" type="plane" material="groundplane" priority="1"/>
<geom name="floor" size="0 0 0.05" type="plane" material="groundplane"/>
</worldbody>
</mujoco>

View File

@@ -42,7 +42,7 @@ default_args_list = [
# '--num-processes', '30', # Set in CLI
'--seeds', '0', '1', '2',
'--search-seeds', '0', '1', '2', '3', '4',
'--frictions', '0.5', '0.75', '1.0', '1.25', '1.5', '1.75', '2.0', '2.25', '2.5',
'--frictions', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0',
'--compress-logs',
'--headless',
]

View File

@@ -36,7 +36,7 @@ class MujocoConfig(Config):
# Setup by config file, ensure evaluation coverage
base_mass = 0.0 # [kg], {-1, 0, 1, 2, 3}
friction = 1.0 # [N.s/m], {0.4, 0.7, 1.0, 1.3, 1.6}
friction = 0.0 # [N.s/m], {0.4, 0.7, 1.0, 1.3, 1.6}
class noise:
# Uniform noise

View File

@@ -126,13 +126,13 @@ class MujocoSimulator:
logger.info(f"Randomized base mass: {original_mass:.3f} -> {new_mass:.3f} kg")
# Domain randomization: friction
if self.cfg.domain_rand.friction != 1.0:
if self.cfg.domain_rand.friction != 0.0:
for i in range(self.mj_model.ngeom):
# Both change robot friction and terrain friction, usually robot friction < 1.0
# Mujoco friction calculation takes the *max* between two contacting geoms
geom_friction = self.mj_model.geom_friction[i]
geom_friction[0] *= self.cfg.domain_rand.friction
self.mj_model.geom_friction[i] = geom_friction
# Both change robot friction and terrain friction
# If one of the two geoms has higher priority, the friction of that geom is used.
# If both geoms have the save priopirty, the maximum of the two friction is used.
# (Go2 foot friction is 0.4 and priority is 1, terrain priority is 0 except floor)
self.mj_model.geom_friction[i][0] = self.cfg.domain_rand.friction
logger.info(f"Scaled geom friction by factor: {self.cfg.domain_rand.friction:.3f}")
mujoco.mj_forward(self.mj_model, self.mj_data)

View File

@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name="robogauge", # 包名
version="1.1.2", # 版本号
version="1.1.3", # 版本号
author="Wu Tianyang", # 你的名字
author_email="993660140@qq.com",
description="A generic robot RL model evaluation library based on MuJoCo",