Commit Graph

3433 Commits

Author SHA1 Message Date
erwincoumans
e3274d7fc1
Update model.cpp
fix uv wrapping, thanks to Marek
2020-10-27 13:38:01 -07:00
Erwin Coumans
a67681aee5 add kinematic rigid body ground example. 2020-10-22 11:25:08 -07:00
erwincoumans
4c46f9ce39
Merge pull request #3087 from davidcavazos/patch-1
Add documentation to notebook
2020-10-14 11:54:30 -07:00
David Cavazos
656a1e7472
Removed notice on slow installation 2020-10-13 15:34:33 -07:00
erwincoumans
fea468d241
Update RBDModel.h
destructor needs to be virtual
2020-10-08 14:10:08 -07:00
Erwin Coumans
ad0994022d allow streaming of data 2020-10-07 10:12:02 -07:00
Erwin Coumans
bc51ac3f0f Support getCachedReturnData for PhysicsLoopBack
re-use existing code path for streaming plugin return data (work-in-progress)
2020-10-07 08:24:33 -07:00
Erwin Coumans
954ceff2ec Add an option for a plugin to report return data after calling executePluginCommand. Also add python binding.
Currently the return data has to fit in shared memory, 8MB (Linux, Windows) or 1MB (Apple)
Preparation for streaming is added (to allow unlimited return data, see CMD_CUSTOM_COMMAND_STREAM_RETURN_DATA)

New C-API: b3GetStatusPluginCommandReturnData
PyBullet reports return data if available, in pybullet_executePluginCommand

