Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
kind "StaticLib"
|
||||
|
||||
includedirs {".","../../src"}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"**.cpp",
|
||||
"**.h"
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
kind "StaticLib"
|
||||
|
||||
includedirs {"."}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"**.cpp",
|
||||
"**.h"
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
"../../src"
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"*.cpp",
|
||||
"*.hpp"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
kind "StaticLib"
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
includedirs {
|
||||
"../../../src"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
"../../../src"
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
files {
|
||||
"**.cpp",
|
||||
"**.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
project "BulletXmlWorldImporter"
|
||||
|
||||
kind "StaticLib"
|
||||
targetdir "../../lib"
|
||||
--targetdir "../../lib"
|
||||
includedirs {
|
||||
"../BulletWorldImporter",
|
||||
"../BulletFileLoader",
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
project "vhacd"
|
||||
|
||||
kind "StaticLib"
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
includedirs {
|
||||
"../inc","../public",
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -4,6 +4,10 @@ project "App_BulletExampleBrowser"
|
||||
|
||||
kind "ConsoleApp"
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
hasCL = findOpenCL("clew")
|
||||
|
||||
if (hasCL) then
|
||||
@@ -210,6 +214,10 @@ project "BulletExampleBrowserLib"
|
||||
"../ThirdPartyLibs",
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
if _OPTIONS["lua"] then
|
||||
includedirs{"../ThirdPartyLibs/lua-5.2.3/src"}
|
||||
links {"lua-5.2.3"}
|
||||
|
||||
@@ -2218,7 +2218,6 @@ b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
}
|
||||
|
||||
b3AlignedObjectArray<SortableTransparentInstance> transparentInstances;
|
||||
|
||||
{
|
||||
int curOffset = 0;
|
||||
//GLuint lastBindTexture = 0;
|
||||
@@ -2230,6 +2229,7 @@ b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
b3Vector3 camForwardVec;
|
||||
camForwardVec.setValue(fwd[0],fwd[1],fwd[2]);
|
||||
|
||||
|
||||
for (int obj=0;obj<m_graphicsInstances.size();obj++)
|
||||
{
|
||||
b3GraphicsInstance* gfxObj = m_graphicsInstances[obj];
|
||||
@@ -2245,8 +2245,8 @@ b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
inst.m_instanceId = curOffset;
|
||||
b3Vector3 centerPosition;
|
||||
centerPosition.setValue(m_data->m_instance_positions_ptr[inst.m_instanceId*4+0],
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+1],
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+2]);
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+1],
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+2]);
|
||||
centerPosition *= -1;//reverse sort opaque instances
|
||||
inst.m_projection = centerPosition.dot(camForwardVec);
|
||||
transparentInstances.push_back(inst);
|
||||
@@ -2258,8 +2258,8 @@ b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
b3Vector3 centerPosition;
|
||||
|
||||
centerPosition.setValue(m_data->m_instance_positions_ptr[inst.m_instanceId*4+0],
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+1],
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+2]);
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+1],
|
||||
m_data->m_instance_positions_ptr[inst.m_instanceId*4+2]);
|
||||
inst.m_projection = centerPosition.dot(camForwardVec);
|
||||
transparentInstances.push_back(inst);
|
||||
}
|
||||
@@ -2270,6 +2270,7 @@ b3Assert(glGetError() ==GL_NO_ERROR);
|
||||
TransparentDistanceSortPredicate sorter;
|
||||
|
||||
transparentInstances.quickSort(sorter);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
"../../src",
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
--links {
|
||||
--}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "b3RobotSimulatorClientAPI.h"
|
||||
|
||||
#include "../SharedMemory/PhysicsClientC_API.h"
|
||||
#include "b3RobotSimulatorClientAPI_InternalData.h""
|
||||
#include "b3RobotSimulatorClientAPI_InternalData.h"
|
||||
#ifdef BT_ENABLE_ENET
|
||||
#include "../SharedMemory/PhysicsClientUDP_C_API.h"
|
||||
#endif //PHYSICS_UDP
|
||||
|
||||
@@ -92,13 +92,14 @@ INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
|
||||
)
|
||||
|
||||
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||
LINK_LIBRARIES(BulletSoftBody)
|
||||
ENDIF()
|
||||
|
||||
LINK_LIBRARIES(
|
||||
Bullet3Common BulletWorldImporter BulletFileLoader BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision LinearMath BussIK
|
||||
)
|
||||
|
||||
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||
LINK_LIBRARIES(BulletSoftBody)
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32)
|
||||
ADD_EXECUTABLE(App_PhysicsServer_SharedMemory
|
||||
@@ -149,7 +150,7 @@ INCLUDE_DIRECTORIES(
|
||||
ADD_DEFINITIONS(-DB3_USE_STANDALONE_EXAMPLE)
|
||||
|
||||
LINK_LIBRARIES(
|
||||
Bullet3Common BulletWorldImporter BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision LinearMath BussIK OpenGLWindow
|
||||
BulletSoftBody Bullet3Common BulletWorldImporter BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision LinearMath BussIK OpenGLWindow
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ typedef b3PoolBodyHandle<b3Plugin> b3PluginHandle;
|
||||
struct b3PluginManagerInternalData
|
||||
{
|
||||
b3ResizablePool<b3PluginHandle> m_plugins;
|
||||
b3HashMap<b3HashString, b3PluginHandle*> m_pluginMap;
|
||||
b3HashMap<b3HashString, int> m_pluginMap;
|
||||
PhysicsDirect* m_physicsDirect;
|
||||
b3AlignedObjectArray<b3KeyboardEvent> m_keyEvents;
|
||||
b3AlignedObjectArray<b3VRControllerEvent> m_vrEvents;
|
||||
@@ -102,8 +102,12 @@ b3PluginManager::~b3PluginManager()
|
||||
{
|
||||
while (m_data->m_pluginMap.size())
|
||||
{
|
||||
b3PluginHandle** plugin = m_data->m_pluginMap.getAtIndex(0);
|
||||
unloadPlugin((*plugin)->m_pluginUniqueId);
|
||||
int* pluginUidPtr = m_data->m_pluginMap.getAtIndex(0);
|
||||
if (pluginUidPtr)
|
||||
{
|
||||
int pluginUid = *pluginUidPtr;
|
||||
unloadPlugin(*pluginUidPtr);
|
||||
}
|
||||
}
|
||||
delete m_data->m_physicsDirect;
|
||||
m_data->m_pluginMap.clear();
|
||||
@@ -140,11 +144,11 @@ int b3PluginManager::loadPlugin(const char* pluginPath, const char* postFixStr)
|
||||
{
|
||||
int pluginUniqueId = -1;
|
||||
|
||||
b3PluginHandle** pluginOrgPtr = m_data->m_pluginMap.find(pluginPath);
|
||||
if (pluginOrgPtr)
|
||||
int* pluginUidPtr = m_data->m_pluginMap.find(pluginPath);
|
||||
if (pluginUidPtr)
|
||||
{
|
||||
//already loaded
|
||||
pluginUniqueId = (*pluginOrgPtr)->m_pluginUniqueId;
|
||||
pluginUniqueId = *pluginUidPtr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -185,7 +189,7 @@ int b3PluginManager::loadPlugin(const char* pluginPath, const char* postFixStr)
|
||||
plugin->m_ownsPluginHandle = true;
|
||||
plugin->m_pluginHandle = pluginHandle;
|
||||
plugin->m_pluginPath = pluginPath;
|
||||
m_data->m_pluginMap.insert(pluginPath, plugin);
|
||||
m_data->m_pluginMap.insert(pluginPath, pluginUniqueId);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -246,16 +250,19 @@ void b3PluginManager::tickPlugins(double timeStep, bool isPreTick)
|
||||
{
|
||||
for (int i=0;i<m_data->m_pluginMap.size();i++)
|
||||
{
|
||||
b3PluginHandle** pluginPtr = m_data->m_pluginMap.getAtIndex(i);
|
||||
int* pluginUidPtr = m_data->m_pluginMap.getAtIndex(i);
|
||||
b3PluginHandle* plugin = 0;
|
||||
if (pluginPtr && *pluginPtr)
|
||||
|
||||
if (pluginUidPtr)
|
||||
{
|
||||
plugin = *pluginPtr;
|
||||
int pluginUid = *pluginUidPtr;
|
||||
plugin = m_data->m_plugins.getHandle(pluginUid);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
PFN_TICK tick = isPreTick? plugin->m_preTickFunc : plugin->m_postTickFunc;
|
||||
if (tick)
|
||||
{
|
||||
@@ -319,7 +326,7 @@ int b3PluginManager::registerStaticLinkedPlugin(const char* pluginPath, PFN_INIT
|
||||
pluginHandle->m_userPointer = 0;
|
||||
|
||||
|
||||
m_data->m_pluginMap.insert(pluginPath, pluginHandle);
|
||||
m_data->m_pluginMap.insert(pluginPath, pluginUniqueId);
|
||||
|
||||
{
|
||||
b3PluginContext context;
|
||||
|
||||
@@ -12,6 +12,9 @@ includedirs {".","../../src", "../ThirdPartyLibs"}
|
||||
links {
|
||||
"BulletSoftBody", "Bullet3Common","BulletInverseDynamicsUtils", "BulletInverseDynamics", "BulletDynamics","BulletCollision", "LinearMath", "BussIK"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
links{"dl"}
|
||||
end
|
||||
|
||||
language "C++"
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ links {
|
||||
end
|
||||
if os.is("Linux") then
|
||||
defines {"_LINUX"}
|
||||
links{"dl"}
|
||||
end
|
||||
if os.is("MacOSX") then
|
||||
defines {"_DARWIN"}
|
||||
|
||||
@@ -14,6 +14,7 @@ project ("App_PhysicsServerSharedMemoryBridgeUDP")
|
||||
links {"Ws2_32","Winmm"}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
links{"dl"}
|
||||
end
|
||||
if os.is("MacOSX") then
|
||||
end
|
||||
@@ -68,6 +69,9 @@ if os.is("Windows") then
|
||||
defines { "WIN32" }
|
||||
links {"Ws2_32","Winmm"}
|
||||
end
|
||||
if os.is("Linux") then
|
||||
links{"dl"}
|
||||
end
|
||||
|
||||
language "C++"
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
includedirs {
|
||||
"."
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"*.cpp",
|
||||
"*.h",
|
||||
|
||||
@@ -11,6 +11,9 @@ end
|
||||
|
||||
defines { "GWEN_COMPILE_STATIC" }
|
||||
defines { "DONT_USE_GLUT"}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
includedirs {
|
||||
".",".."
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
includedirs {
|
||||
".","include","src"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"src/SimpleSocket.cpp",
|
||||
"src/ActiveSocket.cpp",
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
includedirs {
|
||||
".","include"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"callbacks.c",
|
||||
"compress.c",
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
includedirs {
|
||||
"src"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"src/*.c",
|
||||
"src/*.h"
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
includedirs {"include"}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
if os.is("Windows") then
|
||||
files{
|
||||
"src/impl/win.cc",
|
||||
|
||||
@@ -47,7 +47,7 @@ def main():
|
||||
print(obs)
|
||||
episode_rew = 0
|
||||
while not done:
|
||||
env.render()
|
||||
env.render(mode='human')
|
||||
act = policy.sample_action(obs, .1)
|
||||
print("Action")
|
||||
print(act)
|
||||
|
||||
@@ -17,7 +17,7 @@ import time
|
||||
import subprocess
|
||||
import pybullet as p
|
||||
import pybullet_data
|
||||
|
||||
from pkg_resources import parse_version
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -99,3 +99,9 @@ class CartPoleBulletEnv(gym.Env):
|
||||
|
||||
def _render(self, mode='human', close=False):
|
||||
return
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -14,6 +14,8 @@ import pybullet as p
|
||||
from . import kuka
|
||||
import random
|
||||
import pybullet_data
|
||||
from pkg_resources import parse_version
|
||||
|
||||
maxSteps = 1000
|
||||
|
||||
RENDER_HEIGHT = 720
|
||||
@@ -254,3 +256,8 @@ class KukaCamGymEnv(gym.Env):
|
||||
#print(reward)
|
||||
return reward
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -13,6 +13,7 @@ import pybullet as p
|
||||
from . import kuka
|
||||
import random
|
||||
import pybullet_data
|
||||
from pkg_resources import parse_version
|
||||
|
||||
largeValObservation = 100
|
||||
|
||||
@@ -185,6 +186,7 @@ class KukaGymEnv(gym.Env):
|
||||
def _render(self, mode="rgb_array", close=False):
|
||||
if mode != "rgb_array":
|
||||
return np.array([])
|
||||
|
||||
base_pos,orn = self._p.getBasePositionAndOrientation(self._kuka.kukaUid)
|
||||
view_matrix = self._p.computeViewMatrixFromYawPitchRoll(
|
||||
cameraTargetPosition=base_pos,
|
||||
@@ -199,7 +201,12 @@ class KukaGymEnv(gym.Env):
|
||||
(_, _, px, _, _) = self._p.getCameraImage(
|
||||
width=RENDER_WIDTH, height=RENDER_HEIGHT, viewMatrix=view_matrix,
|
||||
projectionMatrix=proj_matrix, renderer=self._p.ER_BULLET_HARDWARE_OPENGL)
|
||||
rgb_array = np.array(px)
|
||||
#renderer=self._p.ER_TINY_RENDERER)
|
||||
|
||||
|
||||
rgb_array = np.array(px, dtype=np.uint8)
|
||||
rgb_array = np.reshape(rgb_array, (RENDER_WIDTH, RENDER_HEIGHT, 4))
|
||||
|
||||
rgb_array = rgb_array[:, :, :3]
|
||||
return rgb_array
|
||||
|
||||
@@ -276,10 +283,8 @@ class KukaGymEnv(gym.Env):
|
||||
#print(reward)
|
||||
return reward
|
||||
|
||||
def reset(self):
|
||||
"""Resets the state of the environment and returns an initial observation.
|
||||
|
||||
Returns: observation (object): the initial observation of the
|
||||
space.
|
||||
"""
|
||||
return self._reset()
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -10,7 +10,8 @@ import pybullet_data
|
||||
import pdb
|
||||
import distutils.dir_util
|
||||
import glob
|
||||
|
||||
from pkg_resources import parse_version
|
||||
import gym
|
||||
|
||||
class KukaDiverseObjectEnv(KukaGymEnv):
|
||||
"""Class for Kuka environment with diverse objects.
|
||||
@@ -324,3 +325,9 @@ class KukaDiverseObjectEnv(KukaGymEnv):
|
||||
for object_index in selected_objects:
|
||||
selected_objects_filenames += [found_object_directories[object_index]]
|
||||
return selected_objects_filenames
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
|
||||
reset = _reset
|
||||
|
||||
step = _step
|
||||
@@ -385,3 +385,8 @@ class MinitaurBulletDuckEnv(gym.Env):
|
||||
scale=self._observation_noise_stdev, size=observation.shape) *
|
||||
self.minitaur.GetObservationUpperBound())
|
||||
return observation
|
||||
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -20,6 +20,7 @@ from . import minitaur
|
||||
import os
|
||||
import pybullet_data
|
||||
from . import minitaur_env_randomizer
|
||||
from pkg_resources import parse_version
|
||||
|
||||
NUM_SUBSTEPS = 5
|
||||
NUM_MOTORS = 8
|
||||
@@ -376,3 +377,9 @@ class MinitaurBulletEnv(gym.Env):
|
||||
scale=self._observation_noise_stdev, size=observation.shape) *
|
||||
self.minitaur.GetObservationUpperBound())
|
||||
return observation
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -14,6 +14,7 @@ from . import racecar
|
||||
import random
|
||||
from . import bullet_client
|
||||
import pybullet_data
|
||||
from pkg_resources import parse_version
|
||||
|
||||
RENDER_HEIGHT = 720
|
||||
RENDER_WIDTH = 960
|
||||
@@ -174,3 +175,9 @@ class RacecarGymEnv(gym.Env):
|
||||
reward = -closestPoints[0][8]
|
||||
#print(reward)
|
||||
return reward
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -14,6 +14,7 @@ from . import bullet_client
|
||||
from . import racecar
|
||||
import random
|
||||
import pybullet_data
|
||||
from pkg_resources import parse_version
|
||||
|
||||
RENDER_HEIGHT = 720
|
||||
RENDER_WIDTH = 960
|
||||
@@ -189,3 +190,9 @@ class RacecarZEDGymEnv(gym.Env):
|
||||
reward = -closestPoints[0][8]
|
||||
#print(reward)
|
||||
return reward
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -12,7 +12,7 @@ import time
|
||||
import pybullet as p
|
||||
from . import simpleHumanoid
|
||||
import random
|
||||
|
||||
from pkg_resources import parse_version
|
||||
|
||||
import pybullet_data
|
||||
|
||||
@@ -109,3 +109,9 @@ class SimpleHumanoidGymEnv(gym.Env):
|
||||
reward=self._humanoid.distance
|
||||
print(reward)
|
||||
return reward
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
step = _step
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import gym, gym.spaces, gym.utils, gym.utils.seeding
|
||||
import numpy as np
|
||||
import pybullet as p
|
||||
|
||||
from pkg_resources import parse_version
|
||||
|
||||
class MJCFBaseBulletEnv(gym.Env):
|
||||
"""
|
||||
@@ -100,6 +100,7 @@ class MJCFBaseBulletEnv(gym.Env):
|
||||
rgb_array = rgb_array[:, :, :3]
|
||||
return rgb_array
|
||||
|
||||
|
||||
def _close(self):
|
||||
if (self.ownsPhysicsClient):
|
||||
if (self.physicsClientId>=0):
|
||||
@@ -109,6 +110,18 @@ class MJCFBaseBulletEnv(gym.Env):
|
||||
def HUD(self, state, a, done):
|
||||
pass
|
||||
|
||||
# backwards compatibility for gym >= v0.9.x
|
||||
# for extension of this class.
|
||||
def step(self, *args, **kwargs):
|
||||
return self._step(*args, **kwargs)
|
||||
|
||||
if parse_version(gym.__version__)>=parse_version('0.9.6'):
|
||||
close = _close
|
||||
render = _render
|
||||
reset = _reset
|
||||
seed = _seed
|
||||
|
||||
|
||||
class Camera:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
r"""An example to run of the minitaur gym environment with sine gaits.
|
||||
"""
|
||||
|
||||
import os
|
||||
import inspect
|
||||
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||
os.sys.path.insert(0,parentdir)
|
||||
|
||||
import math
|
||||
import numpy as np
|
||||
from pybullet_envs.bullet import minitaur_gym_env
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import os
|
||||
import inspect
|
||||
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||
os.sys.path.insert(0,parentdir)
|
||||
|
||||
import pybullet as p
|
||||
import math
|
||||
import time
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
includedirs {".."}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
files {
|
||||
"**.cpp",
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
kind "StaticLib"
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
includedirs {".."}
|
||||
|
||||
files {
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
".."
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
files {
|
||||
"**.cpp",
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
|
||||
includedirs {".."}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
files {
|
||||
"**.cpp",
|
||||
|
||||
@@ -9,6 +9,9 @@ function createProject(vendor)
|
||||
|
||||
kind "StaticLib"
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
includedirs {
|
||||
".",".."
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
"../../../src"
|
||||
}
|
||||
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
files {
|
||||
"**.cpp",
|
||||
"**.h"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
project "BulletCollision"
|
||||
|
||||
kind "StaticLib"
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
includedirs {
|
||||
"..",
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
includedirs {
|
||||
"..",
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"Dynamics/*.cpp",
|
||||
"Dynamics/*.h",
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
project "BulletInverseDynamics"
|
||||
|
||||
kind "StaticLib"
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
includedirs {
|
||||
"..",
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
includedirs {
|
||||
"..",
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
files {
|
||||
"**.cpp",
|
||||
"**.h"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
project "LinearMath"
|
||||
|
||||
kind "StaticLib"
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
includedirs {
|
||||
"..",
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ INCLUDE_DIRECTORIES(
|
||||
#ADD_DEFINITIONS(-DGTEST_HAS_PTHREAD=1)
|
||||
ADD_DEFINITIONS(-DPHYSICS_LOOP_BACK -DPHYSICS_SERVER_DIRECT -DENABLE_GTEST -D_VARIADIC_MAX=10)
|
||||
|
||||
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||
LINK_LIBRARIES(BulletSoftBody)
|
||||
ENDIF()
|
||||
|
||||
LINK_LIBRARIES(
|
||||
BulletInverseDynamicsUtils BulletInverseDynamics BulletFileLoader BulletWorldImporter Bullet3Common BulletDynamics BulletCollision LinearMath gtest BussIK
|
||||
)
|
||||
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
|
||||
LINK_LIBRARIES(BulletSoftBody)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT WIN32)
|
||||
LINK_LIBRARIES( pthread )
|
||||
|
||||
@@ -164,6 +164,9 @@ project ("Test_PhysicsServerLoopBack")
|
||||
"BussIK",
|
||||
"LinearMath"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
links{"dl"}
|
||||
end
|
||||
|
||||
files {
|
||||
"test.c",
|
||||
@@ -250,6 +253,9 @@ end
|
||||
"BussIK",
|
||||
"LinearMath"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
links{"dl"}
|
||||
end
|
||||
|
||||
files {
|
||||
"test.c",
|
||||
|
||||
@@ -16,3 +16,7 @@
|
||||
includedirs {
|
||||
".","include"
|
||||
}
|
||||
if os.is("Linux") then
|
||||
buildoptions{"-fPIC"}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user