Commit Graph

3074 Commits

Author SHA1 Message Date
Erwin Coumans
ca5061fac3 set correct reward for deep_mimic gymenv (max episode = 1000 steps, 1 reward at each step)
terminate testrl.py at 1000, show reward
2020-03-13 14:52:12 -07:00
Erwin Coumans
9ecd0884d9 Connect deep_mimic_env.py to internal pybullet_deep_mimic_env.py
This adds two untested Gym environments to pybullet_envs. todo: train using PPO2 etc
HumanoidDeepMimicBackflipBulletEnv-v1
HumanoidDeepMimicWalkBulletEnv-v1
2020-03-13 14:52:12 -07:00
Erwin Coumans
812c675d4c prepare towards HumanoidDeepMimicBackflipBulletEnv-v1 and HumanoidDeepMimicWalkBulletEnv-v1
remove unused SubprocVecEnv from stable_baselines/enjoy.py
2020-03-13 14:52:12 -07:00
Erwin Coumans
55de20b945 add flag to assure deterministicOverlappingPairs 2020-03-13 14:52:12 -07:00
Erwin Coumans
91df837a79 use PyBullet's own visualizer for enjoy script, + add a time.sleep since it is way too fast (1000FPS for cart pole) 2020-03-13 14:52:12 -07:00
Xuchen Han
4b35af3830 change deformable teleport to absolute pose 2020-03-12 16:40:25 -07:00
Xuchen Han
6e97302610 activate deformable after teleporting 2020-03-12 16:39:28 -07:00
Xuchen Han
cbf282fb2f Add support for teleporting deformables 2020-03-12 16:39:28 -07:00
Xuchen Han
7dfef92267 Add support for picking deformable with mouse 2020-03-09 11:19:08 -07:00
Xuchen Han
41ca8b9e59 More parameter tuning for cloth-like behavior 2020-03-06 16:29:32 -08:00
Xuchen Han
ec0e9892b5 add slider demo 2020-03-06 16:04:34 -08:00
Chuyuan Fu
d02989cc96 fix space 2020-03-05 10:50:54 -08:00
Chuyuan Fu
b37448278a fix rigidbody activation 2020-03-05 10:48:56 -08:00
Xuchen Han
4efc983ca5 bug fixes and parameter tuning 2020-03-04 17:22:46 -08:00
erwincoumans
8a3e2e9fa6
Merge pull request #2653 from xhan0619/master
Bug fix in barycentric weight calculation
2020-03-03 11:53:22 -08:00
Xuchen Han
1cb9a0630f bug fix in barycentric weight calculation 2020-03-02 22:48:25 -08:00
erwincoumans
acb7f7ee8a
Merge pull request #2652 from xhan0619/master
Support separate render and simulation obj & fix sleeping issue for deformable.
2020-03-02 17:06:37 -08:00
erwincoumans
2b1e27834b
Merge pull request #2649 from erwincoumans/master
use PyBullet's own visualizer for enjoy script, + add a time.sleep si…
2020-03-02 16:43:21 -08:00
Xuchen Han
62537436f2 more Motor->NonContactInner 2020-03-02 16:03:27 -08:00
Xuchen Han
4f36e09747 Motor->NonContactInner 2020-03-02 16:00:40 -08:00
Xuchen Han
c86da93d58 fix type error 2020-03-02 13:29:59 -08:00
Erwin Coumans
1f3c0057e5 increase the number of steps from 1000 to 2000, to mimic multiple cycles 2020-03-02 12:52:14 -08:00
Xuchen Han
a6bc125945 formatting 2020-03-02 12:12:04 -08:00
Xuchen Han
dbf2050269 extrapolate render mesh 2020-03-02 12:12:04 -08:00
erwincoumans
44ddb17c0c
Merge pull request #2645 from xhan0619/master
Separate motor constraint iterations and expose API.
2020-03-01 21:48:22 -08:00
Erwin Coumans
6b393dffca set correct reward for deep_mimic gymenv (max episode = 1000 steps, 1 reward at each step)
terminate testrl.py at 1000, show reward
2020-03-01 21:27:30 -08:00
Erwin Coumans
81c1daacbb Connect deep_mimic_env.py to internal pybullet_deep_mimic_env.py
This adds two untested Gym environments to pybullet_envs. todo: train using PPO2 etc
HumanoidDeepMimicBackflipBulletEnv-v1
HumanoidDeepMimicWalkBulletEnv-v1
2020-03-01 21:13:10 -08:00
Erwin Coumans
7c5073d3ab prepare towards HumanoidDeepMimicBackflipBulletEnv-v1 and HumanoidDeepMimicWalkBulletEnv-v1
remove unused SubprocVecEnv from stable_baselines/enjoy.py
2020-03-01 13:11:47 -08:00
Erwin Coumans
7ecb769a9c add flag to assure deterministicOverlappingPairs 2020-03-01 12:22:47 -08:00
Erwin Coumans
da5ac61baa use PyBullet's own visualizer for enjoy script, + add a time.sleep since it is way too fast (1000FPS for cart pole) 2020-02-29 22:02:01 -08:00
Erwin Coumans
8e8955571f workaround for Tensorflow 2.x breaking API:
try:
  import tensorflow.compat.v1 as tf