For the plugin developer:
plugin can provide additional return data for executePluginCommand in the b3PluginContext, during executePluginCommand.
Lifetime of this m_returnData pointer is minimum of next call to the next executePluginCommand or plugin termination.
2020-10-06 20:19:39 -07:00
Erwin Coumans
7a6c90409f Merge remote-tracking branch 'bp/master' into master 2020-10-06 13:56:06 -07:00
Yuxiang Yang
82182e1ba7
Add <inertia> for missing links in a1.urdf
Currently a few collision frames in a1.urdf ("{FL/FR/RL/RR}_upper_shoulder") do not have <inertia> defined, and pybullet loads as if they have 1kg mass. This leads to inaccurate simulation results.
2020-10-06 00:28:24 -07:00
Erwin Coumans
6b91ecc0c5 allow to set changeDynamics(body, link, contactProcessingThreshold) for multibodies
(set to 0 if restitution is important)
2020-10-05 16:33:41 -07:00
Erik Gärtner
777ab5a5ab Revert "in case of substeps use the compensated delta time / numSubSteps to convert between force and impulse."
This reverts commit 32277c7bd5.
2020-10-02 15:49:23 +02:00
Steven89Liu
104789ca99 we should use the m_jointMotorForceMultiDof which is indexed by degree
of freedom.
2020-10-01 15:58:45 +08:00
David Cavazos
e78d31171b
Fix Colab link 2020-09-29 08:32:48 -07:00
David Cavazos
9c2313f5c8
Add documentation
Adds documentation to explain each step and have links to useful pages to improve the onboarding experience.
2020-09-29 08:30:36 -07:00
ManifoldFR
6a9cd4615c fix typo 2020-09-29 12:02:35 +02:00
ManifoldFR
281e7df2ec UrdfParser: make axis warning print single line 2020-09-29 12:00:05 +02:00
tfederico
be27283a8e add pretrained policies and remove extra motion file 2020-09-25 12:16:51 +01:00
Erwin Coumans
3d220888fa disable cone friction 2020-09-24 09:19:51 -07:00
tfederico
91cb40c5ba add plotting utility 2020-09-23 16:18:51 +01:00
tfederico
61df6d2ff4 remove comments and unused code 2020-09-23 16:15:30 +01:00
Erwin Coumans
cfd3c99f0e add spirit40 urdf file, compatible with
https://github.com/google-research/motion_imitation/pull/26
2020-09-21 17:44:07 -07:00
Erwin Coumans
e6c4305fa5 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2020-09-21 16:12:07 -07:00
Erwin Coumans
2e1b84487b Add a soccerball obj/urdf, hand-modeled in Blender, using guidance from https://www.youtube.com/watch?v=N93n6hPsqkI (but using texture mapping so the export to OBJ works in PyBullet) 2020-09-21 16:11:52 -07:00
Erwin Coumans
d0dc96aa05 Merge remote-tracking branch 'bp/master' 2020-09-20 16:36:45 -07:00
Erwin Coumans
1bd82e7d81 allow rendering of (textured) heightfield in TinyRenderer and EGL.
Also update normals, if heightfield is updated.
2020-09-20 16:03:56 -07:00
erwincoumans
7f4fdb16b3
Merge pull request #3061 from fuchuyuan/addAttributes
add configurable parameters to urdf
2020-09-18 16:59:43 -07:00
tfederico
ab8d927845 Add files for multiclip reward 2020-09-17 18:04:41 +01:00
Erwin Coumans
4f8f28233c allow alternative deformable indexing (internal use/testing) 2020-09-17 03:15:44 -07:00
erwincoumans
5ce97ffdb1
Merge pull request #3066 from erwincoumans/master
allow alternative deformable indexing (internal use/testing)
2020-09-16 20:16:35 -07:00
Chuyuan Fu
7d8379bad4 add configurable parameters to urdf 2020-09-14 12:34:21 -07:00
r-a-sattarov
73599ba199 E2K: fixed build by MCST lcc compiler when using BUILD_EXTRAS=ON option 2020-09-14 22:22:45 +03:00
Erwin Coumans
e9f486eebb narrow from double to float please 2020-09-13 18:32:52 -07:00
Erwin Coumans
0c2a54193c fixes in cached textures (pointer re-use) 2020-09-13 16:49:13 -07:00
Erwin Coumans
f9a96442d1 disable texture caching in some place, due to pointer re-use issue 2020-09-13 16:24:42 -07:00
Erwin Coumans
f8288e029e fix color for deformables, if texture is not specified 2020-09-13 16:07:42 -07:00
Erwin Coumans
9ae41971bc re-enable pybullet.getVisualShapeData for deformables
(was broken in previous commit)
2020-09-13 15:08:42 -07:00
Erwin Coumans
bd1bd36bc6 allow to change texture for deformables 2020-09-12 20:12:46 -07:00
Erwin Coumans
fcdfee2f12 deformable_torus.py: position camera better 2020-09-12 19:47:54 -07:00
Erwin Coumans
c58a54174e allow to set color of deformables for debug visualizer
don't render deformables for TinyRenderer/EGL if p.configureDebugVisualizer(p.COV_ENABLE_TINY_RENDERER,0)
Fix segmentation mask in tinyrenderer for deformables
2020-09-12 19:41:10 -07:00
Erwin Coumans
e00691e132 more deformable rendering fixes, egl and tinyrenderer 2020-09-12 18:15:51 -07:00
Erwin Coumans
1452cae641 * add textured models of ball.vtk (obj/mtl) and torus (obj/mtl) and cloth.
1) allow to render deformables in 'getCameraImage', for TinyRenderer (tested OK) and EGL (untested)
2) allow to have textures for deformables. See deformable_ball.py, deformable_anchor.py and deformable_torus.py for examples
3) deformables: allow to request simulation mesh data (even if there is a render mesh) See deformable_anchor.py for an example usage
   data = p.getMeshData(clothId, -1, flags=p.MESH_DATA_SIMULATION_MESH)
4) fix deletion of deformables, thanks to Fychuyan, https://github.com/bulletphysics/bullet3/pull/3048
5) allow to enable and disable double-sided rendering, p.changeVisualShape(objectUid, linkIndex, flags=p.VISUAL_SHAPE_DOUBLE_SIDED)
6) fix GripperGraspExample, model not found
7) Fix deformable anchor not attaching to multibody with object unique id of 0
8) Fix issue with assignment of unique ids in TinyRenderer/EGL renderer (always use broadphase uid)
9) Avoid crash/issue of simulation with pinned vertices (mass 0) in btDeformableBackwardEulerObjective::applyExplicitForce
10) Store uv/normal in btSoftBody::RenderNode to allow textured meshes
11) (uncomment in btSoftBodyHelpers.cpp): dump vertices and indices in obj wavefront format, when loading a VTK file, for quicker creation of a (textured) surface mesh
12) allow interpolateRenderMesh also for old position-based soft bodies (not only the shiny new FEM deformables)
13) fix a few premake targets
14) update build_visual_studio_vr_pybullet_double_cmake.bat so it suits c:\python37 and installs locally
    for local install of Bullet, see also this example https://github.com/erwincoumans/hello_bullet_cmake
