PyBullet: cmake build, enable DBUILD_PYBULLET_NUMPY=ON
fix issue with HalfCheetahBulletEnv-v0 in previous commit
This commit is contained in:
@@ -5,7 +5,7 @@ if [ -e CMakeCache.txt ]; then
|
|||||||
fi
|
fi
|
||||||
mkdir -p build_cmake
|
mkdir -p build_cmake
|
||||||
cd 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
|
make -j $(command nproc 2>/dev/null || echo 12) || exit 1
|
||||||
cd examples
|
cd examples
|
||||||
cd pybullet
|
cd pybullet
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ class HalfCheetah(WalkerBase):
|
|||||||
# Use contact other than feet to terminate episode: due to a lot of strange walks using knees
|
# 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
|
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):
|
def robot_specific_reset(self, bullet_client):
|
||||||
WalkerBase.robot_specific_reset(self)
|
WalkerBase.robot_specific_reset(self, bullet_client)
|
||||||
self.jdict["bthigh"].power_coef = 120.0
|
self.jdict["bthigh"].power_coef = 120.0
|
||||||
self.jdict["bshin"].power_coef = 90.0
|
self.jdict["bshin"].power_coef = 90.0
|
||||||
self.jdict["bfoot"].power_coef = 60.0
|
self.jdict["bfoot"].power_coef = 60.0
|
||||||
|
|||||||
Reference in New Issue
Block a user