Commit Graph

72 Commits

Author SHA1 Message Date
erwincoumans
08321b96ba
Update main_opengl_single_example.cpp
Apply fix from PR #2526 manually, thanks to  Andrew Meadows
2019-12-11 13:59:44 -08:00
erwincoumans
219970c09e fix getCameraImage in VR server using renderer=pybullet.ER_BULLET_HARDWARE_OPENGL 2019-04-14 14:08:35 -07:00
erwincoumans
ab8f16961e Code-style consistency improvement:
Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
2018-09-23 14:17:31 -07:00
Max Argus
2707b7acb4 apple issue 2018-08-30 13:24:25 +02:00
Erwin Coumans
85db288a95 App_PhysicsServer_SharedMemory_VR: expose max_num_object_capacity and max_shape_capacity_in_bytes (and shared_memory_key)
Default values are:
int maxNumObjectCapacity = 128 * 1024;
int maxShapeCapacityInBytes = 128 * 1024 * 1024;
int shared_memory_key = -1
2018-04-30 23:01:15 +02:00
Igor Kalevatykh
7c163f2163 Add VR/OpenVR support on Linux 2018-04-05 00:14:08 +02:00
erwincoumans
f341acc44a glew->glad 2018-02-21 08:50:47 -08:00
erwincoumans
4343d041da more work towards glew->glad 2018-02-21 08:36:53 -08:00
erwincoumans
5679802c24 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2018-02-21 08:20:01 -08:00
erwincoumans
483f017613 fix VR build 2018-02-21 08:19:49 -08:00
Erwin Coumans
9288ea9c6a fix mac osx build 2018-02-21 08:16:00 -08:00
erwincoumans
b572fe43f9 fix signal handling in ExampleBrowser on linux/mac on termination
expose all analogue axes from OpenVR (5 controllers, each x,y -> 10 floats) in pybullet.getVREvents(allAnalogAxes=1)
2017-10-05 12:59:58 -07:00
erwincoumans
9303891468 Allow to configure Y=up, default is Z=up, using pybullet.configureDebugVisualizer(COV_ENABLE_Y_AXIS_UP,0/1)
Implement pybullet.getConnectionInfo, returns [isConnected, connectionMethod], where isConnected=0 or 1
2017-10-05 09:02:33 -07:00
Erwin Coumans
37253443f9 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-09-21 14:24:44 -07:00
Erwin Coumans
cc0c46c4b0 re-update the VR camera 2017-09-21 14:24:22 -07:00
erwincoumans
b079277d51 minor fixes in GLFWOpenGLWindow 2017-09-19 21:40:17 -07:00
erwincoumans
390f111547 enable option to use GLFW, instead of our own cross-platform X11/Cocoa/Windows OpenGLWindow classes 2017-09-19 21:10:54 -07:00
Erwin Coumans
b80a387a1e upgrade to latest OpenVR 1.0.9 (https://github.com/ValveSoftware/openvr)
enable experimental Mac OSX OpenVR, tested using Apple External Graphics Development Kit.
2017-08-19 09:48:32 -07:00
Erwin Coumans
0df8887990 improve pybullet performance of loadURDF/SDF/MJCF and 'createCollisionShape'/'createMultiBody' for GUI/VR/SHARED_MEMORY,
use p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,0) before loading and
p.configureDebugVisualizer(p.COV_ENABLE_RENDERING,1) afterwards
2017-07-14 23:12:16 +01: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
4dea68e43e allow to enable/disable VR picking and VR teleport. Disabling VR picking will also disable the rendering of the VR controller frames. 2017-05-15 11:39:39 -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
eef76af663 create basic audio, towards sound sensors etc. 2017-04-14 12:22:38 -07:00
Erwin Coumans
440d445a02 also report VR events for HMD and generic tracked devices. Also expose those VR events to pybullet: expose a deviceTypeFilter, that defaults to VR_DEVICE_CONTROLLER 2017-04-07 22:53:36 -07:00
Erwin Coumans
2f3ba49357 expose some sleep timeout pybullet.setPhysicsEngineParameter(maxNumCmdPer1ms=100) or b3PhysicsParamSetMaxNumCommandsPer1ms,
if more commands than those are processed per millisecond, a 1ms sleep will follow, to avoid other threads being stalled.
2017-03-01 13:48:57 -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
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
erwincoumans
1dec1a39ce Add the pybullet vrhand.py script used in this haptic video:
Make sure to run the App_SharedMemoryPhysics_VR with --norobotassets option, then
run vr_kuka_setup.py, to add some environment + objects.
2017-01-26 17:22:01 -08:00
Erwin Coumans
94c768bea8 cmake build support for VR demo (WIN32 only)
update to latest OpenVR 1.05 SDK from https://github.com/ValveSoftware/openvr
add keyboard support to tune default camera VR position
VR revert to double 'distorted' views on Desktop, since the single view isn't showing full scene
2017-01-25 19:17:57 -08:00
Erwin Coumans
64957ece9f add hand.py/hand.ino used to create this VR glove, using MuJoCo Haptix MPL hand (Apache 2 license)
https://www.youtube.com/watch?v=VMJyZtHQL50
added b3InitSyncBodyInfoCommand, to retrieve body info, when connecting to a server with existing bodies
pybullet will call this b3InitSyncBodyInfoCommand automatically after connecting
Avoid overriding the py.setVRCameraState setting in VR
2017-01-20 18:13:24 -08:00
erwin coumans
8a6e40ff95 add --disable_desktop_gl for Virtual Reality server (App_SharedMemoryPhysics_VR)
(making the VR performance much better on lowish-quality GPU hardware)
2017-01-14 08:05:04 -08:00
Erwin Coumans
ac02acc2f3 fix compile issue (btMin requires same types, no conversion, just replace with < = combo) 2016-12-28 22:10:03 -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
826c5854a8 See also pybullet quickstart guide here: https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#
vrevent.py: add a Tiltbrush-style drawing example using pybullet
Expose getVREvents to pybullet / shared memory API, access to any VR controller state & state changes.
Improve performance of user debug lines (pybullet/shared memory API) by batching lines with same color/width
expose rayTest to pybullet/shared memory API (single ray for now)
add pybullet getMatrixFromQuaterion
2016-12-26 19:40:09 -08:00
Erwin Coumans
da7ae53941 render regular view on desktop in VR, instead of distortion view. 2016-12-20 17:34:12 -08:00
erwin coumans
a393074793 update to latest OpenVR 1.04 (and make minor API changes)
add premake5.exe (will remove premake4.exe soon)
2016-12-11 22:39:45 -08:00
erwincoumans
0c26fee04d Merge pull request #886 from erwincoumans/master
some VR tweaks and bugfix for issue #878
2016-12-11 12:53:47 -08:00
yunfeibai
c253c750b9 Expose ambient, diffuse and specular coefficient of the light. 2016-12-06 15:21:35 -08:00
erwincoumans
e5aea04e23 add back the 'swapBuffers' in VR demo (slightly lower performance, but easier to use demo.
fix issue related to TinyRenderer shadowbuffer API change
2016-12-02 13:23:50 -08:00
erwincoumans
2329c00faa Add RtMidi for midi control, use the --midi option in premake, and see
update to OpenVR sdk 1.03 from https://github.com/ValveSoftware/openvr
add camPosX/Y/Z and camRotZ to adjust relative camera/world transform for VR (so you can align virtual table with real table etc)
tweak quadruped.py to move a bit
add mouse picking to physics server
2016-11-16 16:12:59 -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
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
erwincoumans
c2ca88bf44 added b3PhysicsParamSetInternalSimFlags command, and pybullet setInternalSimFlags API.
//Use at own risk: magic things may or my not happen when calling this API.

This allows to enable/disable robot assets (samurai world, gripper, KUKA robot etc) in Physics Server (and App_PhysicsServerVR etc)
1 = create robot assets
2 = create experimental box-vr-gui

Add optional command-line parameter for App_PhysicsServerVR, --norobotassets, to start with an empty world, no assets in VR (no gripper, no kuka)
2016-10-23 07:14:50 -07:00
erwin coumans
a6225d4cd0 add check for #dof of KUKA in VR demo
disable debug drawing again in VR demo
2016-10-09 21:48:56 -07:00
erwincoumans
bbb2fac940 App_SharedMemoryPhysics_VR: Add a command-line flag (--emptyworld) to disable the Samurai/KUKA robot creation in the VR demo, and use pybullet to populate the VR world. Note that either way, you can use pybullet to interact and control the world. 2016-10-08 18:40:09 -07:00
erwincoumans
c5d4f7b3b3 disable VSYNC for VR
clamp KUKA motor motion to be less abrupt
2016-10-08 07:51:45 -07:00
erwin coumans
a3aa8ef7f1 tune gripper parameters for VR demo 2016-09-19 14:31:47 -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
Erwin Coumans
567b003654 separate spinning and rolling friction coefficients, exposed in URDF as spinning_friction / m_rolling_friction
improvements in VR demo, add grasper etc.
2016-09-16 00:57:00 +01:00
erwincoumans
e5a8eb2425 rolling friction -> combine using rolling*normal friction, add for both objects.
rolling friction -> only along the normal, until we have separate rolling friction coefficients on normal and non-normal directions
Don't teleport with grasping controller (VR)
Tune VR grasping a bit.
2016-09-12 19:10:20 +01:00