2020-09-12 01:03:04 -07:00
Erwin Coumans
448dd1a244 Synchronize 'resetDebugVisualizeCamera' using GUI critical section instead of waiting for the render thread, to avoid slow-down
Fixes issue https://github.com/bulletphysics/bullet3/issues/3045
2020-09-09 09:45:38 -07:00
Erwin Coumans
1190a1901c fix mipmap rendering from previous commit, making Macbook really slow 2020-09-08 13:04:50 -07:00
Erwin Coumans
3ba9f6c395 Add rudimentary Gazebo world parser, loading sdf files and shifting objects based on the world file pose.
See an example here:
https://github.com/erwincoumans/aws-robomaker-racetrack-world
https://twitter.com/erwincoumans/status/1303084517263994880
2020-09-07 17:30:34 -07:00
Erwin Coumans
ccdec68b1d expose shadowmap intensity to PyBullet API 2020-09-07 16:52:14 -07:00
Erwin Coumans
75351f3682 Merge branch 'master' of github.com:erwincoumans/bullet3 2020-09-07 15:26:34 -07:00
Erwin Coumans
fc2378dda7 enable multisampling and mipmapping
ignore file:// as well as model:// and package://
add newline as additional delimiter for COLLADA DAE loader
2020-09-07 15:26:11 -07:00
Erwin Coumans
07a2648123 Merge remote-tracking branch 'bp/master' 2020-09-04 15:44:13 -07:00
Erwin Coumans
caf671890a Merge branch 'master' of github.com:erwincoumans/bullet3 2020-09-04 14:22:21 -07:00
Erwin Coumans
67061cf98c update a1 urdf to match naming for our software
update test a1.py script
2020-09-04 14:21:53 -07:00
Erwin Coumans
224eceb75b add test script for spirit40 2020-09-03 21:16:39 -07:00
Erwin Coumans
c4f4692b68 add xiURDF for Ghost Robotics Spirit40 and Unitree A1 quadruped 2020-09-03 17:30:07 -07:00
Steven
8a16ed5009 fix the issue "Inconsistency between rayTest and rayTestBatch of pybullet #2887"
we should initialize these variables otherwise these will be random.
2020-09-03 20:30:14 +08:00
Erwin Coumans
913dad4787 fix windows pip build 2020-09-02 02:33:30 -07:00
Erwin Coumans
5b4cf02e70 Merge branch 'master' of github.com:erwincoumans/bullet3 2020-09-02 02:23:15 -07:00
Erwin Coumans
b63e15d15c fix example 2020-09-02 02:23:04 -07:00
erwincoumans
47b0259b97
Merge pull request #3030 from erwincoumans/master
bump up pybullet version, fix win32 pip build
2020-09-01 19:34:39 -07:00
erwincoumans
ce81073ac3
Merge pull request #3020 from fuchuyuan/fixsegfault
Fixsegfault
2020-09-01 16:54:16 -07:00
erwincoumans
8fab756efd
Merge pull request #3026 from erwincoumans/master
PyBullet: fix cases where contact point objects are swapped, reported, attempt to fix travis python detection
2020-09-01 09:29:03 -07:00
Erwin Coumans
f9abae073b PyBullet: fix cases where contact point objects are swapped, reported here
https://github.com/bulletphysics/bullet3/issues/3023
Thanks to ichumuh for the report and reproduction!
2020-09-01 09:27:05 -07:00
erwincoumans
bb1da5b5f5
try to fix travis, update inertia for Laikago, reset camera at the right time (#3021)
* laikago_toes_zup.urdf: fill in inertia values, computed as PyBullet does internally (from mass and collision volumes)

* reset camera in the rendering thread to avoid artifacts

* reset camera in the rendering thread to avoid artifacts

* try to fix travis error
2020-08-31 13:35:03 -07:00
Chuyuan Fu
25f62e853c add and remove deformable object example 2020-08-31 11:38:38 -07:00
erwincoumans
0ebc43b21e
Update deep_mimic_env.py
fix errors
2020-08-31 11:36:15 -07:00
Florian Golemo
58708f6bea
Update gzguts.h (#3012)
Adding this makes the library build successfully on Mac Catalina with Miniconda 3.7 on the latest CLANG. Otherwise you get errors that in C99 the functions "write", "close", and "read" aren't defined.
2020-08-27 14:34:31 -07:00
David CARLIER
cbff4a0a06
Fix openglwindows example build on netbsd. (#3008)
not support for pthread_getconcurrency.
2020-08-27 06:55:50 -07:00
Erwin Coumans
55451b6bfc Merge remote-tracking branch 'bp/master' 2020-08-20 17:16:07 -07:00
Erwin Coumans
9888e7b5a5 reset camera in the rendering thread to avoid artifacts 2020-08-20 09:08:37 -07:00
Erwin Coumans
bbb66370c6 reset camera in the rendering thread to avoid artifacts 2020-08-20 08:35:24 -07:00
Erwin Coumans
d8d81f9ca4 laikago_toes_zup.urdf: fill in inertia values, computed as PyBullet does internally (from mass and collision volumes) 2020-08-17 16:22:31 -07:00
erwincoumans
2c9a55da54
Update PhysicsServerCommandProcessor.cpp
fix potential crash, if user doesn't provide valid body unique id in pybullet.setCollisionFilterGroupMask
2020-08-14 16:59:56 -07:00
Erwin Coumans
8b42b90393 Merge remote-tracking branch 'bp/master' 2020-08-13 19:38:36 -07:00
erwincoumans
76a9b51993
Merge pull request #2931 from AiRuiChen/fix-minitaur-logging
Fix minitaur_logging proto and import
2020-08-13 19:35:11 -07:00
erwincoumans
15041841a5
Merge pull request #2933 from AiRuiChen/fix-pybullet-gym-envs
Fix pybullet gym envs
2020-08-13 19:33:21 -07:00
Erwin Coumans
16efd7b288 fix memory leak in pybullet.calculateJacobian 2020-08-13 17:02:54 -07:00
Erwin Coumans
8504384b63 Merge branch 'master' of github.com:erwincoumans/bullet3 2020-08-13 16:41:33 -07:00
Erwin Coumans
306245d68b fix potential memory leak in createMultiBody, reported by Fei Xia here (thanks for report/repro!)
https://github.com/bulletphysics/bullet3/issues/2898
2020-08-13 16:40:37 -07:00
Erwin Coumans
82493e9fbb fix copy/paste bug in pybullet.c related to collisionShapeOrientationAObj (missing Obj)
this would lead to the collisionShapeOrientationA not being considered.
2020-08-12 21:26:43 -07:00
erwincoumans
e52a30de68
Update TinyRendererVisualShapeConverter.cpp
only create a texture for a plane, not sphere (backward compatibility tests break)
2020-08-12 10:12:45 -07:00
erwincoumans
17d373db55
Merge pull request #2937 from addy1997/master
prev keyword removed
2020-08-11 08:30:55 -07:00
erwincoumans
19dfc6754a
Merge pull request #2971 from WilliamTambellini/fixWarning
Fix warning in examples/Utils/ChromeTraceUtil.cpp
2020-08-11 08:29:35 -07:00
erwincoumans
b2a473da19
Merge pull request #2980 from sippeyxp/find_file_logic
Simplify logic for searching files in UrdfFindMeshFile and prioritize…
2020-08-11 08:28:08 -07:00
Peng Xu
20667bd7d0 Pybullet fast numpy input support for rayTestBatch. 2020-08-11 02:19:23 -07:00
Peng Xu
fc676c02c9 Simplify logic for searching files in UrdfFindMeshFile and prioritize path without prefix. 2020-08-11 01:48:55 -07:00
Erwin Coumans
ff229baf1e TinyRenderer: support plane shape (creating similar textured plane to OpenGL renderer)
TinyRenderer: perform clipping in double precision to improve accuracy
2020-08-10 20:19:00 -07:00
Erwin Coumans
038cc196e1 Merge branch 'master' of github.com:erwincoumans/bullet3 2020-08-10 17:02:06 -07:00
Erwin Coumans
7d9bcafda8 when using stablePDPlugin, approximate inertia by box for unsupported shapes. 2020-08-10 17:00:19 -07:00
William Tambellini
3726c72d11 Fix warning in examples/Utils/ChromeTraceUtil.cpp
Fix warning in examples/Utils/ChromeTraceUtil.cpp :
bullet3/examples/Utils/ChromeTraceUtil.cpp:122:62: warning:
format ‘%lu’ expects argument of type ‘long unsigned int’,
but argument 4 has type ‘long long unsigned int’ [-Wformat=]:
for startTimeDiv1000, ...
Tested:
- examples/ExampleBrowser/App_ExampleBrowser --tracing
- press the P key to write the profiler json file
- head /tmp/timings_0.json
- open /tmp/timings_0.json with chrome://tracing
2020-08-07 17:38:42 -07:00
Erwin Coumans
a17df118f1 re-add constraints.py I wanted to delete the changes, not the file!
(confusing github UI!)
2020-08-07 09:32:30 -07:00
erwincoumans
d1505e187a
Merge pull request #2950 from DarioUrbina/develop_dario
Inverted Pendulum Actuated by Tendons
2020-08-07 09:30:32 -07:00
erwincoumans
2bc3d87d8d
Delete constraint.py 2020-08-07 09:29:39 -07:00
Xuchen Han
eef0d647cd Tune parameters to effectively reduce the stiffness of the picking force. 2020-08-03 23:05:08 -07:00
erwincoumans
b623f5d123
Merge pull request #2967 from erwincoumans/master
fix raycast filter masks, they can be negative
2020-08-03 13:18:27 -07:00
erwincoumans
eb32f48000
Merge pull request #2958 from buoyancy99/patch-1
fix bug of using undefined name p
2020-08-03 11:37:19 -07:00
Erwin Coumans
d12d886e13 raycast filter masks can be negative, always apply the mask (-1 default). Thanks to Tingnan for reporting/reproduction case. 2020-08-03 11:00:14 -07:00
Erwin Coumans
51aed38377 fix import 2020-07-31 15:30:53 -07:00
buoyancy99
1edb8d17f9
fix bug of using undefined name p 2020-07-29 23:51:40 -07:00
Xuchen Han
fa0d452651 Initialize proper collision margin for deformable_ball.py 2020-07-28 21:00:27 -07:00
Erwin Coumans
1e8f39b492 improve premake4 build in case X11 headers are missing
improve video_sync_mp4.py example
allow to create a heightfield from file or programmatically in C++ robotics api. Example:

{
		b3RobotSimulatorCreateCollisionShapeArgs shapeArgs;
		shapeArgs.m_shapeType = GEOM_HEIGHTFIELD;
		bool useFile = true;
		if (useFile)
		{
			shapeArgs.m_fileName = "D:/dev/bullet3/data/heightmaps/gimp_overlay_out.png";
			shapeArgs.m_meshScale.setValue(.05, .05, 1);
		}
		else
		{
			shapeArgs.m_numHeightfieldColumns = 256;
			shapeArgs.m_numHeightfieldRows = 256;
			shapeArgs.m_meshScale.setValue(.05, .05, 1);
			shapeArgs.m_heightfieldData.resize(shapeArgs.m_numHeightfieldRows * shapeArgs.m_numHeightfieldColumns);
			double heightPerturbationRange = 0.05;
			for (int j = 0; j<int(shapeArgs.m_numHeightfieldColumns / 2); j++)
			{
				for (int i = 0; i < (int(shapeArgs.m_numHeightfieldRows / 2)); i++)
				{
					double height = ((double)rand() / (RAND_MAX)) * heightPerturbationRange;
					shapeArgs.m_heightfieldData[2 * i + 2 * j * shapeArgs.m_numHeightfieldRows] = height;
					shapeArgs.m_heightfieldData[2 * i + 1 + 2 * j * shapeArgs.m_numHeightfieldRows] = height;
					shapeArgs.m_heightfieldData[2 * i + (2 * j + 1) * shapeArgs.m_numHeightfieldRows] = height;
					shapeArgs.m_heightfieldData[2 * i + 1 + (2 * j + 1) * shapeArgs.m_numHeightfieldRows] = height;
				}
			}
		}
		int shape = sim->createCollisionShape(shapeArgs.m_shapeType, shapeArgs);
		b3RobotSimulatorCreateMultiBodyArgs bodyArgs;
		bodyArgs.m_baseCollisionShapeIndex = shape;
		int groundId = sim->createMultiBody(bodyArgs);
		int texId = sim->loadTexture(shapeArgs.m_fileName);
		b3RobotSimulatorChangeVisualShapeArgs args;
		args.m_objectUniqueId = groundId;
		args.m_linkIndex = -1;
		args.m_textureUniqueId = texId;
		sim->changeVisualShape(args);
	}
2020-07-24 18:09:13 -07:00
Darío Urbina
370b2f72ff valerolab 2020-07-23 09:32:46 -07:00