except Exception:
  import tensorflow as tf
2020-02-29 20:35:05 -08:00
Xuchen Han
7ad19fde6f formatting 2020-02-26 14:16:51 -08:00
Xuchen Han
84117b8440 separate motor constraint iterations and expose API 2020-02-26 14:11:41 -08:00
Erwin Coumans
36738b7676 release memory of m_deformableBodySolver in ClothFriction demo. 2020-02-22 10:40:31 -08:00
erwincoumans
279a5c19d5
Merge pull request #2640 from erwincoumans/master
PyBullet: add option to merge fixed links in URDF file, capsule field init
2020-02-21 17:49:51 -08:00
erwincoumans
3f4299d588
Merge pull request #2630 from vabr-g/vabr-g-dlerror-patch
Include dlerror() in handling of failed dlopen()
2020-02-21 17:26:13 -08:00
erwincoumans
e78eb2706d
Merge pull request #2627 from araffin/feat/sb-enjoy
Add enjoy script for Stable Baselines
2020-02-21 17:25:39 -08:00
erwincoumans
49960d18df
Update UrdfParser.cpp
fix cast
2020-02-21 16:49:05 -08:00
Erwin Coumans
0fd8598ca3 fix pybullet constants in previous commit 2020-02-21 16:16:13 -08:00
Erwin Coumans
f5afe9a1d1 Merge remote-tracking branch 'bp/master' 2020-02-21 15:12:17 -08:00
Erwin Coumans
e29ba9fe5c add option to merge fixed links in URDF file (improves performance, can handle URDF files with many fixed links)
add option to ignore visual and collision shapes in URDF file
2020-02-21 15:04:26 -08:00
Erwin Coumans
6910fc9229 initialize capsule from_to field 2020-02-21 02:05:01 -08:00
erwincoumans
bfba4ac2b6
Merge pull request #2637 from drigz/tf-compat
Replace tensorflow with tf.compat.v1
2020-02-20 10:56:21 -08:00
Rodrigo Queiro
d18531cc6a Replace tensorflow with tf.compat.v1
This means they won't break when using TensorFlow 2.0.
2020-02-19 17:35:48 +01:00
Antonin RAFFIN
21efd84c18 Add enjoy script for Stable Baselines 2020-02-15 21:06:10 +01:00
Erwin Coumans
0617f4f3cd expose computeDofCount to pybullet
expose computeDofCount and calculateMassMatrix to BulletRobotics C++ API
(all untested)
2020-02-14 19:58:32 -08:00
Erwin Coumans
56e6893ed9 Merge remote-tracking branch 'bp/master' 2020-02-14 17:37:18 -08:00
Erwin Coumans
6afa0a463d unsupported: expose collisionMargin to changeDynamics/getDynamicsInfo.
add cube_convex.urdf for testing this collisionMargin. Test script:
import pybullet as p
import time
p.connect(p.GUI)
plane = p.loadURDF("plane_implicit.urdf")
cube = p.loadURDF("cube_convex.urdf",[0,0,1])
p.setGravity(0,0,-10)
while (1):
	p.stepSimulation()
	pts = p.getContactPoints()
	p.changeDynamics(plane,-1,collisionMargin=0.3)
	p.changeDynamics(cube,-1,collisionMargin=0.3)
	print("===================")
	print("cube pos=", p.getBasePositionAndOrientation(cube)[0])
	print("margin=", p.getDynamicsInfo(plane,-1)[11])
	#time.sleep(1./10.)
