This commit is contained in:
Erwin Coumans
2019-12-13 09:21:00 -08:00
24 changed files with 27217 additions and 142 deletions

View File

@@ -0,0 +1,10 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None.003
Ns 0.000000
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.800000 0.800000
Ks 0.800000 0.800000 0.800000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,598 @@
<?xml version="1.0" ?>
<robot name="plane">
<link name="chassis">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="13.715"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz=" 0 0 0"/>
<geometry>
<mesh filename="chassis_zup.obj" scale="1 1 1"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="chassis_vhacd_mod_zup.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<link name="FR_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 -1"/>
<parent link="chassis"/>
<child link="FR_hip_motor"/>
<origin rpy="1.57079 0 1.57079" xyz="0.199095 -0.0817145 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FR_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_right_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FR_hip_motor"/>
<child link="FR_upper_leg"/>
<origin rpy="0 0 0" xyz="-0.053565 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FR_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FR_upper_leg"/>
<child link="FR_lower_leg"/>
<origin rpy="0 0 0" xyz="0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="-.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.obj" scale="1 1 1"/>
</geometry>
<material name="white">
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="chassis"/>
<child link="FL_hip_motor"/>
<origin rpy="1.57079 0 1.57079" xyz="0.199095 0.0817145 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left.obj" scale="1 1 1"/>
</geometry>
<material name="white">
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FL_hip_motor"/>
<child link="FL_upper_leg"/>
<origin rpy="0 0 0" xyz="0.055855 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white">
</material>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FL_upper_leg"/>
<child link="FL_lower_leg"/>
<origin rpy="0 0 0" xyz="-0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 -1"/>
<parent link="chassis"/>
<child link="RR_hip_motor"/>
<origin rpy="1.57079 0 1.57079" xyz="-0.238195 -0.0817145 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror2.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_right_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RR_hip_motor"/>
<child link="RR_upper_leg"/>
<origin rpy="0 0 0" xyz="-0.053565 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RR_upper_leg"/>
<child link="RR_lower_leg"/>
<origin rpy="0 0 0" xyz="0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="-.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="chassis"/>
<child link="RL_hip_motor"/>
<origin rpy="1.57079 0 1.57079" xyz="-0.238195 0.0817145 -0.03"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left2.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RL_hip_motor"/>
<child link="RL_upper_leg"/>
<origin rpy="0 0 0" xyz="0.055855 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RL_upper_leg"/>
<child link="RL_lower_leg"/>
<origin rpy="0 0 0" xyz="-0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="toeRL">
<contact>
<friction_anchor/>
<stiffness value="30000.0"/>
<damping value="1000.0"/>
<spinning_friction value="0.1"/>
<lateral_friction value="1.0"/>
</contact>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.0"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/>
</inertial>
</link>
<joint name="jtoeRL" type="fixed">
<parent link="RL_lower_leg"/>
<child link="toeRL"/>
<origin xyz="0 -0.25 -0.022"/>
<dynamics damping="0.0" friction="0.0"/>
</joint>
<link name="toeRR">
<contact>
<friction_anchor/>
<stiffness value="30000.0"/>
<damping value="1000.0"/>
<spinning_friction value="0.1"/>
<lateral_friction value="1.0"/>
</contact>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.0"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/>
</inertial>
</link>
<joint name="jtoeRR" type="fixed">
<parent link="RR_lower_leg"/>
<child link="toeRR"/>
<origin xyz="0 -0.25 -0.022"/>
<dynamics damping="0.0" friction="0.0"/>
</joint>
<link name="toeFL">
<contact>
<friction_anchor/>
<stiffness value="30000.0"/>
<damping value="1000.0"/>
<spinning_friction value="0.1"/>
<lateral_friction value="1.0"/>
</contact>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.0"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/>
</inertial>
</link>
<joint name="jtoeFL" type="fixed">
<parent link="FL_lower_leg"/>
<child link="toeFL"/>
<origin xyz="0 -0.25 -0.022"/>
<dynamics damping="0.0" friction="0.0"/>
</joint>
<link name="toeFR">
<contact>
<friction_anchor/>
<stiffness value="30000.0"/>
<damping value="1000.0"/>
<spinning_friction value="0.1"/>
<lateral_friction value="1.0"/>
</contact>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.0"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
</geometry>
</collision>
<inertial>
<mass value="0.1"/>
<inertia ixx="0.000025" ixy="0" ixz="0" iyy="0.000025" iyz="0" izz="0.000025"/>
</inertial>
</link>
<joint name="jtoeFR" type="fixed">
<parent link="FR_lower_leg"/>
<child link="toeFR"/>
<origin xyz="0 -0.25 -0.022"/>
<dynamics damping="0.0" friction="0.0"/>
</joint>
</robot>

