Commit Graph

424 Commits

Author SHA1 Message Date
yunfeibai
0a29c8d9af Get debug visualizer camera yaw, pitch, dist, and target. 2017-06-02 18:24:51 -07:00
erwincoumans
518c7ec00e Merge pull request #1144 from lunkhound/pr-threading-refactor
Bullet 2 threading refactor: moved parallel-for calls into core libs
2017-06-02 16:18:12 -07:00
yunfeibai
e6d1a8cf97 Swap yaw and pitch in camera computation. Add functions to convert view matrix to camera position, and camera position to camera yaw pitch roll. 2017-06-01 15:30:37 -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
erwincoumans
83f910711a Prepare/allow for non-Bullet2-based physics command processor in pybullet/Bullet-C-API
!!! Make sure to add examples/SharedMemory/PhysicsServerExampleBullet2.cpp to your build system, if needed
Bump up pybullet to version 1.0.9
2017-05-30 19:54:55 -07:00
Lunkhound
cc1e6dc269 make MultiThreadedDemo available if threadsafe 2017-05-30 00:47:41 -07:00
Lunkhound
a6a0ea5f54 add task scheduler implemented with thread support interface 2017-05-30 00:21:10 -07:00
Erwin Coumans
db008ab3c2 Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
2017-05-23 22:05:26 -07:00
Lunkhound
dfe184e8d3 Bullet 2 threading refactor: moved parallel-for calls into core libs 2017-05-23 01:01:20 -07:00
Erwin Coumans
b19c209dbc The softbody/bunny test is very experimental and shouldn't be enabled in the example browser, unless USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD is defined. I fixed a few bugs that cause the hang. 2017-05-21 06:50:53 -07:00
Erwin Coumans
433d11d8cf Add a btIDEbugDraw::clearLines, helps multi-threaded rendering of lines (while updating those lines in a dynamics world in a different thread)
Expose COV_ENABLE_VR_RENDER_CONTROLLERS, to enable/disable rendering of controllers (and some frames) in VR
Expose COV_ENABLE_RENDERING to enable/disable rendering.
Fix some multi-threading issues (potential crashes), related to debug drawing/rendering in one thread, while changing the dynamics world/removing/resetSimulation in a different thread.
2017-05-16 12:19:03 -07:00
Erwin Coumans
11fa56513b initialize alpha component of color 2017-05-14 21:14:56 -07:00
Erwin Coumans
e954374e56 build system fixes 2017-05-13 13:50:35 -07:00
Erwin Coumans
f80838e989 expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer. 2017-05-13 09:18:36 -07:00
Erwin Coumans
b22ffcf61c Use more googley colors in the examples.
Add high-resolution textured sphere, and automatically convert sphere, capsule and multi-sphere shape to use this, with caching to avoid duplicates.
2017-05-11 22:59:27 -07:00
Erwin Coumans
09caa599ff avoid an assert when removing a non-existing graphics index in debug mode 2017-05-05 10:38:16 -07:00
Erwin Coumans
1f64a87abe Improve ChromeTraceUtil logging, allow filename to be specified.
Expose this ChromeTraceUtil  logging to C-API: start/statelogging and submitProfileTiming
pybullet.submitProfileTiming, and STATE_LOGGING_PROFILE_TIMINGS used in startStateLogging
added example for Python profileTiming.py and C++ b3RobotSimulatorClientAPI::submitProfileTiming
2017-05-04 17:51:40 -07:00
Erwin Coumans
152e3da3e4 Implementation of virtual void CommonRenderInterface::removeGraphicsInstance(int instanceUid)
for GLInstancingRenderer (OpenGL3+) and SimpleOpenGL2Renderer (OpenGL2)
Refactored the add/remove object pool in Bullet3Common/b3ResizablePool.h
Added CommonRigidBodyBase::deleteRigidBody, also removing its graphics instance.
2017-05-03 17:05:05 -07:00
Erwin Coumans
9fef6c1d66 Add C++ version VRGloveSimulatorMain example, using the serial library.
First run the App_PhysicsServer_SharedMemory_VR_vs2010.exe to run the VR server,
then run App_VRGloveHandSimulator. You likely need to tune the minV/maxV for each finger (check values using Arduino IDE Serial Monitor)
2017-05-01 22:35:33 -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
e6759cfa4f TinyAudio fixes for OSX etc. 2017-04-27 12:07:31 -07:00
Erwin Coumans
943dd16e78 disable keyboard repeat on Windows
add some TinyAudio classes to play wav, mostly from Stk (http://github.com/thestk/stk)
2017-04-26 21:31:01 -07:00
David Carlier
756568ad9c build fix for BSD systems 2017-04-16 17:53:44 +01: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
80e87d5ccb re-create debug drawer after 'resetSimulation', also avoid memory leak after doing so.
this fixes wireframe.
Also use <CTRL>+hotkey, to avoid conflicts with user-specified keyboard functions.
2017-04-11 16:03:07 -07:00
Erwin Coumans
bdf366b045 implement pybullet.getDebugVisualizerCamera, width, height, providing viewmatrix, projection matrix 2017-04-10 11:03:41 -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
Erwin Coumans
fffa17dd35 little tuning for rendering 2017-03-28 08:20:10 -07:00
Erwin Coumans
b9642e8e68 enable base OpenGL2 rendering as fallback for more demos including physics server (use --opengl2 flag in Example Browser), no shadows yet. 2017-03-27 21:42:37 -07:00
Erwin Coumans
21d1827c9f revert previous cmake copy->symlink (doesn't work on Windows)
fix timing issues at small timestep, disable default linear damping for btMultiBody
2017-03-23 17:30:59 -07:00
Erwin Coumans
acbe8ee5cd remove use of snprint, fixes Issue 1037 2017-03-23 15:10:47 -07:00
erwincoumans
049d9a5ca6 Update OpenGLExampleBrowser.cpp
revert original width/height to 1024x768
2017-03-21 17:41:11 -07:00
Erwin Coumans
59d16b2c42 expose video capture as logging command in b3RobotSimulatorClientAPI (C++) and pybullet (use STATE_LOGGING_VIDEO_MP4) 2017-03-16 09:13:33 -07:00
Erwin Coumans
ca31bb2bbd pybullet.ER_BULLET_HARDWARE_OPENGL and ER_TINY_RENDERER exposed (for getCameraImage, renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
improve performance of getCameraImage when using ER_BULLET_HARDWARE_OPENGL
2017-03-09 17:42:59 -08:00
Erwin Coumans
34fc2fb589 create premake/cmake file for Bullet/Extras/obj2sdf
add missing 1.sdf for Bullet/data/kitchens/1.sdf
add support for getting keyboard events (pybullet.getKeyboardEvents and b3RobotSimulatorClientAPI::getKeyboardEvents)
2017-03-02 12:33:22 -08:00
Erwin Coumans
35b92c43d3 remove some standalone-example from the premake build (re-enable using option --standalone-examples
move PhysicsServer and PhysicsClient into Physics Server-Client in its own ExampleBrowser section (out of Experiments)
2017-02-22 06:13:32 -08:00
Erwin Coumans
bf5f78f35a decouple some dependency using a callback. 2017-02-21 19:28:49 -08:00
Erwin Coumans
37890e5a4d allow to enable/disable GUI, shadows, wireframe of OpenGL Visualizer from API
(pybullet.configureDebugVisualizer)
2017-02-21 17:36:54 -08:00
Erwin Coumans
2b27ab2463 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-02-17 10:48:03 -08:00
Erwin Coumans
34c3fca8d5 prepare state logging system (log state of robot, vr controllers after each stepSimulation) 2017-02-17 10:47:55 -08:00
Erwin Coumans
8f546acbe8 disable keyboard toggle in Linux/X11
revert num solver iterations to 50 (from 150)
set solver iterations for one gripper grasp to 150
2017-02-16 15:56:42 -08:00
Erwin Coumans
63486a712c VR video recording, use command-line --mp4=videoname.mp4
tune gripper grasp example with tefal pan, 800Newton force.
URDF importer: if using single transform 1 child shape, don't use compound shape.
if renderGUI is false, don't intercept mouse clicks
add manyspheres.py example (performance is pretty bad, will look into it)
[pybullet] expose contactBreakingThreshold
2017-02-16 14:19:09 -08:00
yunfeibai
151bc8e12c Add depth image when using hardware renderer. 2017-02-07 17:19:48 -08:00
yunfeibai
c92fd6120d EGL OpenGL window. 2017-02-06 16:22:17 -08:00
erwincoumans
2fa3e267fc Merge pull request #940 from erwincoumans/master
fix sphere-triangle for degenerate triangles (zero area/normal), fix 'safeNormalize' (probably should remove it)
2017-01-30 21:26:08 -08:00
erwincoumans
72dd8285e8 fix 'safeNormalize' (probably should remove it)
Fix for Issue 953: cull degenerate triangles
https://github.com/bulletphysics/bullet3/issues/935
Thanks to Oleg Klimov for the report and reproduction case.
2017-01-30 18:12:09 -08:00
erwincoumans
fc59a40127 Merge pull request #905 from lunkhound/pr-sel-solver-type
example browser: add controls for changing the solver type and solver flags
2017-01-30 10:22:31 -08:00
erwincoumans
26a34e3cda Move ChromeTracing in its own file, and add tracing support for VR server (App_SharedMemoryPhysics_VR)
Add a bit of extra sleep in PhysicsServer thread, to make rendering smoother.
2017-01-29 20:59:47 -08:00
Erwin Coumans
52761f5578 [pybullet] implement addUserDebugParameter / readUserDebugParameter
fix inertial frame for door.urdf
allow picking of links of multi-bodies with a fixed base
2017-01-17 15:42:32 -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
c0c4c8ba3f fix many warnings
remove btMultiSapBroadphase.*
make collisionFilterGroup/collisionFilterMark int (instead of short int)
2017-01-15 22:26:11 -08:00
Erwin Coumans
3d6584962a remove some memory leaks in example code. 2017-01-10 14:57:16 -08:00
Erwin Coumans
5e6cfd70b5 iOS platform and Android don't have __thread local storage, so avoid multi-threaded profiler on those (only on _WIN32, __linux__ and __APPLE__ and not TARGET_OS_IPHONE
Add a Sleep(0) for Windows to yield threads (and not Sleep(1))
2017-01-08 12:49:04 -08:00
Erwin Coumans
10c7ddcb15 fix issue of duplicate classes with same name
causing issues with some linkers
2017-01-06 18:15:04 -08:00
Erwin Coumans
4fc697f646 fix _WIN32 lacking #include <inttypes.h>
allow creation of multiple shared memory segments on win32.
fix pybullet compilation on Visual Studio 2010 (old compiler)
2017-01-06 10:19:19 -08:00
Lunkhound
ea0df70c77 example browser: fix for GUI button toggle state 2017-01-02 23:01:22 -08:00
Erwin Coumans
fdd517e00f First step towards a MuJoCo MJCF importer for Bullet. It can load the humanoid.xml, ant.xml and some other OpenAI GYM asset files. Not all fields are converted, so it is work-in-progress. This is useful for Reinforcement Learning experiments, and would also help integration with DeepMind Lab. 2016-12-30 18:32:57 -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
018aa08bf8 suppress Linux error related to PRIu64/__STDC_FORMAT_MACROS 2016-12-26 22:55:28 -08:00
Erwin Coumans
e592290f4c tweaks/fixes in about://tracing performance data generator (press and hold 'p' in example browser, release 'p' will save the file 'timingsX.json') 2016-12-23 21:56:31 -08:00
Erwin Coumans
0917310521 add nanosecond resolution for Mac OSX clock / about://tracing timings 2016-12-23 18:18:35 -08:00
Erwin Coumans
4c06fd27b3 Example Browser: add option (keypress 'p') to dump json timing profile trace, that you can open using Chrome about://tracing
Make btQuickprof thread safe
Add option in btQuickprof to override custom timing profile (btSetCustomEnterProfileZoneFunc, btSetCustomLeaveProfileZoneFunc)
remove b3Printf in a user/physics thread (those added added, while drawing the GUI running in the main thread)
2016-12-23 15:20:04 -08:00
erwincoumans
a5eda81e47 Merge pull request #867 from lunkhound/pr-slider-widget
example browser: slider widget improvements
2016-11-29 21:08:48 -08:00
Lunkhound
49b27f30bd example browser: slider widget improvements 2016-11-20 16:38:11 -08:00
erwincoumans
9ee1c4ec24 regular OR wireframe rendering, not both
add option to perform filtering of 'getClosestPoints' using linkA/linkB.
don't use 'realtimesimulation' as default
add/remove debug items within same thread
pybullet, report contact points and normal as [x,y,z] triplet/vector, not 3 scalars
separate 'getClosestPointsAlgorithm': box-box doesn't report closest points with positive distance, and the query shouldn't impact regular 'closesst points'
2016-11-19 17:13:56 -08:00
Erwin Coumans
c521d816c6 add user debug line/text features in pybullet + shared memory API:
addUserDebugLine,
addUserDebugText
removeUserDebugItem
removeAllUserDebugItems
2016-11-14 07:39:34 -08:00
erwincoumans
9bad64fed9 allow obsolete OpenGL2 drawer to render with z-up axis. 2016-11-12 11:59:40 -08:00
erwincoumans
4235c61fcf move CommonRigidBodyMTBase out of interfaces, into MultiThreadedDemo. 2016-11-07 12:08:02 -08:00
erwincoumans
ff2738db26 Merge remote-tracking branch 'bp/master' 2016-11-04 13:16:55 -07:00
erwincoumans
e35129ceaf Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-11-04 13:16:30 -07:00
erwincoumans
9708392322 work-in-progress
add UDP network connection for physics client <-> server.
also set spinning friction in rolling friction demo (otherwise objects may keep on spinning forever)
2016-11-04 13:15:10 -07:00
yunfeibai
e8635932cf Merge remote-tracking branch 'upstream/master' 2016-11-03 10:26:52 -07:00
yunfeibai
3c37db0804 Add API to set bunny properties. Add example to show coupling between softbody and multibody. 2016-11-01 16:45:10 -07:00
Lunkhound
1c3686ca51 MultiThreaded Demo:
- fixing various race conditions throughout (usage of static vars, etc)
 - addition of a few lightweight mutexes (which are compiled out by default)
 - slight code rearrangement in discreteDynamicsWorld to facilitate multithreading
 - PoolAllocator::allocate() can now be called when pool is full without
     crashing (null pointer returned)
 - PoolAllocator allocate and freeMemory, are OPTIONALLY threadsafe
     (default is un-threadsafe)
 - CollisionDispatcher no longer checks if the pool allocator is full
     before calling allocate(), instead it just calls allocate() and
     checks if the return is null -- this avoids a race condition
 - SequentialImpulseConstraintSolver OPTIONALLY uses different logic in
     getOrInitSolverBody() to avoid a race condition with kinematic bodies
 - addition of 2 classes which together allow simulation islands to be run
   in parallel:
    - btSimulationIslandManagerMt
    - btDiscreteDynamicsWorldMt
 - MultiThreadedDemo example in the example browser demonstrating use of
   OpenMP, Microsoft PPL, and Intel TBB
 - use multithreading for other demos
 - benchmark demo: add parallel raycasting
2016-10-30 12:47:27 -07:00
erwincoumans
2c6237abda process todo in CMakeLists.txt 2016-10-22 13:53:44 -07:00
erwincoumans
c481662938 Merge pull request #723 from benelot/3D-NN-walkers-example
Simple Neural Network 3D Walkers example
2016-10-21 08:47:35 -07:00
erwin coumans
eda400d14c Merge remote-tracking branch 'bp/master' 2016-10-19 07:43:46 -07: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
yunfeibai
3ffd95fbab Merge remote-tracking branch 'origin/master' 2016-10-17 13:20:31 -07:00
yunfeibai
b07df4d504 Load bunny through shared memory API and RobotSimAPI. Create grasp bunny example. 2016-10-17 13:01:04 -07:00
erwin coumans
29f3afe2a4 don't use GL_LINEAR_MIPMAP_LINEAR for shadow maps
optimize gpu upload (use glBufferSubData instead of glMapBuffer
Avoid checking char array against zero.
2016-10-14 15:06:09 -07:00
yunfeibai
27fab2adb5 Create a demo for one motor gripper grasp. 2016-09-21 12:08:03 -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
Benelot
f0f694145d Implement TimeWarpBase.
-------------------------------------
This commit implements speeding up and slowing down examples. The
example can be influenced by the parameters. A separate example will be
added to show off the capabilities of the TimeWarpBase for other
examples. 

The walkers work quite well, a successful evolution was run over night
and reached a walker distance of 7.2m.
2016-09-16 09:49:18 +02: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
Erwin Coumans
fe54f146ad Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-09-01 21:26:38 -07:00
erwincoumans
a370c3bbac Merge pull request #765 from YunfeiBai/master
Torsional and rolling friction for btMultiBody
2016-09-01 14:57:46 -07:00
yunfeibai
9c124b5896 Rolling friction demo for sphere and torsional friction demo for two point contact. 2016-08-30 17:50:37 -07:00
Erwin Coumans
a30ff20e6b preparation for KUKA IK tracking example 2016-08-30 14:44:11 -07:00
yunfeibai
d784c61b61 Add rolling friction, set rolling friction coefficient from urdf, and set up two point contact experiment. 2016-08-30 11:19:23 -07:00
Erwin Coumans
e47c74ce0b prevent crash when using --opengl2 option in ExampleBrowser. 2016-08-29 11:48:31 -07:00
YunfeiBai
6751648bce add some micro-sleep to prevent 100% CPU/memory bus hogging, preventing the graphics thread from making progress.
debug draw color black for contact normal
move debug draw option for constraint frames into 'k' key.
2016-08-19 13:58:53 -07:00
erwin coumans
62d5b7c5c0 add single step simulation, using 'o' key. use 'i' key to suspend simulation first
default background color a bit darker, to show debug lines
tweaked contact point rendering a bit
2016-08-19 10:30:02 -07:00
erwin coumans
a68c9ca845 avoid MT crash in VR/physics server due to printf from separate thread.
add fps display in VR
use 1./240. internal substep for real-time physics sim in VR/physics server for more accurate robotics sim.
2016-08-18 21:43:43 -07:00
Erwin Coumans
463f3e59c8 minor tweak in F1/screenshot handling. Note you can use --png_skip_frames=x command-line argument 2016-08-17 10:18:33 -07:00
erwin coumans
3bdcf23a05 Add sleep to avoid 100% busy CPU loop in PhysicsServerExample
Added btClock::usleep
Fix broken TinyRenderer example code.
2016-08-13 12:21:18 -07:00
Erwin Coumans
4bb488f65e reset canvas location 2016-08-11 15:02:00 -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
Erwin Coumans
b880ddf76b add pybullet render API with yaw/pitch/roll option
add testrender.py file
allow option to enable OpenGL hardware renderer in multithreaded sim

b3RequestCameraImageSelectRenderer(commandHandle,ER_BULLET_HARDWARE_OPENGL);
2016-08-08 14:23:44 -07:00
Benjamin Ellenberger
4622ab4299 Merge commit. 2016-07-31 16:22:50 +02:00
Erwin Coumans (Google)
98c6181ba8 fix screen width/height issue on Intel/Linux
add command-line option to set png_skip_frames when taking screenshot series
2016-07-26 15:36:21 -07:00
Erwin Coumans
8270096fad add GripperGraspExample, separate from R2D2GraspExample 2016-07-25 12:30:47 -07:00
Erwin Coumans
6b0ceace7f Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-07-25 11:49:56 -07:00
Erwin Coumans
a6216f4f24 add robotics learning grasp contact example
add wsg50 gripper with modified r2d2 gripper tip
expose a fudge factor to scale inertia, to make grasping more stable
(until we have better grasping contact model/implementation)
2016-07-25 11:48:44 -07:00
Erwin Coumans
53fa57bdc4 make IK compile on Mac OSX 2016-07-24 23:50:18 -07:00
erwin coumans
75e86051c2 Add inverse kinematics example with implementations by Sam Buss.
Uses Kuka IIWA model description and 4 methods:
Selectively Damped Least Squares,Damped Least Squares,
Jacobi Transpose, Jacobi Pseudo Inverse
Tweak some PD values in Inverse Dynamics example and Robot example.
2016-07-24 22:22:42 -07:00
erwin coumans
25a1714754 disable CProfileManager, might reduce some multi-threading conflicts 2016-07-19 15:55:52 -07:00
Erwin Coumans
fcc9d4ebcb fix SIMD/16-byte alignment issue causing issue in one of the old benchmarks 2016-07-16 22:33:15 -07:00
Erwin Coumans
8c69bfb042 fix: accidently enable memory-leak debug test 2016-07-16 21:36:40 -07:00
Erwin Coumans
c54a61b97a More example code is memory-leak free now, in particular PhysicsServerExample.
/PhysicsServerCommandProcessor
also fixed some memory issue in InverseDynamicsExample (the base class is supposed to delete collision shape memory)
2016-07-16 21:29:31 -07:00
erwin coumans
a12d25e6ce remove #include of visual leak detector (used to find memory leaks in ExampleBrowser/main.cpp) 2016-07-16 00:58:09 -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
34187fba1c fix camera update issue in previous commit
fix Mac OSX build issue
2016-07-14 09:49:49 -07:00
erwin coumans
4a705d1e03 Add kiva_shelf to prepare for picking/grasping task
Fix uninitialized variable jointDamping/jointFriction in SDF importer
Add SDF <pose> parsing in visual, inertial, collision elements.
Slight improvement in TinyRender loading performance of largish meshes (30k vertices)
Reduce #define MAX_SDF_BODIES to 500, due to some issue in client code, todo: figure out what the issue is.
b3RobotSimAPI support SDF file loading
Tiny improvement in OpenGL hardware renderer lighting, to distinguish faces without textures
2016-07-14 00:05:57 -07:00
Erwin Coumans
10cc6f14cb add option to use hardware OpenGL renderer for synthetic camera 2016-07-12 18:16:13 -07:00
Benjamin Ellenberger
b73bcead4b Merge remote-tracking branch 'upstream/master 2016-07-11 23:31:49 +02:00
Benjamin Ellenberger
ed13cc6c26 Add a slider to displace pendula via GUI.
------------------------------------------------
The slider applies the selected displacement force according to the chosen scalar and falls back to zero when moved below an absolute value of 0.2.
2016-07-11 23:07:48 +02:00
Benjamin Ellenberger
5112de3e3f Fix premake.lua missing includes.
---------------------------------------------------------------------
Due to using Cmake for the creation of the example, the premake.lua file was not correctly updated. This commit adds the missing includes by including all files using a wildcard.
2016-07-11 21:50:32 +02:00
erwincoumans
e2e750efb2 Merge pull request #689 from erwincoumans/master
prepare robotics learning examples, see examples/RoboticsLearning/b3R…
2016-07-11 10:38:38 -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
hujiajie
8c573177eb [Working In Progress] Suppress compiler warnings.
Suppress several warnings about unused variables.
2016-07-10 23:18:03 +08:00
erwin coumans
02582e3a78 shrink down cube size of BasicDemo 10 times (it looked ginormous in VR) from 2x2x2 meter to 0.2
add test for VR HUD/sub-titles
fix issue in previous commit, partial string use %.8s not %8.s
use long long int in b3Clock
fix warning/error in pointer alignment in serialization
Fix pybullet Windows compilation.
(thanks to bkeys/https://github.com/bulletphysics/bullet3/pull/687)
2016-07-09 15:09:09 -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
Benjamin Ellenberger
34ae030c72 Fix CMake references. 2016-07-04 19:27:18 +02:00
Benjamin Ellenberger
74aba8b8fd Correct the build files and fix the name of the create method in header
file.
2016-07-04 19:17:50 +02:00
Benjamin Ellenberger
2bf17a7a81 Initial commit.
------------
Simplifying the walker generation code and making it more understandable

SQUASH THIS LATER.
2016-07-01 19:35:27 +02:00
Benjamin Ellenberger
50b6003470 Merge remote-tracking branch 'upstream/master' 2016-06-27 15:14:47 +02:00
Benjamin Ellenberger
e16082a7cd Refactor Newton's Cradle. Implement Newton's Cradle with Softbody ropes. 2016-06-27 15:14:36 +02:00
erwincoumans
b06e1cb873 Update CollisionShape2TriangleMesh.cpp
fix memory leak, thanks Ilya Kostrikov for the report.
2016-06-14 07:53:15 -07:00
Erwin Coumans
bd668d11b0 add .stl file support in 'File/Open' of example browser. 2016-06-07 12:57:46 -07:00
Benjamin Ellenberger
9872d2b20f Create InclinedPlane,Newton's Cradle and Multi-Pendulum examples for the Bullet Example Browser. 2016-06-04 12:09:37 +02:00
Benjamin Ellenberger
dfb2c51dc7 Merge remote-tracking branch 'upstream/master' 2016-06-04 11:36:43 +02:00
erwin coumans
4b2c0f6d89 make one of the cubes in two_cubes.sdf static (immovable) using the <static> tag in SDF
add an example using 'direct'
fix the send-desired-state commands, to add flags for arguments set, using default values.
Start exposing SDF loading in shared memory api, not fully implemented yet.
2016-06-03 19:03:56 -07:00
Erwin Coumans
aa4d2ae01d initial hookup of TinyRenderer to shared memory interface 2016-06-01 17:47:41 -07:00
erwin coumans
9a5394c4bc fix cmake build 2016-06-01 11:07:39 -07:00
erwin coumans
f469a2cb49 update to tinyrenderer synthetic camera 2016-05-31 22:55:13 -07:00
erwin coumans
14aa666c6f preparation to receive camera image data from physics server
increase shadowmap world size default to 50 units (meter), 10 units (meter) was too small for most examples.
2016-05-31 10:23:04 -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
Erwin Coumans
fb2134f15f add combobox to select software/opengl rendering to compare 2016-05-18 17:57:13 -07:00
Erwin Coumans
7994a339ee disable RTC update for Physics Server by default 2016-05-18 16:21:40 -07:00
erwin coumans
a395ddcb06 add option to embed a physics server in the physics client example, for easier debugging 2016-05-18 09:34:42 -07:00
Benjamin Ellenberger
79be214d08 Merge resolve. 2016-05-15 14:19:01 +02:00
Erwin Coumans
876c9e57fe fixes 2016-05-13 22:57:41 -07:00
Erwin Coumans
578e4fc795 compile fixes 2016-05-13 22:10:18 -07:00
Erwin Coumans
f4a6b0cb9f move InProcessExampleBrowser.cpp into App instead of Lib 2016-05-13 21:10:16 -07:00
Erwin Coumans
d186320f30 fixes in rendering 2016-05-13 18:45:56 -07:00
erwin coumans
6a9c54c4ef Remove unused ROS urdf (was replaced by Bullet UrdfParser.
Small refactoring for ExampleBrowser: move examples cpp files in the app/executable
Move ExtendedTutorials in its own app/executable as a test.
2016-05-12 23:03:12 -07:00
erwincoumans
fa043429fe Merge pull request #623 from erwincoumans/master
add initial SDF importer, work-in-progress (still too incomplete to b…
2016-05-09 21:37:36 -07:00
Erwin Coumans
e9c6abff47 add initial SDF importer, work-in-progress (still too incomplete to be useful) 2016-05-09 17:25:07 -07:00
erwincoumans
95541cad4f Merge pull request #622 from erwincoumans/master
copy the data folder into the cmake build directory, for the ExampleB…
2016-05-09 14:21:11 -07:00
Erwin Coumans
2fee43b021 copy the data folder into the cmake build directory, for the ExampleBrowser
out-of-source builds of Example Browser don't find their resources...
2016-05-09 14:03:13 -07:00
erwincoumans
fe4fd4169c Merge pull request #620 from erwincoumans/master
Added new tutorial sources, thanks to Mobeen
2016-05-08 12:34:11 -07:00
Benjamin Ellenberger
4f169b4d8f Add missing m_callback call in SliderMove().
-------
The MySliderEventHandler is missing the m_callback whereas the SliderParams contains the m_callback field. Therefore, the m_callback is never called if the slider position is changed. This commit adds the missing m_callback field and call in SliderMove().
Fixes #613.
2016-05-08 20:26:05 +02:00
erwincoumans
8a68e27bb7 move the RigidBodyFromObj to Importers section. 2016-05-07 16:36:14 -07:00
erwincoumans
db4fb750bc Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-05-07 16:19:43 -07:00
erwincoumans
5151519b94 https://github.com/bulletphysics/bullet3/pull/618 by Mobeen
Summary of changes:
1) Changed include paths to be relative to the current sources (affected
files: LoadMeshFromObj.cpp, Wavefront2GLInstanceGraphicsShape.h/cpp)
2) Added new tutorials in the ExtendedTutorials folder
3) Modified the main_opengl_single_example.cpp file to enable picking
support in standalone demos
2016-05-06 15:07:54 -07:00
erwin coumans
aae9e509a9 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-05-06 13:58:21 -07:00
erwin coumans
0a3efbe349 make standalone versions (console, tinyrender, opengl) of InverseDynamics/InverseDynamicsExample 2016-05-06 13:57:48 -07:00
Erwin Coumans
b0a4e126bf use cmake FIND_PACKAGE(PythonLibs 2.7 REQUIRED) if pybullet is build 2016-05-04 13:24:06 -07:00
erwin coumans
8360e2e66d windows fixes 2016-05-04 00:16:53 -07:00
Erwin Coumans
0d3440b388 fixes in Mac resizing example browser (if window size exceeds capability) 2016-05-03 23:46:29 -07:00
Erwin Coumans
938db633df fixes in build system 2016-05-03 23:34:48 -07:00
Erwin Coumans
7a833a7ac2 fix target link libs in cmake 2016-05-03 22:05:30 -07:00
Erwin Coumans
709a55d5ab add CMake support for pybullet (still preliminary)
requires shared library build:
cmake .. -DBUILD_SHARED_LIBS=on
then create a symbolic link from libpybullet.so to pybullet.so
2016-05-03 13:03:12 -07:00
Erwin Coumans
aa9a276a71 fix typo in texels flip
add support to create a cube in TinyRenderer (quick test)
2016-04-28 23:01:49 -07:00
Erwin Coumans
d8da00aa35 re-enable Wavefront .obj loader 2016-04-23 11:06:34 -07:00
Erwin Coumans (Google)
3a8ffebc28 fix possible division-by-zero if the profiler gui is called before stepSimulation is proceeding. 2016-04-18 21:43:42 -07:00
Erwin Coumans
59e0bef988 remove compile errors and some debug code in ExampleBrowser. 2016-04-14 12:19:55 -07:00
Erwin Coumans
2cbfeb9590 run GUI on main thread for Mac OSX/__APPLE__, due to OS limitation
add b3CreateInProcessPhysicsServerAndConnectMainThread to test.c
2016-04-14 08:51:20 -07:00
Erwin Coumans
937b6d84e5 re-enable --enable_experimental_opencl flag for
premake build of App_BulletExampleBrowser
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
(not enabled when using cmake!)
2016-03-16 09:02:39 -07:00
Erwin Coumans
005ef9d2f1 fixes in SharedMemory unit test, premake build issue on Linux 2016-03-15 18:29:32 -07:00
Erwin Coumans
c69524be9e fix Lua example 2016-03-10 21:15:23 -08:00
erwincoumans
efbb1edecc Allow InProcessExampleBrowser to use a malloc allocated memory block, instead of system shared memory.
Make shared memory client/server a bit more robust, in case the server is terminated early.
2016-03-10 14:36:46 -08:00
erwincoumans
9be978337f quick draft implementation for SharedMemoryInProcessPhysicsC_API 2016-03-07 14:56:16 -08:00
Erwin Coumans
b130be46f7 add InProcessExampleBrowser to make it easy to instantiate the ExampleBrowser in its own thread
example usage:

int main(int argc, char* argv[])
{

btInProcessExampleBrowserInternalData* data = btCreateInProcessExampleBrowser(argc,argv);

while (!(btIsExampleBrowserTerminated(data)))
{
}

btShutDownExampleBrowser(data);

        return 0;
}
2016-03-02 18:01:33 -08:00
Erwin Coumans
d70132a901 only enable Wavefront obj support for URDF when ENABLE_URDF_OBJ is defined.
add destructor for SampleJob1
2016-03-01 09:15:55 -08:00
erwin coumans
6c9bfce975 Support btMultiBody soft contact using ERP and CFM. Also support custom relaxation parameter to allow successive over relaxation.
Added demos for rigid and multi body soft (compliant) contact.
Will also add simplified Hertz compliant contact, by dynamically modifying the ERP/CFM to mimic a non-linear spring.
Note that btManifoldPoint is growing too big, we need to implement proper contact constraints derived from btTypedConstraint.
2016-02-22 18:40:00 -08:00
Erwin Coumans
6bc3f94f52 add a Pendulum example that is also used as unit test.
Gold data is created by numerically solving a second-order non-linear differential equation.
(see examples/MultiBody/pendulum_gold.h)
2016-01-06 18:08:49 -08:00
Erwin Coumans
52f074bcb2 Merge remote-tracking branch 'bp/master'
Conflicts:
	examples/ExampleBrowser/CMakeLists.txt
	examples/OpenGLWindow/CMakeLists.txt
2015-12-07 16:42:45 -08:00
Erwin Coumans
13f314f401 allow CMake to build on Linux without X11/OpenGL system headers (use local one) 2015-12-07 16:38:43 -08:00
Andrew Meadows
c0c1691c25 fix whitespace formatting in cmake files 2015-12-07 14:08:04 -08:00
Erwin Coumans
4c88681479 joint trajectory curves use different colors for each DOF
use fewer notch counts in slider GUI
2015-11-26 10:45:51 -08:00
Erwin Coumans
03cc4f0554 add InverseDynamics example for example browser
add CMake support for BulletInverseDynamics and BulletInverseDynamicsUtils
2015-11-24 11:12:02 -08:00
Erwin Coumans
b4701613c8 consistent *API.* in examples/SharedMemory 2015-11-23 08:00:42 -08:00
erwincoumans
5589fb03af Merge branch 'master' of https://github.com/erwincoumans/bullet3 2015-11-22 20:50:41 -08:00
erwincoumans
03bf78ef49 add physics server loopback (both client and server in the same process, using shared memory)
add physics server direct (client and server in the same process, directly processing commands without shared memory transport mechanism)
2015-11-22 20:50:32 -08:00
erwincoumans
ad29d27700 add initial inverse dynamics example skeleton, with urdf and programmatically created btMultiBody.
disabled in Bullet/examples/ExampleBrowser/ExampleEntries.cpp
2015-11-13 10:37:43 -08:00
erwin coumans
c68c215ead add rudimentary command logging for shared memory physics server 2015-10-30 10:30:48 -07:00
erwin coumans
f7bbbd88e6 preparation for CommandLogging for PhysicsServer. 2015-10-29 11:25:50 -07:00
erwin coumans
dc81e31e74 upload work-in-progress Collision example using C-API. 2015-10-28 11:48:36 -07:00
erwin coumans
3d9218e07d Add plane shape and profile timing support in examples/Collide
Use View/Profiler in example browser, in optimized build/Release mode
and look for plCollideWorld
2015-10-20 18:30:43 -07:00
Erwin Coumans
abcaa19bc8 make the compiler happy with Collision example 2015-10-19 18:21:45 -07:00
Erwin Coumans
3d3830962a add a few collision examples to test a C API with various back-ends 2015-10-17 13:44:00 -07:00
erwin coumans
4a29986662 initial support for multiple robots in shared memory API 2015-10-13 11:32:25 -07:00
=
5e4badc099 make PhysicsClient an interface class, and move shared memory implementation
of physics client into PhysicsClientSharedMemory class/file.
This will allow implementation of UDP and other transport protocols to a physics server.
2015-09-24 22:50:34 -07:00
=
003a42478b another step closer to useable shared memory C API
(force/torque sensor needs new API)
in a nutshell, users of shared memory physics API should not
directly poke into shared memory, not fill 'SharedMemorCommand'
nor read SharedMemoryStatus directly. The C-API declares 'handles' for those,
to avoid it from happening.
2015-09-16 23:09:10 -07:00
Erwin Coumans
2e7949bb3e fix some warnings 2015-08-26 15:26:53 -07:00
erwin coumans
faab737738 add a robot joint sensor example, reading joint reaction forces/torques using the shared memory API 2015-08-24 15:26:29 -07:00
Erwin Coumans
74fda9ff85 simple multi threading test 2015-08-21 15:18:18 -07:00
erwincoumans
081a40d254 initial implementation to send debug lines from physics server to client,
need to add streaming because memory is too small to store all lines
initial test of PD control in physics server, need to switch to PD control for motor constraint, instead of using external forces.
2015-08-19 22:51:16 -07:00