Commit Graph

280 Commits

Author SHA1 Message Date
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
Erwin Coumans
3cdbc4cc29 fix CartPoleBulletEnv-v1 and add CartPoleContinuousBulletEnv-v0 (continuous version) 2020-01-02 19:33:57 -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
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
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
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
Erwin Coumans
7241fe19b9 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-12-13 09:21:00 -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
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
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
David Rusu
dd3bdf0da1 Use pybullet_utils.bullet_client for all our BulletClient needs 2019-12-08 20:10:12 -05: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
7c5796b67d update Laikago robot with textures, and a version with toes to enable inverse kinematics. 2019-12-04 14:48:28 -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
Erwin Coumans
56d0b7a09a deep_mimic, read velocity from poseInterpolator, not kinematic model
This fixes issue #2401
2019-11-29 08:05:54 -08:00
Krishnan Srinivasan
0d4108f307
Fix call to convert_to_leg_model
Fix call to convert_to_leg_model which is defined as a static method without an underscore in MinitaurExtendedEnv
2019-10-29 16:00:55 -07:00
erwincoumans
3ac4959e95
Update DeepMimic_Optimizer.py 2019-08-02 07:08:51 -07:00
erwincoumans
4a4c807381
Update DeepMimic_Optimizer.py
remove timing
2019-08-01 21:24:28 -07:00
erwincoumans
d2665d3d80
Merge pull request #2305 from BartMoyaers/parse_contact_bodies
parse fall contact bodies
2019-07-27 10:09:36 -07:00
Erwin Coumans
bd9fe7afc0 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-07-23 07:27:55 -07:00
Erwin Coumans
2e85490b6b deep_mimic: replace retrained backflip policy 2019-07-23 07:27:17 -07:00
Erwin Coumans
bb962bdb6f remove some left-over debugging from deep_mimic
pybullet bump up to 2.5.3
2019-07-22 17:47:02 -07:00
Erwin Coumans
b433e07d33 pybullet_envs.deep_mimic: use getLinkStates for faster 'getReward'
pybullet_envs.deep_mimic: add profile timers for each thread to optimize training
2019-07-22 17:18:41 -07:00
Erwin Coumans
d82c2043f0 enable useArray for deep_mimic reward 2019-07-21 13:56:10 -07:00
Erwin Coumans
39a4e8dcd9 Implement faster array versions of PyBullet: getJointStatesMultiDof, getLinkStates, setJointMotorControlMultiDofArray, resetJointStatesMultiDof,
Implement StablePD in C++ through setJointMotorControlMultiDofArray method for pybullet_envs.deep_mimic, see testHumanoid.py and examples/pybullet/examples/humanoidMotionCapture.py
Minor fix in ChromeTraceUtil in case startTime>endTime (why would it happen?)
2019-07-21 13:08:22 -07:00
Bart Moyaers
2e2169690c parse fall contact bodies 2019-06-24 15:52:27 +02:00
Erwin Coumans
8f9fac99bd add kinematic version that also updates the base position/orientation from the base 2019-06-13 13:26:52 -07:00
bla
3e32cf94e7 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2019-06-06 21:54:47 +00:00
bla
6ab09fe06e fix testlaikago and pd_controller_stable 2019-06-06 21:54:22 +00:00
Erwin Coumans
3c74ae8366 Add approximate Mini Cheetah URDF and example in pybullet
Thanks to Sangbae Kim and Donghyun Kim at the MIT Biomimetics Robotics Lab
2019-05-31 14:21:10 -07:00
Erwin Coumans
1933661124 change quadruped, remove old files 2019-05-30 14:55:47 -07:00
erwincoumans
7a7652fd43
Merge pull request #2265 from akien-mga/dos2unix
Convert DOS (CRLF) source files to Unix (LF) line endings
2019-05-30 09:41:35 -07:00
Erwin Coumans
d7e863e51a update microtaur URDF and example, to be compatible with minitaur_rainbow_dash 2019-05-22 10:59:20 -04:00
Rémi Verschelde
d85b800702 Convert DOS (CRLF) source files to Unix (LF) line endings
Excluded `examples/pybullet/gym/pybullet_data/` which has many (3000+)
CRLF data files (obj, mtl, urdf), and `docs/pybullet_quickstart_guide`
which has generated .js and .htm files with CRLF line endings too.
2019-05-22 10:01:32 +02:00
Erwin Coumans
af5bfb4089 added Microtaur URDF file, with basic system identification
See https://www.youtube.com/watch?v=UmGnLgpEVTE
2019-05-21 22:33:16 -04:00
Erwin Coumans
de8013ff75 add minitaur extended to pybullet_envs 2019-05-07 19:43:02 -07:00
Erwin Coumans
61c099460c apply yapf 2019-04-27 14:22:02 -07:00
Erwin Coumans
efe73670ef Merge remote-tracking branch 'bp/master' 2019-04-27 14:19:58 -07:00
Erwin Coumans
ef9570c315 add yapf style and apply yapf to format all Python files
This recreates pull request #2192
2019-04-27 07:31:15 -07:00
erwincoumans
1da207efaa
Merge pull request #2209 from YungKC/patch-2
Should sort best directions that gives the highest rewards
2019-04-26 16:43:32 +02:00
Erwin Coumans
0d4392af58 rename laikago_walk.json -> txt 2019-04-18 14:18:34 -07:00
YungKC
61987dea85
Should sort best directions that gives the highest rewards
Found bug where the sort order would incorporate the lowest N rewards, instead of the highest. With this fix, one can now use fewer best directions instead.
2019-04-16 12:20:08 -07:00
erwincoumans
bf0eb4703d
Merge pull request #2200 from YungKC/patch-1
Fix render issue in server render mode (e.g., docker)
2019-04-16 06:31:58 -07:00
YungKC
8f9ff5e674
Fix render issue in server render mode (e.g., docker)
px is an 1D array, and cause a runtime error when trying to strip the color channels into RGB. I fixed this by first reshape the px array into am image compatible format first.
2019-04-12 17:42:26 -07:00
Erwin Coumans
4ae24083ee implement stablePD control version of testLaikago, in preparation for quadruped DeepMimic 2019-04-05 16:45:33 -07:00
erwincoumans
024af08320 Added laikago mocap data for a DeepMimic compatible walk cycle
Added testLaikago.py script to test this mocap data.
2019-04-04 19:40:21 -07:00
Erwin Coumans
4898887265 temporary disable experimental BulletRobotics examples 2019-03-26 15:07:55 -07:00
Erwin Coumans
2ba8c22397 add actuatornet code 2019-03-26 10:05:45 -07:00
iory
a8146024fd [pybullet/gym/pybullet_envs] Modified register's timestep_limit to max_episode_steps for gym 2019-03-24 03:32:20 +09:00
erwincoumans
9662ae4ba0
Update kuka_diverse_object_gym_env.py
Fix issue in glob to separate training/test data pattern. See https://github.com/bulletphysics/bullet3/issues/2158
Thank to @TomoyaFukui
2019-03-14 09:33:48 -07:00
Erwin Coumans
03e897d1f5 replace deep_mimic policies by versions trained using PyBullet, backflip works better now. 2019-02-24 20:12:18 -08:00
Erwin Coumans
6d2ed912f5 Merge remote-tracking branch 'bp/master' 2019-02-18 19:11:03 -08:00
erwincoumans
7e5ac33cf1
Merge pull request #2105 from Somedaywilldo/master
Add Human3.6M Support for deep_mimic Environment
2019-02-18 18:07:47 -08:00
erwincoumans
bdf9b10246 more work on pybullet_envs.deep_mimic.
allow btMultiBody to not wakeup (for some RL experiments)
move deep_mimic motion files to data/motions folder, so we can use the args files unmodified.
2019-02-18 17:57:02 -08:00
erwincoumans
79a273f644 deep_mimic: add option for spherical joint drive motor, next to stable PD control
(existing policies won't work with those motors, needs tuning and re-training)
2019-02-12 20:42:05 -08:00
Somedaywilldo
59d58ce430 add Human3.6M support for deep_mimic env 2019-02-13 00:13:56 +08:00
Erwin Coumans
aaae366a21 towards python 2.x support for deep_mimic (still issue with Logger.print2) 2019-02-11 10:03:26 -08:00
Erwin Coumans
786ddec076 disable GUI in deep_mimic, it slows down too much on Mac OSX 2019-02-11 09:44:59 -08:00
Erwin Coumans
30290dfba1 add missing __init__.py for pip 2019-02-11 09:20:44 -08:00
Erwin Coumans
2728294c53 more fixes in deep_mimic env 2019-02-11 09:15:42 -08:00
Erwin Coumans
1bd201eb43 fixes in PyBullet deep_mimic to allow running in pip version 2019-02-11 08:51:07 -08:00
erwincoumans
d4292fdac3 PyBullet deep_mimic fix computeAngVelRel 2019-02-10 21:37:34 -08:00
erwincoumans
be20ed6aa2 remove obsolete deep_mimic files (use the one in deep_mimic/env)
add plane_implicit.urdf
2019-02-10 21:04:28 -08:00
erwincoumans
9bddca873c allow pybullet_envs.deep_mimic.testrl --arg_file run_humanoid3d_backflip_args.txt to perform a backflip. Can only backflip twice, then drops on ground.
this deepmimic is still very slow, due to slow mass matrix/inverse dynamics computation. once spherical motor drive is enabled, it should be fast(er)
move pd_controller_stable to pybullet_utils for easier re-use
add plane_transparent.urdf to pybullet_data
allow spacebar in keyboardEvents (Windows for now)
2019-02-10 20:56:31 -08:00
erwincoumans
28c9ea3aad PyBullet: add domino asset and example 2019-02-10 19:44:39 -08:00
Erwin Coumans
2eace2f715 update mpi usage 2019-02-01 19:20:08 -08:00
Erwin Coumans
176edeff1e add mpi_run version (not working yet) 2019-02-01 17:57:31 -08:00
Erwin Coumans
1cef924973 deepmimic fix: reference initialization wasn't spread over all frames 2019-02-01 17:18:13 -08:00
Erwin Coumans
7cc2685faf enable deepmimic training on mac 2019-02-01 16:24:48 -08:00
erwincoumans
63e781b88b PyBullet env for DeepMimic (preliminary work-in-progress) 2019-01-31 21:32:51 -08:00
erwincoumans
5d871806eb enable stable PD plugin in premake4.lua PyBullet
add a normalize in the setRotation axis/angle to be sure.
Add more code from the DeepMimic project, training doesn't work yet.
2019-01-31 21:31:26 -08:00
Erwin Coumans
63683e8f02 fix Issue 2039 2019-01-28 16:24:44 -08:00
Erwin Coumans
0818112ede fix some gym envs 2019-01-28 16:21:52 -08:00
erwincoumans
c97d1041ed
Merge pull request #2037 from araffin/update-gym
Update gym envs
2019-01-28 10:14:09 -08:00
erwincoumans
505cb15600 proto2csv 2019-01-27 12:11:40 -08:00
erwincoumans
6c2568bf5e PyBullet Minitaur: Fix Minitaur logging (binary file)
PyBullet Minitaur: Add minitaur_raibert_controller_example.py
2019-01-27 11:37:35 -08:00
erwincoumans
03549ca7c6 pass force as array instead of value 2019-01-23 17:24:10 -08:00
gaurav pathak
7f73081a89
Added code for issue #2036
Made necessary changes to ```humanoid_deep_mimic_env.py``` file, setting ```initial_frame``` to new position after simulation steps and setting ```SimTime``` using this new initial frame time
2019-01-03 18:17:08 -05:00
Antonin RAFFIN
f9fdf89c06 Fix indentation 2018-12-31 12:52:43 +01:00
Antonin RAFFIN
1c61b629e3 Fix formating issues 2018-12-31 12:48:42 +01:00
Antonin RAFFIN
0df3527884 Fix gym deprecation warnings 2018-12-28 14:30:05 +01:00
Erwin Coumans
2e30a9565b add humanoid_deepmimic_gym_env.py for HumanoidDeepMimicBulletEnv-v1 (still untested) 2018-11-25 15:33:28 -08:00
erwincoumans
bb6f4fb17c improve the ARS implementation: add multiprocessing Gym environment stepping, add command-line parameters to resume a policy, --render, --movie, --steps, --env 2018-11-24 11:54:36 -08:00
erwincoumans
ca36a82c62 add deepmimic args file (for testing)
implement deepmimic reward function (only joint angles/velocities for now)
fix an out-of-date comment, related to contactPoint.m_lateralFrictionInitialized in btSequentialImpulseConstraintSolver.cpp
2018-11-23 18:32:23 -08:00
erwincoumans
121cdc91b0 more work on PyBullet implementation of DeepMimic humanoid mimic of motion capture.
b3Quaternion, deal with zero-length axis (in axis,angle constructor)
2018-11-21 11:09:10 -08:00
erwincoumans
9e99f5cdbc Expose PyBullet.calculateVelocityQuaternion, getAxisAngleFromQuaternion, getQuaternionFromAxisAngle, getDifferenceQuaternion
Add preparation for DeepMimic humanoid environment, replicating parts of https://github.com/xbpeng/DeepMimic
Loading humanoid.urdf and applying motion action: examples/pybullet/gym/pybullet_envs/mimic/humanoid.py
Loading MotionCapture data: examples/pybullet/gym/pybullet_envs/mimic/motion_capture_data.py
Little test: examples/pybullet/gym/pybullet_envs/mimic/humanoid_test.py
2018-11-16 17:29:03 -08:00
Erwin Coumans
8b53e47fe8 add simpler ARS implementation, thanks to Alexis Jacq and Hadelin de Ponteves
(will add save/restore of policy and rendering movies through command-line arguments soon)
2018-11-02 11:19:46 -07:00
Erwin Coumans
44976780fa remove ARS files 2018-10-29 19:23:54 -07:00
Erwin Coumans
c2b9dc9361 update to CartPoleBulletEnv-v1 and check with latest baselines v0.1.5, works fine.
(make it more similar to classical control cartpole)
2018-10-29 16:44:12 -07:00
Erwin Coumans
0511a36a67 add Laikago quadruped model, thanks to Unitree for the cad meshes.
If you use the Laikago URDF, please add a citation to PyBullet:

@MISC{coumans2018,
author =   {Erwin Coumans and Yunfei Bai},
title =    {PyBullet, a Python module for physics simulation for games, robotics and machine learning},
howpublished = {\url{http://pybullet.org}},
year = {2016--2018}
}
2018-10-26 18:49:58 -07:00
erwincoumans
b5e475aec3 enable planar reflection in MinitaurGymEnv
enable follow cam in other Gym locomotion environments
add testing assets for multi-material obj files -> sdf conversion.
Also use ER_NO_SEGMENTATION_MASK flag for TinyRenderer/EGL plugin renderer
2018-10-14 15:10:19 -07:00
Joshua Aduol
cc4c02edc7 Fixed bugs mistaking forearm_roll_joint for upper_arm_roll_joint 2018-09-09 00:17:06 +01:00
Alexis David Jacq
6adea4964f
forgot one "isAlive" to change 2018-06-16 14:00:05 +02:00
Alexis David Jacq
50b5edd7b5
isDone instead of isAlive 2018-06-16 13:53:05 +02:00
Alexis David Jacq
292a3f1cf6
methode isAlive
Method def isAlive(self), which defaults to return self._alive < 0, and each environment can override this method (Half Cheetah would implement return False)

(In response to bea468fb93)
2018-06-15 17:55:20 +02:00