mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-08-11 07:49:32 +00:00
use pybullet.URDF_GOOGLEY_UNDEFINED_COLORS for standard gym envs
This commit is contained in:
@@ -130,12 +130,13 @@ class MJCFBasedRobot(XmlBasedRobot):
|
||||
self.objects = self._p.loadMJCF(os.path.join(pybullet_data.getDataPath(), "mjcf",
|
||||
self.model_xml),
|
||||
flags=pybullet.URDF_USE_SELF_COLLISION |
|
||||
pybullet.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS)
|
||||
pybullet.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS |
|
||||
pybullet.URDF_GOOGLEY_UNDEFINED_COLORS )
|
||||
self.parts, self.jdict, self.ordered_joints, self.robot_body = self.addToScene(
|
||||
self._p, self.objects)
|
||||
else:
|
||||
self.objects = self._p.loadMJCF(
|
||||
os.path.join(pybullet_data.getDataPath(), "mjcf", self.model_xml))
|
||||
os.path.join(pybullet_data.getDataPath(), "mjcf", self.model_xml, flags = pybullet.URDF_GOOGLEY_UNDEFINED_COLORS))
|
||||
self.parts, self.jdict, self.ordered_joints, self.robot_body = self.addToScene(
|
||||
self._p, self.objects)
|
||||
self.robot_specific_reset(self._p)
|
||||
@@ -183,14 +184,14 @@ class URDFBasedRobot(XmlBasedRobot):
|
||||
basePosition=self.basePosition,
|
||||
baseOrientation=self.baseOrientation,
|
||||
useFixedBase=self.fixed_base,
|
||||
flags=pybullet.URDF_USE_SELF_COLLISION))
|
||||
flags=pybullet.URDF_USE_SELF_COLLISION | pybullet.URDF_GOOGLEY_UNDEFINED_COLORS))
|
||||
else:
|
||||
self.parts, self.jdict, self.ordered_joints, self.robot_body = self.addToScene(
|
||||
self._p,
|
||||
self._p.loadURDF(os.path.join(pybullet_data.getDataPath(), self.model_urdf),
|
||||
basePosition=self.basePosition,
|
||||
baseOrientation=self.baseOrientation,
|
||||
useFixedBase=self.fixed_base))
|
||||
useFixedBase=self.fixed_base, flags = pybullet.URDF_GOOGLEY_UNDEFINED_COLORS))
|
||||
|
||||
self.robot_specific_reset(self._p)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user