Commit Graph

3682 Commits

Author SHA1 Message Date
jingyuc
107c5526eb reduced motor grasp example is working 2021-09-24 13:16:33 -04:00
jingyuc
5e0a805d73 separate two tangential direction for the multibody vs reduced deformable contact 2021-09-21 17:35:35 -04:00
jingyuc
9de3d25172 testing multibody vs reduced deformable friction. save files 2021-09-21 16:22:12 -04:00
erwincoumans
9c37ca5185
Merge pull request #3950 from bttner/fix_external_force_command
Fix: reference frame issue of external force command processor (Physics Server)
2021-09-20 14:34:52 -07:00
erwincoumans
47c3f5e994
Merge pull request #3963 from erwincoumans/master
revert linkNames in createMultiBody, we cannot pass pointers pointing… …
2021-09-20 13:07:30 -07:00
Erwin Coumans
87605ca4c8 revert linkNames in createMultiBody, we cannot pass pointers pointing to local memory (storing the string) around into shared memory or over the network. 2021-09-20 12:22:30 -07:00
jingyuc
064fdc40bd
Merge branch 'bulletphysics:master' into master 2021-09-16 16:09:55 -04:00
jingyuc
bfd3d1cd8d normal impulse for multibody vs reduced deformable contact is working 2021-09-15 16:45:20 -04:00
jingyuc
19375d6569 grasping cube set up 2021-09-13 23:05:21 -04:00
jingyuc
593f387a06 demo setup 2021-09-13 22:48:08 -04:00
Aaron Franke
ad74cfe6c8
Update Bullet URL in copyright statements 2021-09-13 09:06:14 -05:00
jingyuc
1c8afcf54f clean up reduced body creation 2021-09-12 23:21:20 -04:00
jingyuc
b4efd91476 add support for damping. the fixed constraint is working again with the deltaImpulse form 2021-09-12 21:53:23 -04:00
jingyuc
9d1aafc51c better support of initial rotation. 2021-09-10 13:34:34 -04:00
jingyuc
e62c42f54c rotate the modes when the mesh has a initial transformation. new grasping example with motor WIP 2021-09-09 18:35:07 -04:00
jingyuc
ce765a8a88 friction is now applied in a way similar to what the rigid body solver does 2021-09-08 19:00:55 -04:00
jingyuc
eef3b73cd2 fixed a sign issue in the friction of the reduced deformable vs moving rigid body contact 2021-09-07 18:38:13 -04:00
jingyuc
3a70641c65
Merge branch 'bulletphysics:master' into master 2021-09-07 15:25:11 -04:00
jingyuc
3a84b05058 Added a new friction slope example (ground is rotating). Fixed a problem in the reduced deformable's friction (now clamp the maximum tangential impulse based on the tangential velocity impulse at the current iteration, not the total tangential velocity at the beginning) 2021-09-06 17:56:32 -04:00
jingyuc
df07b42318 contact with moving rigid body is working. There is a sign error when calculating the deltaVelocity of the solverBody 2021-09-03 17:32:26 -04:00
jingyuc
f2e114fc81 fixed the wrong dimension used to calculate the inertia tensor in btReducedSoftBodyHelpers 2021-09-03 14:47:31 -04:00
jingyuc
e70fc6453b add support for initial rotation 2021-09-02 21:32:16 -04:00
erwincoumans
b638300fe4
Merge pull request #3951 from erwincoumans/master
implement resetMeshData for deformable bodies, fix tiny_renderer standalone example
2021-09-02 18:03:23 -07:00
Erwin Coumans
b6df08b553 implement resetMeshData for deformable bodies, this allows better reset for reinforcement learning algorithms. 2021-09-02 17:27:05 -07:00
jingyuc
93e00054e3 set up reduced grasping example 2021-09-02 13:35:14 -04:00
Felix Büttner
4b6ec20b30 External force and torque frame fix 2021-09-02 17:40:18 +02:00
erwin coumans
3577ef8108 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-09-01 15:00:10 -07:00
erwin coumans
7de63bdbc5 fix tiny_renderer standalone example 2021-09-01 15:00:01 -07:00
jingyuc
c2601663e4 debugging moving rigid vs reduced deformable contact 2021-09-01 16:36:52 -04:00
jingyuc
634c8b7b38
Merge branch 'bulletphysics:master' into master 2021-08-31 20:16:15 -04:00
jingyuc
42fac2e364 fixed a minor issue: disable deactivation for the reduced collision example 2021-08-31 01:33:38 -04:00
erwincoumans
31b8841efc
Merge pull request #3948 from erwincoumans/master
add low-resolution Laikago (for faster rendering in CPU renderer) and cleanup sdf files
2021-08-30 13:01:15 -07:00
Erwin Coumans
68424feb2d don't use empty frame for pose in sdf files
use hint for clang that if (0) is intentional
2021-08-30 19:40:20 +00:00
jingyuc
b1803afbb9 collision with moving rigid body seems to be working. checking why there is side motion 2021-08-30 13:19:33 -04:00
erwincoumans
5ec0820c0e
Merge pull request #3920 from araffin/feat/sb3
Migrate to Stable-Baselines3
2021-08-29 15:01:27 -07:00
jingyuc
3e76b11d46 add check for momentum conservation 2021-08-26 13:41:26 -04:00
jingyuc
f26e3d133d set up the reduced vs rigid collision example 2021-08-26 12:47:09 -04:00
jingyuc
6a87310d3c friction is working now 2021-08-25 16:38:57 -04:00
jingyuc
52abe35e41 friction seems to be working. However, when the block is only sliding on the surface, there is no friction because no delta normal impulse...need to think 2021-08-25 00:38:29 -04:00
jingyuc
c735830f0a more stable rigid contact 2021-08-24 15:08:57 -04:00
jingyuc
840db372b9 delta impulse version is working 2021-08-24 00:40:27 -04:00
jingyuc
d9152b9cf5 WIP warm starting 2021-08-23 01:17:58 -04:00
jingyuc
368385d5ad need to project the impulse on the normal to prevent sliding 2021-08-21 15:54:34 -04:00
Chuyuan Fu
e16c9bb1cc implement request deformable contact info 2021-08-18 18:48:35 -07:00
jingyuc
70ec2f9d46 use the correct relative position to apply the impulse 2021-08-18 16:24:46 -04:00
jingyuc
0444fea9eb collision impulse starts to look reasonable, but the motion is still strange. 2021-08-18 14:31:59 -04:00
erwin coumans
7ac95be8cd add training and run/eval scripts to train envs_v2 Laikago pmtg 2021-08-17 08:56:30 -07:00
jingyuc
eacdbe67a0 reduced velocity should be updated from i-th iteration instead of from the predicted state, because thexternal force has no memory of the previous iteration 2021-08-16 14:36:35 -04:00
jingyuc
9a17391a9a modified the code. explicit time stepping should only be implicit in velocity 2021-08-13 16:34:34 -04:00
jingyuc
35f7a1a569 add new reduced deformable contact constraint class. able to call the reduced soft body's apply impulse function 2021-08-12 12:31:44 -04:00
jingyuc
e4e8f1ad93 add tree updates in predict motion. 2021-08-11 15:58:40 -04:00
jingyuc
6355b06a8b use deformable contact detection for the reduced deformable model 2021-08-10 16:31:53 -04:00
jyc-n
3425c01acc created new free fall example. WIP 2021-08-09 16:26:17 -04:00
jyc-n
042a1f75c9 clean up 2021-08-09 14:54:58 -04:00
jingyuc
a56ce358f3 reduced dofs and interpolated transform needs to be updated from the time_n states in the iteration 2021-08-09 12:43:59 -04:00
jingyuc
0acf18f246 need to update the rigid frame every time when the impulse is applied. reduced external force needs to be zeroed in every iteration. 2021-08-09 11:23:52 -04:00
jingyuc
4f66d8bb87 update reduced variables and full space position every time applied the force 2021-08-06 17:10:58 -04:00
jingyuc
32398d4d7f multiple fixed nodes seem okay 2021-08-05 00:00:12 -04:00
jingyuc
fdfb08b72f single fixed constraint for the rigid frame is working 2021-08-04 22:44:53 -04:00
erwin coumans
e399944982 add simplified Laikago model for faster CPU rendering (getCameraImage in direct mode using TinyRenderer) 2021-08-03 13:26:39 -07:00
jingyuc
35ec8b39a7 re-work the external force application. clean up position and velocity update 2021-08-02 11:31:09 -04:00
jingyuc
a37d23fa24 re-work the simulation time loop in order to support fixed constraints. still wip 2021-07-30 02:08:27 -04:00
Ayzaan Wahid
83fbd60d5b
Create URDF for white xarm 2021-07-29 17:08:50 -04:00
jingyuc
5d17353269 add rigidTransformWorld to make the rendering works after applying initial translation. Center of mass looks right. Tested with rotating free fall 2021-07-29 11:45:44 -04:00
Antonin Raffin
13f3778c22 Fix SB3 comment 2021-07-29 15:24:46 +02:00
Antonin Raffin
2f8b44c702 Migrate to Stable-Baselines3 2021-07-29 15:21:49 +02:00
jingyuc
c6c7533167 fixed constraints wip 2021-07-28 16:36:15 -04:00
jingyuc
549b57df77 clean up 2021-07-28 14:36:42 -04:00
jingyuc
6c2023e330 add mode visualizer example. 2021-07-28 12:34:01 -04:00
jyc-n
bfa74dbacd initial translation WIP 2021-07-28 00:03:51 -04:00
jingyuc
67b58428e8 clean up. now the inertia tensor is calculated based on geometry, and it is updated everytime step 2021-07-27 15:59:25 -04:00
jyc-n
0983d36eff rotation is working 2021-07-26 21:48:57 -04:00
jyc-n
7678545e76 clean up initialzation 2021-07-26 15:30:35 -04:00
jingyuc
9baee29300 simple rigid translation is working. 2021-07-26 11:28:37 -04:00
jingyuc
6f3dd32f37 add new btReducedSoftBody and btReduceDeformableSolver class 2021-07-23 16:20:09 -04:00
jyc-n
87e20f450b save files. misc 2021-07-22 21:55:34 -04:00
jyc-n
c325da8b34 add new ReducedSoftBody class. move read files functions to btReducedSoftBodyHelpers 2021-07-22 11:43:26 -04:00
jingyuc
237333d030 make the impulse scaled with nodal mass. all binary mode files contains all modes info. 2021-07-19 15:26:00 -04:00
jingyuc
4119d8812e add initial impulse 2021-07-18 00:52:13 -04:00
jingyuc
c24f2a72ef add internal force 2021-07-16 15:01:44 -04:00
jingyuc
4b6eaeed4c kinematic tested. specified delta_v as a cosine function. 2021-07-15 17:30:08 -04:00
jingyuc
d390360f9e clean up kinematic test setup 2021-07-14 20:01:50 -04:00
jingyuc
f1e86bf257 test modes kinematics 2021-07-14 16:00:28 -04:00
jingyuc
fa00ee2bbd Start the reduced deformable example. Read in mesh and modes files. 2021-07-13 00:45:11 -04:00
erwincoumans
0e124cb2f1
Merge pull request #3841 from erwincoumans/master
fix some msan (memory sanitizer) issues
2021-05-12 13:54:56 -07:00
erwincoumans
a435fb7a41
Merge pull request #3819 from cadop/bullet-client-subprocess-safety
Fix for bullet_client to be used from a class instance during multiprocessing
2021-05-12 13:54:00 -07:00
Erwin Coumans
92fb2db0a3 fix some msan (memory sanitizer) issues 2021-05-12 20:14:15 +00:00
erwin coumans
adcf785a4a re-enable eGUIHelperSetRgbBackground 2021-05-07 09:07:40 -07:00
Erwin Coumans
cd76d605a9 more fixes for tsan 2021-05-07 15:37:56 +00:00
erwin coumans
f14911c998 fix a tsan test failure 2021-05-06 18:34:43 -07:00
erwin coumans
e952ac6f63 Add pybullet.configureDebugVisualizer(rgbBackground=[red,green,blue]) (each component a float in the range [0,1])
This is an alternative to passing options="--background_color_red=red --background_color_green=green --background_color_blue=blue" in the connect method.
2021-05-06 18:08:22 -07:00
erwin coumans
8e85dedaa9 PyUnicode_AsUTF8 breaks python 2.x compatibility 2021-05-06 10:19:15 -07:00
erwin coumans
b696ed7d7b enable roll angle in pybullet.computeViewMatrixFromYawPitchRoll / b3ComputeViewMatrixFromYawPitchRoll 2021-04-28 12:13:31 -07:00
cadop
ace34c4d08 check the process id before disconnecting 2021-04-27 19:33:37 -04:00
erwincoumans
45d3ead747
Merge pull request #3356 from erwincoumans/master
LICENSE should have no txt extension
2021-04-22 16:46:07 -07:00
Erwin Coumans
184b7816d0 LICENSE should have no txt extension 2021-04-22 16:45:29 -07:00
erwincoumans
a7832e3a18
Merge pull request #3355 from erwincoumans/master
sync recent changes
2021-04-22 16:37:01 -07:00
Erwin Coumans
c915e82d49 Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-22 16:20:31 -07:00
erwincoumans
00dcc77885
Merge pull request #3352 from erwincoumans/master
getDynamicsInfo report local inertia diagonal for useMaxima… …
2021-04-20 20:22:38 -07:00
erwin coumans
a5761f2b10 pybullet: getDynamicsInfo report local inertia diagonal for useMaximalCoordinates 2021-04-20 20:20:55 -07:00
Erwin Coumans
9f91e6837a remove type annotations
bump up pybullet version
2021-04-20 15:50:12 -07:00
erwincoumans
201e7159d6
Merge pull request #3351 from erwincoumans/master
PyBullet: expose useMultiBody argument for loadMJCF command, expose sleeping threshold
2021-04-20 14:42:42 -07:00
erwin coumans
e58e5bdf95 PyBullet:
expose pybullet.changeDynamics(sleepThreshold), default 0.05, for both useMaximalCoordinates=False and True
When the dot(vel,vel) < sleepThreshold for longer than 2 seconds (this timeout is hard coded) objects that have the ACTIVATION_STATE_ENABLE_SLEEPING enabled with be deactivated
Example:
p.changeDynamics(ob, -1, activationState=p.ACTIVATION_STATE_ENABLE_SLEEPING, sleepThreshold=0.05)
2021-04-20 11:29:27 -07:00
erwin coumans
fd154cee8f set default sleeping threshold for useMaximalCoordinate btRigidBody to be similar to btMultiBody (0.05) 2021-04-20 11:14:28 -07:00
erwin coumans
78f5b141f9 fix for 'useMaximalCoordinates' rigid body in PyBullet: activate a rigid body after picking 2021-04-20 10:24:09 -07:00
erwin coumans
84a63cf221 allow to use the useMultiBody argument for loadMJCF command
note that for dynamic and static objects (without joints) it is best to set useMultiBody=False
2021-04-19 20:37:26 -07:00
r-a-sattarov
a923ce184e examples/RobotSimulator/CMake: fixed warning (mis-matching arguments) 2021-04-19 23:32:57 +03:00
erwincoumans
48ba5a37ad
Merge pull request #3348 from erwincoumans/master
disable texture release, it causes crashes, need to figure out better…
2021-04-15 20:30:13 -07:00
erwin coumans
910c20334f disable texture release, it causes crashes, need to figure out better solution 2021-04-15 20:26:01 -07:00
Erwin Coumans
973d8c128f Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-07 22:13:18 -07:00
jaraujo98
dcf9c8d6a5
Replace xrange with range
The xrange function was deprecated in Python 3. Removing it for compatibility.
2021-04-06 11:26:39 -07:00
erwincoumans
21d1b8fc71
Merge pull request #3339 from erwincoumans/master
add pybullet_examples, fix pybullet_envs.minitaur.envs_v2, bump up pybullet 3.1.2
2021-04-05 19:53:38 -07:00
Erwin Coumans
5205dafcc2 add __init__.py 2021-04-05 19:51:38 -07:00
Erwin Coumans
29f388a5d8 add selected examples under pybullet_examples 2021-04-05 19:50:46 -07:00
Erwin Coumans
513e3a7db4 add more __init__.py files 2021-04-05 18:07:39 -07:00
Erwin Coumans
674c82db89 bump up pybullet version to 3.1.2
add missing __init__.py files
2021-04-05 17:58:25 -07:00
erwincoumans
2c3318f86d
Merge pull request #3331 from erwincoumans/master
add performCollisionDetection (stepSimulation also calls this, but do…
2021-04-05 12:54:39 -07:00
erwin coumans
8b8c1af6a4 Cleaned-up/fixed version of this Pull Request #3239, thanks to Wenlong Lu 2021-04-05 11:40:45 -07:00
erwin coumans
4d34ba7310 add updated Laikago envs_v2, with PMTG and MPC examples.
python -m pybullet_envs.minitaur.envs_v2.locomotion_gym_env_test
python -m pybullet_envs.minitaur.envs_v2.examples.laikago_mpc_wrapper_example
python -m pybullet_envs.minitaur.envs_v2.examples.laikago_static_gait_example
python -m pybullet_envs.minitaur.agents.baseline_controller.locomotion_controller_example
PMTG example, not well tuned:
python -m pybullet_envs.minitaur.envs_v2.examples.laikago_pmtg_example
2021-04-05 11:35:19 -07:00
Erwin Coumans
58d47935a3 Merge remote-tracking branch 'bp/master' 2021-03-26 11:53:37 -07:00
erwin coumans
d1c4c41b9a add performCollisionDetection (stepSimulation also calls this, but does more, including solving constraints and integration) 2021-03-26 10:31:13 -07:00
erwincoumans
93be7e6440
Merge pull request #3311 from erwincoumans/master
allow to compile pybullet using btDiscreteDynamicsWorld (no btMultiBody, no btSoftBody, no btDeformableBody)
2021-03-26 10:29:04 -07:00
erwin coumans
0196edd4d2 update single aabb, during resetJointState/resetBasePositionAndOrientation, to allow raycast/collision queries. 2021-03-26 09:11:59 -07:00
erwin coumans
546212b158 add mug obj 2021-03-22 16:53:17 -07:00
erwin coumans
6f7d458679 add missing line in previous commit 2021-03-16 18:17:23 -07:00
erwincoumans
395e17c7bf
Merge pull request #3238 from yycho0108/add-link-names-to-createmultibody
Add linkNames argument to CreateMultibody
2021-03-15 22:48:33 -07:00
erwin coumans
5cf8ee3360 Allow to compile pybullet using btDiscreteDynamicsWorld (no multibodies and no deformables), this allows to create Jacobian and Mass matrix (and A=J*M-1*J_transpose) with MLCP solvers
Add examples/pybullet/gym/pybullet_utils/readwriteurdf.py, this allows to read a URDF and write the URDF with more reasonable inertia tensors (based on mass and collision volumes)
2021-03-15 22:44:55 -07:00
erwincoumans
0c7ea68709
Merge pull request #3246 from Danfoa/master
Fix Stable-PD Control bug on First Order Taylor approximation of next `q` state
2021-03-07 08:19:37 -08:00
mbennice
296cd85f60 Fix tab/spaces 2021-03-05 09:54:53 -08:00
mbennice
237843b93a Default user data text to empty string when null. 2021-03-05 09:52:10 -08:00
Erwin Coumans
b619763569 Merge remote-tracking branch 'bp/master' 2021-03-04 09:38:13 -08:00
erwin coumans
3963f077fc Fix memory leak in EGL / GUI mode, resetSimulation with textures in GUI mode.
Fixes Issue #3285
2021-03-04 09:13:22 -08:00
erwincoumans
7b84fabb1e
Merge pull request #3291 from vabr-g/efficient-find
Optimize calls to find*() for a single char.
2021-03-02 10:06:54 -08:00
Vaclav Brozek
364e98c92d Optimize calls to find*() for a single char.
The character literal overload is more efficient.
2021-03-02 18:59:31 +01:00
Erwin Coumans
adcaa75777 enable v-hacd in cmake for BulletRobotics and pybullet build (use cmake -DENABLE_VHACD=OFF .. to disable)
cmake: enable stable PD plugin (-DDSTATIC_LINK_SPD_PLUGIN)
btMultibody, make some args const in mulMatrix
2021-03-01 14:03:48 -08:00
vabr-g
e4963f73f2
Fix a null dereference in UrdfParser
When the parser sees no <inertial> tag inside a <deformable>, it logs an error but does not return false. So in the next step, a null pointer is dereferenced.

This can be tested with loading the following URDF:
```
<?xml version="1.0"?>
<robot name="rhythm_carrot_sticks">
  <deformable name="bag">
  </deformable>
</robot>
```
2021-03-01 21:21:11 +01:00
Erwin Coumans
97add36b9f update bullet_client.py to accept options
p.connect(p.GUI, options="--background_color_red=1 --background_color_blue=1 --background_color_green=1")

If you use bullet_client.py, you can use:
p = bc.BulletClient(connection_mode=pybullet.GUI,options="--background_color_red=1 --background_color_blue=1 --background_color_green=1")
--mouse_move_multiplier=0.4
--mouse_wheel_multiplier=0.01
--mp4=moviename.mp4
2021-02-25 16:32:39 -08:00
erwincoumans
abea1a8484
Create LICENSE.txt 2021-02-08 08:06:16 -08:00
erwincoumans
af6aa5fb99
Create LICENSE.txt 2021-02-08 08:05:46 -08:00
erwincoumans
c3f137773b
Create LICENSE.txt 2021-02-08 08:05:22 -08:00
erwincoumans
ecbbf24d2a
Create LICENSE.txt 2021-02-08 08:04:10 -08:00
erwincoumans
1257ab5915
Create LICENSE.txt 2021-02-08 08:03:23 -08:00
erwincoumans
b582287943
Create LICENSE.txt 2021-02-08 08:02:52 -08:00
erwincoumans
7a6fb20da8
Create LICENSE.txt 2021-02-08 08:02:02 -08:00
erwincoumans
a061644454
Create LICENSE.txt 2021-02-08 08:01:18 -08:00
erwincoumans
643f9c90be
Create LICENSE.txt 2021-02-08 08:00:22 -08:00
erwincoumans
5d149250ba
Create LICENSE.txt 2021-02-08 07:58:30 -08:00
erwincoumans
062860e455
Create LICENSE.txt 2021-02-08 07:57:53 -08:00
erwincoumans
1fbee5299a
Create LICENSE.txt 2021-02-08 07:57:25 -08:00
erwincoumans
6ad7e8fa6e
Create LICENSE.txt 2021-02-08 07:57:00 -08:00