2020-02-14 17:36:40 -08:00
erwincoumans
665c04fbed
Merge pull request #2622 from marcel303/NoGL-fixes
NoGL fixes
2020-02-14 14:54:14 -08:00
erwincoumans
f80806db49
Merge pull request #2623 from marcel303/TinyRender-namespace2
Put TinyRender functions and classes inside a TinyRender namespace.
2020-02-14 14:53:33 -08:00
vabr-g
dd8fcad6d8
Include dlerror() in handling of failed dlopen()
X11OpenGLWindow::X11OpenGLWindow() ends up calling dlopen() to get libX11.
When this fails, it only reports that it failed, and what filename it was looking for.
This commit adds dlerror() to the error message, which makes investigating failures easier.
2020-02-14 15:32:40 +01:00
Marcel Smit
bdb0cc2f3e LuaDemo compile fix. 2020-02-14 12:07:39 +01:00
Marcel Smit
40e44caedd Put TinyRender functions and classes inside a TinyRender namespace. The TinyRender library defines some classes with very generic names, such as vec, Matrix, Model, which in my case, when compiling the example browser using a different library for graphics, is giving me name clashes. 2020-02-14 11:54:25 +01:00
Marcel Smit
3b0f5812c9 NoGL: double to btScalar. 2020-02-14 11:30:45 +01:00
Marcel Smit
04f03d78af NoGL: Update ExampleBrowserInterface and EmptyBrowser, with interface methods added to the OpenGL example browser, but didn't get added to the interface and empty interface. Required to compile the in-process example browser without OpenGL dependency. 2020-02-14 11:23:28 +01:00
Marcel Smit
df0910e5a8 NoGL: Cleanup inverse kinematics example. It was still including an OpenGL-related header file, even though not using any OpenGL. 2020-02-14 11:12:47 +01:00
erwincoumans
b06cdd5fc1
Merge pull request #2612 from xhan0619/master
Improve intra-deformable collision and deformable self collision
2020-02-12 19:30:46 -08:00
Erwin Coumans
b3ff3ebcb1 add pendulum of 5 links 2020-02-12 13:05:51 -08:00
Erwin Coumans
e7ad8a9d67 add urdf file for testing 2020-02-11 15:10:22 -08:00
Xuchen Han
b9c0456d85 fix split impulse demo 2020-02-07 13:22:41 -08:00
Xuchen Han
3bc701c487 Improve intra-deformable collision and deformable self collision 2020-02-06 17:01:20 -08:00
Erwin Coumans
6195f40c02 fix compile issue in pybullet.c 2020-02-06 09:11:18 -08:00
erwincoumans
b809cdef5b
Merge pull request #2608 from erwincoumans/master
implement b3RobotSimulatorClientAPI_NoDirect::createVisualShape
2020-02-06 09:00:05 -08:00
Erwin Coumans
d0f895fbbd Merge branch 'master' of https://github.com/erwincoumans/bullet3 2020-02-04 20:59:26 -08:00
Erwin Coumans
401abd9ebc implement b3RobotSimulatorClientAPI_NoDirect::createVisualShape 2020-02-04 20:58:15 -08:00
Tigran Gasparian
19075f75b2 Only clear the user data cache when a full user data sync is requested. 2020-02-03 15:24:12 +01:00
erwincoumans
7380a55ba7
Merge pull request #2594 from RanTig/SyncSingleBodyUserData
Adds an option to syncUserData to specify the bodies for which to sync.
2020-01-29 19:23:44 -08:00
erwincoumans
9ac1dd6194
Merge pull request #2597 from erwincoumans/master
made char* in addUserDebugParameter const
2020-01-24 09:45:35 -08:00
Erwin Coumans
4c6e3daf5e made char* in addUserDebugParameter const 2020-01-24 08:43:20 -08:00
Tigran Gasparian
2403a22ebf Bump up shared memory magic number. 2020-01-23 16:58:32 +01:00
Tigran Gasparian
34db76d263 Adds an option to syncUserData to specify the bodies for which to sync. 2020-01-23 14:46:33 +01:00
Tigran Gasparian
899d53ee29 Added null check. 2020-01-21 19:40:22 +01:00
Tigran Gasparian
a88ffea416 . 2020-01-17 13:30:26 +01:00
Tigran Gasparian
68d3fb28e0 Adds support for loading user data from URDF files. 2020-01-17 11:55:42 +01:00
Erwin Coumans
1be6a1d16b fix loadpanda video generation
remove duplicate code (formerly Windows ffpmeg needed different settings?)
2020-01-12 08:07:54 -08:00
Erwin Coumans
84e2ea918c add xarm, modify loadpanda to work with pybullet_robots module 2020-01-12 07:20:32 -08:00
Erwin Coumans
fb15aea414 add example robots in pybullet_robots module 2020-01-12 07:11:57 -08:00
Erwin Coumans
3ca233193f : 2020-01-12 07:03:38 -08:00
Erwin Coumans
2f08938110 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2020-01-11 16:52:01 -08:00
erwincoumans
66ffa329c8
Merge pull request #2577 from xhan0619/master
Add position error into deformable vs. rigid contact
2020-01-11 16:05:15 -08:00
erwincoumans
a9615258d3
Merge pull request #2580 from erwincoumans/master
add --mp4fps=30 command line parameter for ExampleBrowser, various other fixes
2020-01-11 15:14:11 -08:00
Erwin Coumans
d328406cfa Merge branch 'master' of https://github.com/erwincoumans/bullet3 2020-01-11 13:17:00 -08:00
Erwin Coumans
8b578093a3 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2020-01-11 13:16:47 -08:00
Erwin Coumans
eee7bcbc14 remove debug/profile tag 2020-01-11 13:16:12 -08:00
Erwin Coumans
3f11b03255 add friction anchors for Panda gripper (prevents/reduces sliding objects out of gripper) 2020-01-11 13:13:28 -08:00
Erwin Coumans
8f8bbbee3b example how to create a video using PyBullet using GUI mode with ffmpeg, synchronizing video with stepSimulation at specific frame rate (240 Hz for example) 2020-01-11 13:06:45 -08:00
Erwin Coumans
2336dfcb9e Remove a temporary global static work matrix in the BussIK, since it conflicts with multithreaded applications.
Instead, let the user pass it in explicitly.
2020-01-11 12:43:27 -08:00
Erwin Coumans
83bdef8254 add --mp4fps=30 command line parameter for ExampleBrowser (and using pybullet.connect(p.GUI, options="--mp4fps=30 --mp4=\"testvideo.mp4\"") 2020-01-11 12:19:42 -08:00
erwincoumans
88826da6b5
Merge pull request #2576 from dmcconachie/DeformableGravity
[BUGFIX] Update existing deformable gravity forces on gravity change.
2020-01-09 21:30:48 -08:00
Erwin Coumans
8ebdf7862c fix b3RobotSimulatorClientAPI_NoDirect::changeConstraint API 2020-01-09 17:56:21 -08:00
Dale McConachie
b526c01bec Update existing deformable gravity forces on gravity change. 2020-01-09 16:24:32 -05:00
Erwin Coumans
5cd4647943 fix submitProfileTiming API in b3RobotSimulatorClientAPI_NoDirect 2020-01-09 10:40:14 -08:00
erwincoumans
c85e8f038b
Merge pull request #2574 from erwincoumans/master
fix indexing issue removing graphics shape in tinyrenderer plugin (us…
2020-01-08 21:20:52 -08:00
Erwin Coumans
07cdae8c6e also apply TinyRenderer remove shape fix for rigid body and soft body/deformable 2020-01-08 14:02:32 -08:00
Erwin Coumans
6fde189735 fix indexing issue removing graphics shape in tinyrenderer plugin (use getUserIndex3 instead of broadphase uid) 2020-01-08 13:49:41 -08:00
erwincoumans
2dcb372080
Merge pull request #2565 from araffin/feat/sb-example
Add Stable-Baselines example with SAC and TD3
2020-01-08 11:51:35 -08:00
Xuchen Han
ee2a811c09 parameter tweaks after testing on robot 2020-01-04 19:29:52 -08:00
Erwin Coumans
3cdbc4cc29 fix CartPoleBulletEnv-v1 and add CartPoleContinuousBulletEnv-v0 (continuous version) 2020-01-02 19:33:57 -08:00
Erwin Coumans
3c8cf390d4 one more fix in previous commit related to bullet_client.py 2020-01-02 14:45:42 -08:00
Antonin RAFFIN
adad4dc402 Update buffer size 2020-01-02 14:47:30 +01:00
Antonin RAFFIN
59c61a46bb Simplify imports 2020-01-02 11:12:45 +01:00
Antonin RAFFIN
da0483b03a Add colab notebook 2020-01-02 11:06:39 +01:00
Antonin RAFFIN
9c969614bc Add Stable-Baselines example with SAC and TD3 2020-01-02 11:00:45 +01:00
Erwin Coumans
c39afa61cb revert bullet_client.py 2020-01-01 20:27:27 -08:00
Erwin Coumans
a9455ce891 add 'runServer.py' script in pybullet_utils, this will run a GUI server
that accepts SHARED_MEMORY connections. Handy if you run a pybullet_envs Gym environment
and want to visualize it. By default, bullet_client will try to connect to a shared memory connection first.
2020-01-01 18:53:32 -08:00
Erwin Coumans
b6dea7ba64 fix a few pybullet Gym environments for rendering in stable_baselines
if PYBULLET_EGL environment is set, try to enable EGL for faster rendering
bump up pybullet to 2.6.2
2020-01-01 18:47:46 -08:00
Xuchen Han
a274bcbfa3 add position error into deformable vs. rigid solve 2019-12-31 19:18:37 -08:00
Erwin Coumans
528bd28e34 increase plane from 30 to 200 (to allow quadrupeds to run further, not fall off cliff)
fix issue with gym.wrappers in pybullet_envs.agents.visualize_ppo.py
2019-12-31 18:13:49 -08:00
Xuchen Han
78a8ddb466 change default damping model for mass spring to the angular momentum conserving one 2019-12-31 14:08:21 -08:00
Xuchen Han
4ab550d358 update deformable demos 2019-12-31 14:05:45 -08:00
Xuchen Han
442047a862 more bug fixes 2019-12-27 13:16:31 -08:00
Erwin Coumans
ffc76fbf6d add xarm 6 example with inverse kinematics (IK) that runs about 150 microseconds (Ryzen 3900x) 2019-12-22 17:17:37 -08:00
erwincoumans
830f0a9565
Merge pull request #2550 from xhan0619/master
Group deformable constraint solves by islands
2019-12-20 16:26:32 -08:00
Xuchen Han
6a8973d2f4 address PR comment and tune parameters for cloth 2019-12-19 21:51:54 -08:00
Erwin Coumans
7a4023430a fix pybullet.submitProfileTiming 2019-12-19 18:05:41 -08:00
Erwin Coumans
9c7e6d6a48 enable programmatic creation of spherical joint 2019-12-19 16:56:09 -08:00
Xuchen Han
4ab0387262 Merge remote-tracking branch 'origin/master'
merge origin/master
2019-12-18 23:18:16 -08:00
erwincoumans
7584847f33
Merge pull request #2537 from erwincoumans/master
fix pybullet_envs path, pybullet version to 2.6.0, allow clang-cl on Windows
2019-12-17 19:06:11 -08:00
Xuchen Han
f65a8b03c0 separate deformable contact solve by islands WIP 2019-12-17 18:27:23 -08:00
Chuyuan Fu
0f477e27ae add link index to setdamping C APIs. If link index is not set, the command is igored for rigidbody 2019-12-17 13:48:34 -08:00
Xuchen Han
d38ea87027 add gripper with deformable cloth demo 2019-12-13 14:33:54 -08:00
Erwin Coumans
7241fe19b9 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-12-13 09:21:00 -08:00
Erwin Coumans
30b42a14f0 add single-link arm urdf files for debugging 2019-12-13 09:20:46 -08:00
Erwin Coumans
3668bc5e2a tweak premake4 default batch file.
add manual control for joint angles in XArm6 example.
2019-12-12 07:02:27 -08:00
Erwin Coumans
1a245f4e11 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-12-11 16:49:04 -08:00
Erwin Coumans
2f6eb59e16 add z-up version of Laikago, centered along the chassis center of mass 2019-12-11 16:47:52 -08:00
erwincoumans
08321b96ba
Update main_opengl_single_example.cpp
Apply fix from PR #2526 manually, thanks to  Andrew Meadows
2019-12-11 13:59:44 -08:00
Erwin Coumans
202cf18995 allow to compile using clang-cl on visual studio (disable SSE) 2019-12-11 13:07:53 -08:00
Erwin Coumans
d254b65fee Merge remote-tracking branch 'bp/master' 2019-12-10 15:48:24 -08:00
Erwin Coumans
e7778502e7 fix pybullet_envs path 2019-12-10 15:48:07 -08:00
erwincoumans
6c722f8f94
Merge pull request #2528 from jackson-waschura/master
Actually use self collisions when specified
2019-12-09 09:35:06 -08:00
erwincoumans
880faef997
Merge pull request #2535 from erwincoumans/master
Googley colors for xarm (debugging) and tweak example with table etc.…
2019-12-09 09:26:47 -08:00
Erwin Coumans
1a491dc700 Googley colors for xarm (debugging) and tweak example with table etc. Add missing link6_vhacd.obj 2019-12-09 09:25:15 -08:00
erwincoumans
e0a43fb116
Merge pull request #2534 from erwincoumans/master
remove duplicate xarm6.urdf
2019-12-09 08:57:00 -08:00
Erwin Coumans
0a8ade5233 remove duplicate xarm6.urdf 2019-12-09 08:54:56 -08:00
erwincoumans
1b8d7be2b6
Merge pull request #2533 from erwincoumans/master
also enable simplified convex decomposition collision meshes for xarm…
2019-12-09 08:53:27 -08:00
Erwin Coumans
67905efd0f also enable simplified convex decomposition collision meshes for xarm6_robot.urdf 2019-12-09 08:51:02 -08:00
David Rusu
dd3bdf0da1 Use pybullet_utils.bullet_client for all our BulletClient needs 2019-12-08 20:10:12 -05:00
jackson-waschura
0b33d940e4 Actually use self collisions when specified 2019-12-08 13:54:38 +01:00
Erwin Coumans
70329ca2ad added Apache 2 license for Panda Franka URDF 2019-12-08 00:40:10 -08:00
Erwin Coumans
4cfd30f19c add Franka Panda URDF and example (python3 -m pybullet_envs.examples.loadpanda)
add XArm6 URDF with optimized collision meshes and example (XArm gripper needs more work) python3 -m pybullet_envs.examples.xarm
2019-12-08 00:38:49 -08:00
Erwin Coumans
146a751eb4 enable intermediate log for walk, so you can restart if stuck in local maximum 2019-12-05 08:34:34 -08:00
erwincoumans
c74b88b436
Merge pull request #2522 from erwincoumans/master
update Laikago robot with textures, and a version with toes to enable…
2019-12-04 21:14:21 -08:00
Erwin Coumans
91328f9280 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-12-04 15:49:30 -08:00
Erwin Coumans
7f3059c7a9 increase max number of parameters (to around 300) in debug GUI 2019-12-04 15:49:06 -08:00
Erwin Coumans
7c5796b67d update Laikago robot with textures, and a version with toes to enable inverse kinematics. 2019-12-04 14:48:28 -08:00
erwincoumans
ef08e9b415
Merge pull request #2517 from erwincoumans/master
enable self-collision for deep_mimic pybullet_envs, fix Mac Catalina pybullet pip build
2019-12-04 08:56:42 -08:00
erwincoumans
44f21e462a
Merge pull request #2509 from xhan0619/separate-bending-stiffness
Separate in-plane and bending stiffness for mass spring model
2019-12-04 07:34:28 -08:00
Erwin Coumans
763e25dd37 fix Mac Catalina pybullet build (setup.py) 2019-12-03 20:49:08 -08:00
Erwin Coumans
7f9f514b7e enable self-collision for deep_mimic pybullet_envs and make it easier to try it out:
python3 -m pybullet_envs.deep_mimic.testrl
2019-11-30 13:19:28 -08:00