Commit Graph

191 Commits

Author SHA1 Message Date
erwincoumans
c2869e0a3c enable planar reflection in minitaur_gym_env.py and locomotion scenes 2018-04-11 08:50:29 -07:00
erwincoumans
39edcf699c bump up pybullet version, add missing sdf file 2018-04-10 22:59:53 -07:00
Erwin Coumans
7fa5e91cbd replace green stadium with blue checkered Bullet plane
add missing files to pybullet setup.pu
2018-04-10 19:55:26 -07:00
erwincoumans
5ff2a1d6c8
Update env_bases.py 2018-04-02 22:31:22 -07:00
erwincoumans
14d37ecb43 first pass of updated minitaur quadruped environment 2018-03-31 21:15:27 -07:00
jietan
413be3547b fix a bug that createVisualShape(Array) does not have the correct color. Add urdfEditor.py to pybullet_utils. 2018-03-12 21:06:19 -07:00
erwincoumans
d69fefd7e9
Merge pull request #1559 from shubhtuls/patch-1
minor bugfix in image reshaping in kukaGymEnv.py
2018-03-08 15:16:30 -08:00
Erwin Coumans
283d646e57 add random_urfs individually 2018-03-04 12:33:31 -08:00
Erwin Coumans
5688477bfb fix sdf warning 2018-02-23 18:56:11 -08:00
Erwin Coumans
15c46a0237 bump up pybullet version, add missing glad file(s) to MANIFEST.in 2018-02-21 11:46:53 -08:00
Erwin Coumans
8ba9644e78 fix __init__.py 2018-02-21 10:47:24 -08:00
Erwin Coumans
67318f3323 fix __init__.py 2018-02-21 10:45:06 -08:00
Erwin Coumans
a3c2ce1cef add __init__.py for pybullet_envs.prediction 2018-02-21 10:06:46 -08:00
erwincoumans
d3fe21ef17 Add option GUI_MAIN_THREAD for running OpenGL in the main thread (Python thread). This already happens on Mac OSX by default.
Pass all argc/argc from options to InProcessPhysicsClientSharedMemoryMainThread
2018-02-14 16:49:44 -08:00
erwincoumans
5e08d6d334 small test to create / simulate random box stacks 2018-02-14 15:37:50 -08:00
Shubham Tulsiani
5fdd7ed3b4
minor bugfix in image reshaping in kukaGymEnv
Reshaped image array should be of size (RENDER_HEIGHT, RENDER_WIDTH, 4) instead of (RENDER_WIDTH, RENDER_HEIGHT, 4).
2018-02-11 21:47:57 -08:00
erwincoumans
19231434c2 gym env backward compatibility due to gym 0.9.6 breaking changes 2018-02-06 10:20:41 -08:00
Sam Wenke
ad3c236bfd pybullet support for gym.Env, including v0.9.x 2018-02-04 11:35:47 -05:00
erwincoumans
13d67e8fc3 add bicycle resources and testBike.py script (use python -m pybullet_envs.examples.testBike after pip install pybullet)
center shadow around camera target
2018-01-31 22:17:15 -08:00
Erwin Coumans
cb0e740422 fix error in __init__.py 2018-01-27 10:25:26 -08:00
Erwin Coumans
2b5be5ca8a Merge remote-tracking branch 'bp/master' 2018-01-26 17:36:45 -08:00
erwincoumans
688d750d8a
Merge pull request #1531 from AndreaIncertiDelmonte/issue-1525
Override of the reset() public funciton in child classes
2018-01-26 13:10:47 -08:00
cedspam
3011cf1130
avoid errors in some ide docs system
there are some error linked to repeated import of this module in spyder, an env with the same id cannot be registered again
2018-01-26 09:29:39 +00:00
AndreaIncertiDelmonte
b908b147a6 Overwrite of the reset() public funciton in child classes 2018-01-26 10:09:14 +01:00
erwincoumans
0ce40b70c0
Merge pull request #1523 from kimhc6028/master
[fixed] gym_manipulator_envs typo
2018-01-25 13:36:42 -08:00
Erwin Coumans
c6fefb1018 remove useless gym env 2018-01-25 12:11:22 -08:00
Erwin Coumans
c4a046f16c remove baselines dependency (not needed, since it is a random policy) 2018-01-25 07:34:00 -08:00
erwincoumans
5d45fd5ca5 PyBullet: register KukaDiverseObjectGrasping-v0 to Gym. 2018-01-24 18:27:03 -08:00
erwincoumans
4ea406c73c PyBullet: improve examples/pybullet/gym/pybullet_envs/bullet/kuka_diverse_object_gym_env.py
(thanks to Deirdre Quillen for the environment)
Extend repeat, so gripper reaches the tray bottom.
Fix near plane so Z-Buffer is visible. Add sleep in return motion, in gui mode.
2018-01-24 18:21:59 -08:00
erwincoumans
72ec3effe6 Merge remote-tracking branch 'bp/master' 2018-01-24 18:11:33 -08:00
erwincoumans
1ec0543deb add random urdf zipfile for KUKA grasping env, thanks to Deirdre Quillen 2018-01-24 18:10:55 -08:00
erwincoumans
583b23ea40 PyBullet Humanoid Flagrun Harder: disable collision on target red sphere 2018-01-24 18:02:24 -08:00
erwincoumans
aba4671358 Humanoid Flagrun Harder, PyBullet version (request from Danijar)
Fix duplicate ground in all Roboschool converted scenes.
Fix bug in all PyBullet-Roboschool converted Humanoid environments (action needs to be clipped to [-1,1] range)
2018-01-24 17:53:40 -08:00
Erwin Coumans
b8362fff94 PyBullet pybullet_envs: fix issue with Humanoid environments (excessive forces, due to lack of action clamping)
PyBullet pybullet_envs: use 1./60 sleep, add enjoy_TF_HumanoidFlagrunHarderBulletEnv_v1_2017jul.py
2018-01-24 16:02:19 -08:00
kimhc6028
0d07ae03b7 [fixed] gym_manipulator_envs typo 2018-01-23 18:22:53 +09:00
Erwin Coumans
69007dcc61 fix MJCF loading (use self-collision) 2018-01-20 12:07:35 -08:00
deq2
e30f2624f9 Added kuka environment with multiple diverse objects. (#1508)
* Added new diverse object environment
2018-01-18 08:49:00 -08:00
Erwin Coumans
c6a350b807 BulletInverseDynaimcs: re-applied fix
PyBullet: increase humanoid training from 30 to 300M (need to figure out the right hyperparameters...)
2018-01-16 21:54:46 -08:00
erwincoumans
055930817e apply a maximum velocity for the KUKA arm, otherwise motion can become very unrealistic 2018-01-16 10:17:57 -08:00
erwincoumans
851ca5bfb3 Improve PyBullet ports of Roboschool envs: fix reset (it kept adding stadium objects, causing slowdown), now reset uses saveState/restoreState and reset becomes a few orders of magnitude faster.
Use python -m pybullet_envs.examples.testEnv --env AntBulletEnv-v0 --render=1 --steps 1000 --resetbenchmark=1

Added environments: HumanoidFlagrunBulletEnv-v0, HumanoidFlagrunHarderBulletEnv-v0, StrikerBulletEnv-v0, ThrowerBulletEnv-v0, PusherBulletEnv-v0, ReacherBulletEnv-v0, CartPoleBulletEnv-v0 and register them to OpenAI Gym.
Allow numpy/humanoid_running.py to use abtch or non-batch update (setJointMotorControl2/setJointMotorControlArray)
2018-01-15 12:48:32 -08:00
erwincoumans
22b4809891 leave m_useGlobalVelocities to false, until enabled, for backward compatibility
use URDF_GLOBAL_VELOCITIES_MB flag in PyBullet loadURDF.
fix robot_bases.py due to new fields in getJointInfo.
backward compabitibility: BulletMJCFImporter, keep creating btMultiSphereShape for MJCF capsules with fromto, instead of shifted btCapsuleShapeZ, unless if CUF_USE_IMPLICIT_CYLINDER is used.
2018-01-10 11:16:50 -08:00
Erwin Coumans
c88132b80f fix issue in pybullet_envs.agents
bump up to pybullet 1.6.9
2017-11-18 17:07:27 -08:00
Erwin Coumans
f483ccd8ef remote org configs 2017-11-16 16:49:25 +00:00
Erwin Coumans
7b030426c1 add a temp copy of TF agents (until the API stops changing or configs.py are included) 2017-11-16 16:47:14 +00:00
erwincoumans
6be7e34dd6 pybullet vr_kuka_setup.py: add a gear joint, to keep the gripper centered,
vr_kuka_control.py: control all joints, use analogue button to close gripper
remove some debug warnings/prints
pybullet, avoid crash in changeUserConstraint if not passing a [list]
allow some gym environments (pybullet_pendulum and locomotors) to re-use an existing physics client connection.
2017-11-12 10:36:30 -08:00
Erwin Coumans
4798d66f19 fixes in kuka/racecar environment. kuka still doesn't train well, work-in-progress 2017-11-01 18:06:47 -07:00
Erwin Coumans
e4f58ddc33 fix typo, add train_ppo kuka task 2017-10-31 16:33:13 -07:00
Erwin Coumans
3709e68645 fix discrete versions of kuka grasping environment
should fix issue 1386
2017-10-31 16:14:20 -07:00
Erwin Coumans
33d32d7ab4 add continuous version of kuka cam gym env test 2017-10-31 16:10:02 -07:00
Erwin Coumans
4e2dfbe58e add minitaur duck environment
see also  https://www.youtube.com/watch?v=SLwUCMZdKLo and
evolution strategies (hardmaru):
https://twitter.com/hardmaru/status/925074585984237568
2017-10-31 16:05:52 -07:00
Erwin Coumans
55f5e52ecd add continuous versions of kukaGymEnv, kukaCamGymEnv, racecarZEDGymEnv etc.
should be trainable with PPO or evolution strategies (ES) now
2017-10-31 15:50:34 -07:00
Erwin Coumans
9385f36505 add cartpole_bullet, should fix issue 1403 2017-10-25 08:37:01 -07:00
Erwin Coumans
d18bfec1a9 API changes in TensorFlow Agents
See 164f620326 (diff-82bda908f176861c20aadc1d017c2527)
2017-10-20 20:32:49 -07:00
Erwin Coumans
91d164d886 remove obsolete CartPoleBulletEnv 2017-10-09 09:44:54 -07:00
Erwin Coumans
0948ce5984 import missing functools 2017-09-28 10:42:02 -07:00
Erwin Coumans
345836d670 revert to original agents train/visualize scripts, but using pybullet envs in configs.py (agents lacks a convenient way to extend environments) 2017-09-28 10:19:41 -07:00
yunfeibai
85be3b43dd Merge remote-tracking branch 'upstream/master' 2017-09-27 15:20:11 -07:00
yunfeibai
113e103bc2 Modify the joint damping input check, and output error message when it doesn't pass the size check. Modify the kuka grasping example accordingly. Setting joint damping in this example was a no-op before. 2017-09-27 15:18:08 -07:00
Erwin Coumans
4dca5b3ef5 fix typos in agents config 2017-09-27 12:17:59 -07:00
Erwin Coumans
a716752915 add __init__.py file in agents folder 2017-09-27 10:30:05 -07:00
Erwin Coumans
5082d6af15 bump up pybullet version, instruction to visualize agents ppo:
python -m pybullet_envs.agents.visualize_ppo -config=pybullet_pendulum --logdir=pendulum/20170927T101514-pybullet_pendulum/ --outdir=vid

tensorboard --logdir=20170927T101514-pybullet_pendulum --port=2222
2017-09-27 10:26:45 -07:00
Erwin Coumans
e4a3b3fe38 add TensorFlow Agents PPO training script for various pybullet environments:
example:

python -m pybullet_envs.agents.train_ppo --config=pybullet_pendulum --logdir=pendulum
2017-09-27 10:20:38 -07:00
Erwin Coumans
c37919604f add minitaur environment randomizer, enable it by default
this improves PPO training ( more stable)
2017-09-27 09:07:21 -07:00
Erwin Coumans
f4b28dddce fix rendering ("rgb_array") for pendulums/pendula 2017-09-15 16:33:22 -07:00
Erwin Coumans
81bf709ad7 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-09-15 13:12:06 -07:00
Erwin Coumans
3d7ee317db fix pybullet gym environments: InvertedDoublePendulumBulletEnv-v0,
InvertedPendulumBulletEnv-v0, InvertedPendulumSwingupBulletEnv-v0

motors were not disabled, extra gains applied etc.
2017-09-15 13:09:05 -07:00
erwincoumans
ffb05d74da Merge pull request #1308 from benelot/fix-gyms
Fix gyms to make them work just like robotschool
2017-09-14 07:40:51 -07:00
Benelot
3f57fb655a Enable randomized reset for Humanoid. 2017-09-14 12:53:12 +02:00
Benelot
2e8a86462f Remove tweaks added by me but not part of roboschool. 2017-09-14 12:52:21 +02:00
Erwin Coumans
340a8f4704 add sigaction handler to Example Browser, to always shutdown shared memory
make GUI_SERVER more reliable
next attempt to connect to SHARED_MEMORY in Gym envs, if available, before DIRECT/GUI
allow software rendering fallback, even if ER_BULLET_HARDWARE_OPENGL is chosen in getCameraImage
2017-09-13 13:30:16 -07:00
Erwin Coumans
c250a5f0b9 re-enable shared memory connection for pybullet Gym envs (with fallback to GUI or DIRECT)
suppress shared memory connection warnings
add fallback from ER_BULLET_HARDWARE_OPENGL to TinyRenderer if not available
2017-09-13 09:56:39 -07:00
Erwin Coumans
3891602784 enable continuous action space for racecarZEDGymEnv
disable SHARED_MEMORY connection (it was just some debug test)
2017-09-11 17:34:06 -07:00
Erwin Coumans
105c2c948f add simple 'runServer.py' script, that lets you run a GUI shared memory server to connect to 2017-09-11 09:38:55 -07:00
Erwin Coumans
f38b2cf14d use SHARED_MEMORY as first connection attempt, to make visualization/OpenGL rendering easier 2017-09-11 09:23:14 -07:00
Erwin Coumans
ee082396d1 fixes in libdl/DL cmake
minor tweaks in pybullet OpenAI gym locomotion envs (connect to shared memory before going GUI/DIRECT)
bump up pybullet version to 1.3.6
2017-09-10 16:22:45 -07:00
Erwin Coumans
466c853489 add testMJCF.py script, to visualize MJCF file 2017-09-10 10:45:38 -07:00
Erwin Coumans
125380ce15 revert feet related reward in ant 2017-09-09 22:35:48 -07:00
Erwin Coumans
de28334a70 tweak to testEnv.py, sample usage:
python testEnv.py --rgb=1 --render=1 --step=100000 --env="HumanoidBulletEnv-v0"
2017-09-09 16:36:42 -07:00
Erwin Coumans
ce64aff7af ant env, fix feet_collision reward issue 2017-09-09 16:00:03 -07:00
Erwin Coumans
666c824b81 enable pybullet_env Ant Gym rendering, tinyRenderer has some issue with the ant.xml file though 2017-09-09 15:27:10 -07:00
Erwin Coumans
4f47a223ef more fixes in Gym Ant to make reward the same as Roboschool,
apparently feet_collision_cost is not properly updated in Roboschool,
for now, disable it in pybullet too: see https://github.com/openai/roboschool/issues/63
2017-09-09 12:36:53 -07:00
Erwin Coumans
c144d9c045 add simple script to test some of the pybullet gym environments (work-in-progress/experimental) 2017-09-08 15:25:16 -07:00
Erwin Coumans
c30e9aea92 revert minitaur.urdf to previous (backward compatibility) and add _v1 for better version. 2017-09-07 11:23:41 -07:00
Erwin Coumans
b0e50d0d5a pybullet Gym envs: add more sleep in the enjoy functions to see what's happening. 2017-09-07 11:17:38 -07:00
Erwin Coumans
3d702879c5 pybullet: improvements in Gym Ant environment (work-in-progress) 2017-09-07 11:06:42 -07:00
Erwin Coumans
ff0cd65346 fix __init__.py, add stadium without collision for testing 2017-09-05 21:47:35 -07:00
Erwin Coumans
6d0e2cd527 update pybullet docs, add getList to pybullet_envs 2017-08-31 09:59:40 -07:00
Erwin Coumans
029b4debad fix in minitaur.py and add render function in minitaur_gym_env.py 2017-08-28 19:28:20 -07:00
Erwin Coumans
1900966805 small rename 2017-08-27 19:54:20 -07:00
Erwin Coumans
3f00c7bd49 small tweak in vr_kuka_setup.py example 2017-08-27 19:53:38 -07:00
Erwin Coumans
c8cb0a5f42 add missing sphere_small.urdf, add vr_kuka_setup.py example. 2017-08-27 19:41:40 -07:00
Erwin Coumans
1569f3845c more fixes in pybullet_gym envs/data.
implement pybullet.setAdditionalSearchPath
2017-08-27 19:34:00 -07:00
Erwin Coumans
d9faea8c1c add more URDF files to pybullet_data 2017-08-27 19:26:53 -07:00
Erwin Coumans
659e869b86 pybullet a bit more refactoring, moving around files.
pybullet: move data to pybullet_data package, with getDataPath() method
2017-08-27 18:08:46 -07:00
Erwin Coumans
e267f5c3d2 move pybullet.connect into the Gym environment.
If you like to enable rendering, call the env.render(mode="human") before calling the first env.reset
2017-08-26 14:58:48 -07:00
Erwin Coumans
51b7e1040f more fixes in the pybullet gym environments: use main instead of demo_run,
add missing main to some eaxmples.

pip install pybullet
train:
python -m pybullet_envs.examples.train_pybullet_cartpole

enjoy:
python -m pybullet_envs.examples.enjoy_pybullet_cartpole

enjoy pretrained environments:

python -m pybullet_envs.examples.enjoy_TF_AntBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_HalfCheetahBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_AntBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_HopperBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_HumanoidBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_InvertedDoublePendulumBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_InvertedPendulumBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_InvertedPendulumSwingupBulletEnv_v0_2017may
python -m pybullet_envs.examples.enjoy_TF_Walker2DBulletEnv_v0_2017may

Run some gym environment test:
python -m pybullet_envs.examples.racecarGymEnvTest

Create/Import a specific Gym environment:

python
import pybullet_envs
env = gym.make("AntBulletEnv-v0")
env = gym.make("HalfCheetahBulletEnv-v0")
env = gym.make("HopperBulletEnv-v0")
env = gym.make("HumanoidBulletEnv-v0")
env = gym.make("Walker2DBulletEnv-v0")
env = gym.make("InvertedDoublePendulumBulletEnv-v0")
env = gym.make("InvertedPendulumBulletEnv-v0")
env = gym.make("MinitaurBulletEnv-v0")
env = gym.make("RacecarBulletEnv-v0")
env = gym.make("KukaBulletEnv-v0")
env = gym.make("CartPoleBulletEnv-v0")
2017-08-26 13:13:53 -07:00
Erwin Coumans
1fc148d5d0 fixes in racecarGymEnv: implement 'render' rgb image, fix in naming,
fix in observation bounds.
2017-08-24 22:01:45 -07:00
Erwin Coumans
a975d094c3 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-08-24 13:33:58 -07:00
Erwin Coumans
cb6914fa4c use better defauls values for minitaur 2017-08-24 13:33:45 -07:00
Erwin Coumans
f0c32b84c0 allow continuous control for MIT racecar gym environment, use differential drive version 2017-08-23 23:12:26 -07:00