View File

@@ -1,29 +0,0 @@
import functools
import inspect
import pybullet
class BulletClient(object):
"""A wrapper for pybullet to manage different clients."""
def __init__(self, connection_mode=pybullet.DIRECT, options=""):
"""Create a simulation and connect to it."""
self._client = pybullet.connect(pybullet.SHARED_MEMORY)
if (self._client < 0):
print("options=", options)
self._client = pybullet.connect(connection_mode, options=options)
self._shapes = {}
def __del__(self):
"""Clean up connection if not already done."""
try:
pybullet.disconnect(physicsClientId=self._client)
except pybullet.error:
pass
def __getattr__(self, name):
"""Inject the client id into Bullet functions."""
attribute = getattr(pybullet, name)
if inspect.isbuiltin(attribute):
attribute = functools.partial(attribute, physicsClientId=self._client)
return attribute

View File

@@ -17,7 +17,7 @@ from gym import spaces
from gym.utils import seeding
import numpy as np
import pybullet
from . import bullet_client
import pybullet_utils.bullet_client as bc
from . import minitaur
import pybullet_data
from . import minitaur_env_randomizer
@@ -150,9 +150,9 @@ class MinitaurBulletDuckEnv(gym.Env):
self._action_repeat *= NUM_SUBSTEPS
if self._is_render:
self._pybullet_client = bullet_client.BulletClient(connection_mode=pybullet.GUI)
self._pybullet_client = bc.BulletClient(connection_mode=pybullet.GUI)
else:
self._pybullet_client = bullet_client.BulletClient()
self._pybullet_client = bc.BulletClient()
self.seed()
self.reset()

View File

@@ -14,7 +14,7 @@ from gym import spaces
from gym.utils import seeding
import numpy as np
import pybullet
from . import bullet_client
import pybullet_utils.bullet_client as bc
from . import minitaur
import os
import pybullet_data
@@ -145,9 +145,9 @@ class MinitaurBulletEnv(gym.Env):
self._action_repeat *= NUM_SUBSTEPS
if self._is_render:
self._pybullet_client = bullet_client.BulletClient(connection_mode=pybullet.GUI)
self._pybullet_client = bc.BulletClient(connection_mode=pybullet.GUI)
else:
self._pybullet_client = bullet_client.BulletClient()
self._pybullet_client = bc.BulletClient()
self.seed()
self.reset()

View File

@@ -12,7 +12,7 @@ import numpy as np
import pybullet
from . import racecar
import random
from . import bullet_client
import pybullet_utils.bullet_client as bc
import pybullet_data
from pkg_resources import parse_version
@@ -40,9 +40,9 @@ class RacecarGymEnv(gym.Env):
self._renders = renders
self._isDiscrete = isDiscrete
if self._renders:
self._p = bullet_client.BulletClient(connection_mode=pybullet.GUI)
self._p = bc.BulletClient(connection_mode=pybullet.GUI)
else:
self._p = bullet_client.BulletClient()
self._p = bc.BulletClient()
self.seed()
#self.reset()

View File

@@ -10,7 +10,7 @@ from gym.utils import seeding
import numpy as np
import time
import pybullet
from . import bullet_client
import pybullet_utils.bullet_client as bc
from . import racecar
import random
import pybullet_data
@@ -42,9 +42,9 @@ class RacecarZEDGymEnv(gym.Env):
self._isDiscrete = isDiscrete
if self._renders:
self._p = bullet_client.BulletClient(connection_mode=pybullet.GUI)
self._p = bc.BulletClient(connection_mode=pybullet.GUI)
else:
self._p = bullet_client.BulletClient()
self._p = bc.BulletClient()
self.seed()
self.reset()

View File

@@ -5,7 +5,7 @@ parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0, parentdir)
from pybullet_utils import bullet_client
import panda_sim
from pybullet_envs.examples import panda_sim
import time

View File

@@ -3,7 +3,7 @@ import pybullet_data as pd
import math
import time
import numpy as np
import panda_sim
from pybullet_envs.examples import panda_sim
p.connect(p.GUI)
p.configureDebugVisualizer(p.COV_ENABLE_Y_AXIS_UP,1)
@@ -18,4 +18,4 @@ while (1):
panda.step()
p.stepSimulation()
time.sleep(timeStep)

View File

