Commit Graph

64 Commits

Author SHA1 Message Date
Erwin Coumans
5c5993edcb fix potential memory leaks for concave triangle meshes (<concave=true> or createCollisionShape with flags=1) 2017-08-24 09:16:11 -07:00
Erwin Coumans
226aaedc46 bump up pybullet setup.py version, make B3_NO_PYTHON_FRAMEWORK default on Mac
minor fixes (arg name in header/cpp the same)
2017-08-18 08:53:46 -07:00
Erwin Coumans
aafaa7e33e Expose optional "globalScaling" factor to pybullet.loadURDF and pybullet.loadSDF. This will scale the visual, collision shapes and transform locations.
Fix two_cubes.sdf (was lacking collision shape for second cube)
2017-08-14 14:59:41 -07:00
Erwin Coumans
c1e32e6428 fix potential memory leaks 2017-06-07 19:00:44 -07:00
Erwin Coumans
b23cb1dd2c pybullet.createCollisionShape, createVisualShape, createMultiBody, programmatic creation using ProgrammaticUrdfInterface
(still preliminary, not ready for commit yet, see examples\pybullet\examples\createSphereMultiBodies.py)
2017-06-03 10:57:56 -07:00
erwincoumans
3987bdd333 remove pose frame from SDF,
allow plane collision shape in SDF
load the Roboschool stadium.sdf in humanoid_knee_position_control.py
2017-06-01 20:13:39 -07:00
Erwin Coumans
87293e835c implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.
pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor
Bug fixes in b3ResourcePath::findResourcePath resolution.
add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium
minor fixes to obj2sdf
2017-06-01 12:32:44 -07:00
Erwin Coumans
19295f2859 enable file caching, currently only for Wavefront .obj files. You can disable file caching using
pybullet.setPhysicsEngineParameter(enableFileCaching=0)
Allow VR camera tracking only using position tracking, no orientation tracking (use
pybullet.setVRCamera([posX,posY,posZ],trackObjectFlag=0 or pybullet.VR_CAMERA_TRACK_OBJECT_ORIENTATION)
2017-05-17 19:29:12 -07:00
Erwin Coumans
af6bf8ddc8 plumb URDF/SDF audio_source into PhysicsServerCommandProcessor, allow to play sounds on collision !
See also https://youtu.be/eppOjTfx5Jg for a first test, and this modified URDF how to add sounds:
https://github.com/bulletphysics/bullet3/blob/master/data/plane_with_collision_audio.urdf
Add the --audio flag to enable sound in pybullet/Bullet-C-API
2017-05-01 11:14:09 -07:00
Erwin Coumans
5158c1ae98 add python dumpLog.py utility to view log files created using 'startStateLogging'
don't enable <CTRL> for hotkeys yet
add some more profile markers
log objectId and linkIndex as signed int ('i') and not unsigned int 'I'
fix issue in startStateLogging: number of parameters was wrong
2017-04-12 15:02:47 -07:00
Erwin Coumans
82b576a390 fixed a bug that prevented kitchens/1.sdf to render properly (local scaling was double applied)
disable some left-over clipping that was moved to another part of the code
2017-04-06 21:13:23 -07:00
Erwin Coumans
9d05b46de2 expose width/height as ExampleBrowser options.
suppress lack of 'site' support message in MJCF importer
suppress lack of 'plane' visual support in urdf/sdf import
getBodyName default to "" to avoid breaking cloudsim
expose bodyName when requesting body info (sdf/mjcf import)
pass optional "options" string to pybullet.connect method. this can be used for --opengl2 flag in GUI mode (or other flags)
2017-03-30 11:01:33 -07:00
yunfeibai
f062847038 Replace spaces with tabs. 2017-03-29 15:37:33 -07:00
yunfeibai
66a8685816 Merge remote-tracking branch 'upstream/master' 2017-03-29 15:06:15 -07:00
Oleg Klimov
77608154a3 MJCF: fix capsule length when given in size="", fix slider joint limits 2017-03-27 22:54:20 +03:00
Erwin Coumans
7503418c72 Split Bullet/src/LinearMath/btSerializer.cpp into btSerializer64.cpp to make it easier to rebuild serialization structure.
Add several MSVC optimization flags to cmake.
Bump up VERSION because serialization format changed
Expose btScalar& jointMaxForce, btScalar& jointMaxVelocity to 'getJointInfo2' API, add backwards compatibility to examples\Importers\ImportURDFDemo\URDFImporterInterface::getJointInfo.

pybullet: expose 4 more fields to getJointInfo: jointLowerLimit/jointUpperLimit/jointMaxForce/jointMaxVelocity
fix performance issue in CMD_ACTUAL_STATE_UPDATE_COMPLETED
2017-03-26 13:06:46 -07:00
yunfeibai
50f0cfca9e Add body name when loading urdf. 2017-03-23 10:16:39 -07:00
Oleg Klimov
80a0b51a1d MJCF: fix cylinders in MJCF, also (possibly) fixes capsules in tiny renderer 2017-03-22 00:36:28 +03:00
Oleg Klimov
e8da7bb6f8 URDF loader: fix MuJoCo xml load, also closes #993 2017-03-17 02:11:47 +03:00
Erwin Coumans
3d2cb1cabf also allow absolute path in asset files (.obj, .stl, .dae etc) 2017-03-14 10:40:27 -07:00
Oleg Klimov
fa60cc5f56 URDF loader: fix SDF branch, warn about unsupported geometry 2017-03-14 02:32:02 +03:00
Oleg Klimov
3a8199ec28 Fix formatting 2017-03-10 19:46:46 +03:00
Oleg Klimov
82495f3c84 URDF loader: reuse the same resources finder routine for TinyRendererVisualShapeConverter 2017-03-10 18:17:38 +03:00
Oleg Klimov
5b2a9d1a01 URDF loader: resources path, "package://" removal, error messages, zero material path in .obj loader 2017-03-08 15:14:54 +03:00
Erwin Coumans
89e8e30de6 fix lack of collision scaling in pybullet URDF/SDF files (only graphics meshes supported scaling, collision objects ignored scaling) 2017-02-28 16:30:57 -08:00
Erwin Coumans
d465e1eea5 add capsule support in urdf parser (non-standard extension), capsule.urdf
fix btCapsuleShape (X,Y,Z) margin issue
fix uninitialized variables in TinyRenderer: m_hasLightDistance, m_hasLightAmbientCoeff, m_hasLightDiffuseCoeff, m_hasLightSpecularCoeff
pybullet/shared memory API 'getClosestPoints' / b3InitClosestDistanceQuery, only report contacts equal/smaller distance than given
2017-01-23 16:45:18 -08:00
Erwin Coumans
93471a1c31 cmake Win32 fixes
fixed some more warnings
added alignment macros to some classes
btPersistentManifold from 128 to 16 bytes aligned
prepare command to select collision filter mode (SIM_PARAM_UPDATE_COLLISION_FILTER_MODE)
2017-01-16 13:05:26 -08:00
Erwin Coumans
82995a8343 pybullet, more robust multi-server connections
Windows shared memory: allow to use custom key.
Improve GUI performance on Windows, submit letters in text as a batch (fewer draw-calls)
quadruped.py: first try to connect to SHARED_MEMORY, if it fails (<0) use GUI
increase Chrome about://tracing json export capacity (press 'p' in Example Browser)
UDP physics server: add --port and --sharedMemoryKey command-line arguments
PhysicsServerExample: add --sharedMemoryKey command-line option (for VR example too)
ExampleBrowser: sleep a few milliseconds if rendering is too fast, use --minUpdateTimeMicroSecs=0 to disable
2016-12-28 21:51:54 -08:00
erwin coumans
f97cb7002d first version of 'getVisualShapeData' to get visual shape information to allow external renderer with pybullet and shared memory robotics API
b3InitRequestVisualShapeInformation/b3GetVisualShapeInformation in shared memory API
2016-10-18 22:05:28 -07:00
erwincoumans
46b32f17bb Add small sphere, make teddy small too
Add physics time scale in VR mode
Fix compound collision margin in physics server
Enable visuals for rigid body (non-multi-body) URDF/SDF loading in physics server.
2016-09-22 08:50:28 -07:00
erwin coumans
0a628f06cc decrease some gjk/epa tolerance to improve collision detection using very small collision margins (0.001/1mm)
tweak pr2 gripper.
2016-09-20 12:37:13 -07:00
erwincoumans
8d4c99801e Merge pull request #783 from bingjeff/urdf_loader_changes
[URDF] Edit loader to handle full inertia tensor.
2016-09-20 04:39:38 -07:00
erwin coumans
db3122233f remove that odd triangle in the origin of samurai castle (VR)
add rolling/spinning friction to cube, remove it from plane/samurai.urdf
URDF2Bullet: support joint limits for revolute and prismatic, only if defined (if upper < lower, disable limit)
add some profiling markers to improve performance
2016-09-19 07:02:43 -07:00
Jeffrey Bingham
26a464bf0b [URDF] Edit loader to handle full inertia tensor.
Previous URDF loader did not handle off-diagonal elements
in the URDF. This commit adds functionality to allow
the loading of an inertia matrix that has not already
been reduced to its principal components. It diagonalizes
the inertia matrix, tests that the values are real and
updates the inertial frame.
2016-09-13 08:42:33 -07:00
erwin coumans
4ab02a07e5 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-09-08 15:22:41 -07:00
erwin coumans
32eccdff61 Create project file for BussIK inverse kinematics library (premake, cmake)
URDF/SDF: add a flag to force concave mesh collisiofor static objects. <collision concave="yes" name="pod_collision">
VR: support teleporting using buttong, allow multiple controllers to be used, fast wireframe rendering,
Turn off warnings about deprecated C routine in btScalar.h/b3Scalar.h
Add a dummy return to stop a warning
Expose defaultContactERP in shared memory api/pybullet.
First start to expose IK in shared memory api/pybullet (not working yet)
2016-09-08 15:15:58 -07:00
erwincoumans
ba2f522e05 Update BulletUrdfImporter.cpp
use free (and not delete), since b3ImportMeshUtility/stbi_load uses malloc (and not new)
2016-09-07 16:02:16 -07:00
Erwin Coumans
3c30e2f821 add segmentation mask rendering to TinyRenderer and shared memory API
similar to the zbuffer, but storing the object index (int) instead of float depth
2016-08-11 14:55:30 -07:00
Mat Kelcey
9369f9b764 fix error msg when loading sdfs 2016-07-20 10:24:34 -07:00
Erwin Coumans
589fa376b3 only add compound child shapes to 'allocated' list once 2016-07-16 17:58:06 -07:00
Erwin Coumans
e2bdd7dbb1 fix more memory leaks, ImportURDFExample is now leak-free
eliminate all run-time memory allocation (except for mouse-pick/ray-intersection) in ImportURDFExample
2016-07-16 17:40:44 -07:00
Erwin Coumans
bbefc6b108 fix an issue in previous commit 2016-07-16 01:11:53 -07:00
erwin coumans
f9762d63ab Removed many memoryleaks in Example Browser, reducing some technical debt.
When running the Example Browser with Basic Example, 'visual leak detector' show no leak.
Many other individual examples still leak, so it is work-in-progress.
Disabled the profiler window (too many leaks)
2016-07-16 00:55:56 -07:00
erwin coumans
7633cfb800 prepare robotics learning examples, see examples/RoboticsLearning/b3RobotSimAPI.h
prepare compliant contact work, urdf loading of parameters (see data/cube.urdf)
2016-07-11 00:26:40 -07:00
erwin coumans
60d2b99151 Physics runs in a separate thread from rendering in PhysicsServerExample (preliminary)
Improve rendering performance. OpenVR experience is smooth now.
commit needs a bit more testing before pushing in main repo.
2016-07-07 19:24:44 -07:00
Erwin Coumans
e3b2b1a969 add texture support in SDF, URDF for both OpenGL and software renderer (TinyRenderer) 2016-06-18 18:02:20 -07:00
erwin coumans
0b69ba7f61 Support the <static> field under <model> in SDF to make the model immovable, similar to setting the mass to zero.
Add joint velocity motors in ImportSDF example.
2016-06-02 18:04:22 -07:00
erwin coumans
f469a2cb49 update to tinyrenderer synthetic camera 2016-05-31 22:55:13 -07:00
Erwin Coumans
b1adc0d9ef avoid API change in URDFImporterInterface
fix .obj texture loading issue
2016-05-24 09:01:03 -07:00
erwin coumans
2fc0358750 Expose a better API to allow any render engine to be used for the physics simulation when loading URDF/SDF files.
See bullet3/examples/Importers/ImportURDFDemo/DefaultVisualShapeConverter.h
Give the kuka_iiwa/model.urdf some blue color, not just orange, to mimick the original a bit better
Preparation for the CMD_CAMERA_IMAGE_COMPLETED command, to expose a virtual camera to the robotics API
2016-05-19 18:37:15 -07:00