PyBullet: cmake build, enable DBUILD_PYBULLET_NUMPY=ON

fix issue with HalfCheetahBulletEnv-v0 in previous commit
This commit is contained in:
Erwin Coumans 2018-05-20 14:18:53 +10:00
parent 0b2c9ea645
commit 90939279f9
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ if [ -e CMakeCache.txt ]; then
fi
mkdir -p build_cmake
cd build_cmake
cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=OFF -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release .. || exit 1
cmake -DBUILD_PYBULLET=ON -DBUILD_PYBULLET_NUMPY=ON -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release .. || exit 1
make -j $(command nproc 2>/dev/null || echo 12) || exit 1
cd examples
cd pybullet

View File

@ -116,8 +116,8 @@ class HalfCheetah(WalkerBase):
# Use contact other than feet to terminate episode: due to a lot of strange walks using knees
return +1 if np.abs(pitch) < 1.0 and not self.feet_contact[1] and not self.feet_contact[2] and not self.feet_contact[4] and not self.feet_contact[5] else -1
def robot_specific_reset(self):
WalkerBase.robot_specific_reset(self)
def robot_specific_reset(self, bullet_client):
WalkerBase.robot_specific_reset(self, bullet_client)
self.jdict["bthigh"].power_coef = 120.0
self.jdict["bshin"].power_coef = 90.0
self.jdict["bfoot"].power_coef = 60.0