Commit Graph

112 Commits

Author SHA1 Message Date
Erwin Coumans
e262b2b7ee fix premake4 build 2022-03-05 18:41:55 -08:00
Steve Streeting
4182c8ca9c Add --dynamic-runtime option to compile with /MD[d] in MSVC for compat 2020-06-30 17:12:11 +01:00
Ellie
78602fe656 Implementing a simple velocity clamping to reduce floating point errors 2020-03-17 01:22:07 +01:00
erwincoumans
226819b839 premake add enable_stable_pd option, so Bullet can be compiled without C++11 (Visual Studio 2010 etc)
PyBullet: improve sleeping: if the base is static and all joints in the chain between this link and the base are fixed, then this link is static too (doesn't merge islands)
Fix PyBullet compilation of Visual Studion 2010
2019-08-07 21:57:05 -07:00
erwincoumans
a6244d714e more PyBullet PhysX preliminary work. 2019-01-25 10:14:54 -08:00
Erwin Coumans
dc2d54df2c remove 32bit build ARCH from xcode4 generated files (premake4)
optimization in btMultiBody::fillConstraintJacobianMultiDof:
only compute links between current link and root
2018-10-20 10:44:43 -07:00
erwincoumans
c4fe0f7357 disable enable_egl by default (?!?) 2018-09-09 14:39:56 -07:00
erwincoumans
adb5c049c7 Thanks to @dchichkov for some of the fixes in the eglRendererPlugin!
Rename tinyRenderer -> eglRenderer in the eglRendererPlugin.
Allow to run the eglRendererPlugin to run on Windows (not in EGL mode but Win32OpenGLWindow mode)

Here is a script I tested on Windows:
~~~~~~~~~~~~
mport pybullet as p
import time

p.connect(p.DIRECT)
plugin = p.loadPlugin("e:/develop/bullet3/bin/pybullet_eglRendererPlugin_vs2010_x64_debug.dll","_eglRendererPlugin")
print("plugin=",plugin)
p.setGravity(0,0,-10)
p.loadURDF("plane.urdf",[0,0,-1])
p.loadURDF("r2d2.urdf")
pixelWidth = 320
pixelHeight = 220
while (1):
	p.stepSimulation()
	viewMatrix = [1.0, 0.0, -0.0, 0.0, -0.0, 0.1736481785774231, -0.9848078489303589, 0.0, 0.0, 0.9848078489303589, 0.1736481785774231, 0.0, -0.0, -5.960464477539063e-08, -4.0, 1.0]
	projectionMatrix  = [1.0825318098068237, 0.0, 0.0, 0.0, 0.0, 1.732050895690918, 0.0, 0.0, 0.0, 0.0, -1.0002000331878662, -1.0, 0.0, 0.0, -0.020002000033855438, 0.0]

	#img_arr = p.getCameraImage(pixelWidth, pixelHeight, viewMatrix,projectionMatrix, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
	img_arr = p.getCameraImage(pixelWidth, pixelHeight, shadow=1,lightDirection=[1,1,1])#,renderer=pybullet.ER_BULLET_HARDWARE_OPENGL)
	#print("img_arr=",img_arr)
	time.sleep(1)
~~~~~~~~~~~~~
2018-09-09 13:37:49 -07:00
erwincoumans
5164f2f9a7 remove pre-build proto/grpc files (they differ for each platform and proto/grpc version) 2018-09-07 15:44:33 -07:00
erwincoumans
0efc67841d allow pybullet to connect to GRPC server. (need to use flag --enable_grpc in premake build system)
add grpcPlugin, it can work in GUI, SHARED_MEMORY_SERVER, DIRECT and other modes.
example script to start server from pybullet:
import pybullet as p
p.connect(p.GUI)
#if statically linked plugin
id = p.loadPlugin("grpcPlugin")
#dynamics loading the plugin
#id = p.loadPlugin("E:/develop/bullet3/bin/pybullet_grpcPlugin_vs2010_x64_debug.dll", postFix="_grpcPlugin")

#start the GRPC server at hostname, port
if (id>=0):
	p.executePluginCommand(id, "localhost:1234")

Only in DIRECT mode, since there is no 'ping' you need to call to handle RCPs:
numRPC = 10
while (1):
	p.executePluginCommand(id, intArgs=[numRPC])
2018-09-05 17:58:14 -07:00
Erwin Coumans
18b782847d make GRPC work on Linux, 2018-09-04 16:56:34 -07:00
Erwin Coumans
51f9a6fd0d make grpc work on Mac OSX with premake 2018-09-04 14:49:12 -07:00
erwincoumans
9e2f6c7935 more GRPC work 2018-09-03 23:13:15 -07:00
erwincoumans
4f7dfc2069 Add preliminary GRPC server for PyBullet and BulletRobotics.
Will add GRPC client and PyBullet GRPC server plugin.
Will cover most/all SharedMemoryCommand/SharedMemoryStatus messages.
Run the server, then test using the pybullet_client.py
2018-08-29 21:12:13 -07:00
Lunkhound
04e0d57dc1 add premake option 'enable-multithreading' 2018-03-16 23:42:43 -07:00
Erwin Coumans
05b02d6b3e fix glx include 2018-02-22 09:08:10 -08:00
Erwin Coumans
8bb40b632b allow to build GLFW version of Bullet examples on Linux (use premake4_linux --enable_glfw gmake) 2018-02-20 16:21:22 -08:00
erwincoumans
29aa9cb789 Bullet bump up to version 2.88
add preliminary support to import btMultiBody from a .bullet file (will help save/restore state)
fix some Windows char/widechar issues
2017-11-22 18:12:02 -08:00
erwincoumans
6a9300809d premake4 add option --enable_static_vr_plugin to statically link the VR sync plugin
fix texture caching from previous commit (what happened there?)
2017-10-25 10:00:45 -07:00
Erwin Coumans
c47019e0af fix Windows build for premake
d
2017-09-20 08:18:42 -07:00
Erwin Coumans
3e0b72b632 allow to configure glfw on Mac OSX, disabled by default 2017-09-20 08:12:59 -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
305725e52e add --serial option in premake, added serial library to test vr glove in C++ (pybullet works already fine) 2017-05-01 15:04:00 -07:00
Erwin Coumans
eef76af663 create basic audio, towards sound sensors etc. 2017-04-14 12:22:38 -07:00
Erwin Coumans
f73b54e4ab testing ImGUI 2017-04-11 20:16:49 -07:00
Erwin Coumans
a4f1e34899 expose timeout in pybullet/shared memory API
add RobotSimulator, a C++ API similar to pybullet. (work-in-progress, only part of API implemeted)
2017-02-24 15:34:11 -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
3faab1b019 adjusted clsocket build and test, so there is an EchoServer and QueryDayTime sending a string to the EchoServer. 2017-02-19 12:08:58 -08:00
Erwin Coumans
4faa6613c9 first draft of premake/cmake build files for clsocket (tiny cross-platform TCP socket library) 2017-02-19 11:48:01 -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
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
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
842863c04f add commented-out line in build_visual_studio.bat to show how to build pybullet on Windows 2016-09-01 21:37:52 -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
a9b1544a9f Add premake support to build pybullet, Windows and Linux tested, will enable Mac in next commit.
Expose inverse dynamics to Bullet shared memory API, through b3CalculateInverseDynamicsCommandInit and
b3GetStatusInverseDynamicsJointForces command/status. See PhysicsClientExeample or pybullet for usage.
Add option for Windows and Linux to set python_lib_dir and python_include_dir for premake and --enable_pybullet option
Expose inverse dynamics to pybullet: [force] = p.calculateInverseDynamics(objectIndex,[q],[qdot],[acc])
Thanks to Jeff Bingham for the suggestion.
2016-08-09 18:40:12 -07:00
hujiajie
23868ebfb6 [WIP] Suppress compiler warnings.
Disable a few Visual Studio warnings:

C4244: conversion from 'type1' to 'type2', possible loss of data
C4267: conversion from 'size_t' to 'type', possible loss of data

Considering the GCC/Clang counterpart '-Wconversion'
(https://gcc.gnu.org/wiki/NewWconversion) is not covered by '-Wall', it
seems to make more sense to disable these two warnings in Visual Studio,
rather than fixing these warnings with hundreds of static_cast<> in the
source code.
2016-07-12 21:16:55 +08:00
erwin coumans
58206b7962 Add preliminary support for VR/OpenVR for HTC Vive and Oculus Rift,
(Windows-only first, later Linux and OSX)
Use premake to build, use --enable_openvr flag
2016-06-30 16:03:38 -07:00
Erwin Coumans
de9bd65c19 fix compile issues 2016-05-26 19:22:26 -07:00
erwin coumans
0d50d8c73b Preliminary working version of TinyRenderer for standalone demos,
it works without OpenGL dependency now, so it runs in the cloud :-)
Add scaling support for TinyRenderer, remove some un-used normal mapping in TinyRenderer shader, expose light_dir_world,
remove accidental hard-coded path in tga write_tga_file,
Fix InverseDynamicsExampleCreateFunc, enum has to start at 0
2016-05-26 17:36:01 -07:00
erwin coumans
0a3efbe349 make standalone versions (console, tinyrender, opengl) of InverseDynamics/InverseDynamicsExample 2016-05-06 13:57:48 -07:00
Erwin Coumans
1d0f038aad add initial pybullet module, using the shared memory API
(for now, start the example browser in 'physics server',
then compile using premake --python option,
then run python in the bin folder (so it finds pybullet.so)
and run the test.py script in examples/pybullet folder.
The robotics shared memory C API is very suitable for this.
2016-04-30 11:18:54 -07:00
erwin coumans
03bdcc8737 patch TinyRenderer so it software-renders in an OpenGL texture, for testing
fix texture support: flip texture to make OpenGL happy (lower-left is origin)
add path prefix to .obj loader, so materials/textures are loaded ok.
2016-04-26 20:52:52 -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
84a136534a add preliminary Android build files for Bullet
add SimpleOpenGL3 example and show how to override
keyboard, mouse, wheel, resize callbacks
2016-03-27 10:21:05 -07:00
Erwin Coumans
7d72f23711 premake: disable linking system OpenGL and X11 by default,
use dlopen to dynamically load GL/X11
2016-03-24 21:15:49 -07: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
Andrew Meadows
e66be7a7ef replaced spaced indentation with tabs 2015-12-03 22:00:52 -08:00
Andrew Meadows
b8f72ee56b fix bad --no-extras option for InverseDynamcis 2015-12-03 20:52:28 -08:00
Andrew Meadows
1c30453ae4 adding forgotten --no-extras build option 2015-12-03 20:49:31 -08:00
Andrew Meadows
d8b7d12707 combine checks for "ios" premake option
The "ios" option now only makes sense when action is "xcode"
2015-12-03 20:39:29 -08:00