summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManifoldFR <manifoldfr@outlook.com>2020-07-06 16:56:24 +0200
committerManifoldFR <manifoldfr@outlook.com>2020-07-06 16:56:24 +0200
commita3810d15ef1a279cf7fcb413f1604dddd2e18805 (patch)
treefdf35bc59876b8083eeba7f53bbb2308018cf441
parent2fe3fe945d20fb2dcb61bfba54cae3700da9075a (diff)
downloadbullet3-a3810d15ef1a279cf7fcb413f1604dddd2e18805.tar.gz
fix setting useComReward=false
-rw-r--r--examples/pybullet/gym/pybullet_envs/deep_mimic/env/humanoid_stable_pd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/pybullet/gym/pybullet_envs/deep_mimic/env/humanoid_stable_pd.py b/examples/pybullet/gym/pybullet_envs/deep_mimic/env/humanoid_stable_pd.py
index 79e4cde50..30d607734 100644
--- a/examples/pybullet/gym/pybullet_envs/deep_mimic/env/humanoid_stable_pd.py
+++ b/examples/pybullet/gym/pybullet_envs/deep_mimic/env/humanoid_stable_pd.py
@@ -925,7 +925,8 @@ class HumanoidStablePD(object):
root_err = root_pos_err + 0.1 * root_rot_err + 0.01 * root_vel_err + 0.001 * root_ang_vel_err
# COM error in initial code -> COM velocities
- com_err = 0.1 * np.sum(np.square(comKinVel - comSimVel))
+ if self._useComReward:
+ com_err = 0.1 * np.sum(np.square(comKinVel - comSimVel))
# com_err = 0.1 * np.sum(np.square(comKin - comSim))
#com_err = 0.1 * (com_vel1_world - com_vel0_world).squaredNorm()