@@ -1,54 +0,0 @@
"""A wrapper for pybullet to manage different clients."""
from __future__ import absolute_import
from __future__ import division
import functools
import inspect
import pybullet
class BulletClient(object):
"""A wrapper for pybullet to manage different clients."""
def __init__(self, connection_mode=None):
"""Creates a Bullet client and connects to a simulation.
Args:
connection_mode:
`None` connects to an existing simulation or, if fails, creates a
new headless simulation,
`pybullet.GUI` creates a new simulation with a GUI,
`pybullet.DIRECT` creates a headless simulation,
`pybullet.SHARED_MEMORY` connects to an existing simulation.
"""
self._shapes = {}
if connection_mode is None:
self._client = pybullet.connect(pybullet.SHARED_MEMORY)
if self._client >= 0:
return
else:
connection_mode = pybullet.DIRECT
self._client = pybullet.connect(connection_mode)
def __del__(self):
"""Clean up connection if not already done."""
try:
pybullet.disconnect(physicsClientId=self._client)
except pybullet.error:
pass
def __getattr__(self, name):
"""Inject the client id into Bullet functions."""
attribute = getattr(pybullet, name)
if inspect.isbuiltin(attribute):
if name not in [
"invertTransform",
"multiplyTransforms",
"getMatrixFromQuaternion",
"getEulerFromQuaternion",
"computeViewMatrixFromYawPitchRoll",
"computeProjectionMatrixFOV",
"getQuaternionFromEuler",
]: # A temporary hack for now.
attribute = functools.partial(attribute, physicsClientId=self._client)
return attribute

View File

@@ -14,7 +14,7 @@ from gym import spaces
from gym.utils import seeding
import numpy as np
import pybullet
from pybullet_envs.minitaur.envs import bullet_client
import pybullet_utils.bullet_client as bc
import pybullet_data
from pybullet_envs.minitaur.envs import minitaur
from pybullet_envs.minitaur.envs import minitaur_derpy
@@ -223,9 +223,9 @@ class MinitaurGymEnv(gym.Env):
self._env_randomizers = convert_to_list(env_randomizer) if env_randomizer else []
self._episode_proto = minitaur_logging_pb2.MinitaurEpisode()
if self._is_render:
self._pybullet_client = bullet_client.BulletClient(connection_mode=pybullet.GUI)
self._pybullet_client = bc.BulletClient(connection_mode=pybullet.GUI)
else:
self._pybullet_client = bullet_client.BulletClient()
self._pybullet_client = bc.BulletClient()
if self._urdf_version is None:
self._urdf_version = DEFAULT_URDF_VERSION
self._pybullet_client.setPhysicsEngineParameter(enableConeFriction=0)

View File

@@ -14,7 +14,7 @@ from gym import spaces
from gym.utils import seeding
import numpy as np
import pybullet
from pybullet_envs.bullet import bullet_client
import pybullet_utils.bullet_client as bc
from pybullet_envs.prediction import boxstack_pybullet_sim
@@ -71,10 +71,10 @@ class PyBulletSimGymEnv(gym.Env):
print("urdf_root=" + self._urdf_root)
if self._is_render:
self._pybullet_client = bullet_client.BulletClient(connection_mode=pybullet.GUI,
self._pybullet_client = bc.BulletClient(connection_mode=pybullet.GUI,
options=optionstring)
else:
self._pybullet_client = bullet_client.BulletClient()
self._pybullet_client = bc.BulletClient()
if (debug_visualization == False):
self._pybullet_client.configureDebugVisualizer(flag=self._pybullet_client.COV_ENABLE_GUI,

View File

@@ -109,8 +109,6 @@ if not _OPTIONS["no-enet"] then
"../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h",
"../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp",
"../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h",
"../../examples/OpenGLWindow/SimpleCamera.cpp",
"../../examples/OpenGLWindow/SimpleCamera.h",
"../../examples/TinyRenderer/geometry.cpp",
"../../examples/TinyRenderer/model.cpp",
"../../examples/TinyRenderer/tgaimage.cpp",
@@ -157,8 +155,6 @@ if not _OPTIONS["no-enet"] then
"../../examples/SharedMemory/PosixSharedMemory.h",
"../../examples/SharedMemory/SharedMemoryCommands.h",
"../../examples/SharedMemory/SharedMemoryPublic.h",
"../../examples/Utils/b3ResourcePath.cpp",
"../../examples/Utils/b3ResourcePath.h",
"../../examples/Utils/RobotLoggingUtil.cpp",
"../../examples/Utils/RobotLoggingUtil.h",
"../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp",

View File

@@ -2065,6 +2065,10 @@ static PyObject* pybullet_loadSoftBody(PyObject* self, PyObject* args, PyObject*
{
b3LoadSoftBodyAddNeoHookeanForce(command, NeoHookeanMu, NeoHookeanLambda, NeoHookeanDamping);
}
if (useSelfCollision)
{
b3LoadSoftBodySetSelfCollision(command, useSelfCollision);
}
b3LoadSoftBodySetFrictionCoefficient(command, frictionCoeff);
statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command);
statusType = b3GetStatusType(statusHandle);