Commit Graph

630 Commits

Author SHA1 Message Date
erwincoumans
31e7f2e309 Merge pull request #697 from matpalm/addFovToRenderImage
pybullet renderimage with projection matrix calculated using field of view
2016-07-13 18:46:42 -07:00
erwincoumans
6c856d9fa3 Merge pull request #694 from matpalm/flipDepthImage
fix for vertically flipped depth buffer in TinyRenderer::render
2016-07-13 15:56:33 -07:00
Erwin Coumans
10cc6f14cb add option to use hardware OpenGL renderer for synthetic camera 2016-07-12 18:16:13 -07:00
Mat Kelcey
048c01d7c4 Merge branch 'master' of git://github.com/bulletphysics/bullet3 into addFovToRenderImage 2016-07-12 13:52:25 -07:00
Mat Kelcey
ad18cbafe8 Merge branch 'master' of git://github.com/bulletphysics/bullet3 into flipDepthImage 2016-07-12 13:51:48 -07:00
Mat Kelcey
2466dc155d fix for vertically flipped depth buffer in TinyRendererVisualShapeConverter::render 2016-07-12 13:46:48 -07:00
erwincoumans
787cb0cb17 Merge pull request #648 from benelot/master
Create Inclined Plane, Newton's Cradle and Multi-Pendulum examples for the Bullet Example Browser
2016-07-11 22:17:31 -07:00
erwincoumans
5249ca7ceb Merge pull request #690 from hujiajie/master
[WIP] Suppress compiler warnings.
2016-07-11 18:13:58 -07:00
Benjamin Ellenberger
b73bcead4b Merge remote-tracking branch 'upstream/master 2016-07-11 23:31:49 +02:00
Benjamin Ellenberger
5f03b039a5 Change btVector3/btQuaternion to const btVector3&/btQuaternion&.
------------------------------------------------------------------
Parameters such as btVector3/btQuaternion need to be passed as const reference, not by value (it causes SIMD alignnment errors on Windows).
2016-07-11 23:22:17 +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
hujiajie
d776f06815 [WIP] Suppress compiler warnings.
Visual Studio C4099: 'CommonExampleInterface': type name first seen using 'class' now seen using 'struct'.
2016-07-11 18:02:42 +08: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
erwincoumans
81ae53e3a4 Merge pull request #683 from erwincoumans/master
VR support in PhysicsServerExample, physics runs in its own thread.
2016-07-09 15:24:40 -07: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
Mat Kelcey
54979a0f89 pybullet renderimage with projection matrix calculated using field of view 2016-07-08 15:47:50 -07:00
Brigham Keys, Esq
06d6c9fc3a There was a typo I came across when cross compiling
TLDR; I fixed a typo for the windows build.
 - bkeys
2016-07-08 16:30:01 -05:00
Erwin Coumans
35b260b252 Merge remote-tracking branch 'bp/master' 2016-07-08 08:20:16 -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
Jasmine Hsu
993bd52fe2 fix minor issues - arg parse size, spelling, duplicate function definition 2016-07-07 13:56:32 -07:00
erwincoumans
9d629bdcd7 Merge pull request #672 from hellojas/renderImage
Render image with camera_pos, target_pos, camera_up vector as arguments
2016-07-07 12:42:41 -07:00
erwin coumans
d0f20eafd1 Allow to build PhysicsServer in VR mode, to see the URDF/SDF robots in proper scale in VR.
Add option to have Z as up-axis for VR examples.
Add OpenVR LICENSE + README file
Don't crash VR app when no HMD is detected, just exit.
For now, don't request debug lines in client, it slows down physics server in VR mode too much.
2016-07-02 18:53:19 -07: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
Jasmine Hsu
43011bdb3b merge upstream/master to latest commit ed9be25 2016-06-27 13:53:43 -07:00
Jasmine Hsu
f6bead7152 edit method definitions (docstring) for calling renderImage() 2016-06-27 13:51:28 -07:00
Jasmine Hsu
e24ec9e8c0 nearVal and farVal as params 2016-06-27 13:18:12 -07:00
Jasmine Hsu
5d5e7df7c5 exposing near/far values as params; commented out debug printf which caused failed checks 2016-06-27 11:19:57 -07: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
ed9be25570 Merge pull request #669 from hellojas/loadURDF
fix loading urdf at default position (0,0,0)
2016-06-26 19:12:20 -07:00
Erwin Coumans
013dbda023 implement a few more pybullet methods:
pybullet_applyExternalForce, pybullet_applyExternalTorque, pybullet_setTimeStep,
pybullet_resetBasePositionAndOrientation,
pybullet_getQuaternionFromEuler,
pybullet_getEulerFromQuaternion
2016-06-26 18:18:30 -07:00
Jasmine Hsu
d339cf5b74 ability to call renderImage with three vectors: camera position, target position, and up vector 2016-06-24 15:30:43 -07:00
Jasmine Hsu
aa91042ac8 merge bullet master 2016-06-24 15:20:46 -07:00
Erwin Coumans
c17c39c2c9 move PD control from PhysicsServerCommandProcessor into btMultiBodyJointMotor
improvements/changes in pybullet API
2016-06-24 11:06:56 -07:00
Erwin Coumans (Google)
6d1948e79e tweaks in pybullet and shared memory C-API:
allow to reset the state of a single joint
allow to set the target/mode for a single joint motor at a time
rename pybullet API: initializeJointPositions -> resetJointState
2016-06-24 07:31:17 -07:00
Jasmine Hsu
d2a2797201 accidently added pybullet.so 2016-06-23 14:06:14 -07:00
Jasmine Hsu
976e228be0 remove print debugger 2016-06-23 14:05:36 -07:00
Jasmine Hsu
a21889e225 remove print debugger 2016-06-23 14:01:57 -07:00
Jasmine Hsu
e0448c7613 fix loading urdf at default position (0,0,0) and adding b3 cmd to change orientation if args provided 2016-06-23 14:00:44 -07:00
Erwin Coumans
2cd0eba257 re-introduce old method in pybullet for temporary back-wards compatibility
b3JointControlCommandInit requires 3 args, but it was only 2,
use b3JointControlCommandInit2 for now.
2016-06-23 08:40:36 -07:00
Erwin Coumans
8b96e2de3c a few pybullet tweaks to set desired joint motor targets (pos/vel/torque) 2016-06-22 23:21:47 -07:00
Erwin Coumans
f5ffb11bc5 fix bus error on Raspberry Pi, unaligned float access when loading STL files
fix pybullet Python 3 issue (PyString_FromString -> PyBytes_FromString and PyInt_FromLong -> PyLong_FromLong)
2016-06-23 05:10:00 +00:00
Erwin Coumans
79fa4ebd7c Merge remote-tracking branch 'bp/master' 2016-06-22 10:01:22 -07:00
Erwin Coumans
2b8bd58e1c support single-scalar scale values in URDF, even though "officially" it should be a vector3. This will load quadcopter.urdf in Drake:
https://github.com/RobotLocomotion/drake/blob/master/drake/examples/Quadrotor/quadrotor.urdf
2016-06-22 09:59:25 -07:00
erwincoumans
0b249361c2 fix a c99 issue in pybullet 2016-06-21 09:01:27 -07:00
erwincoumans
01cad7c2a5 fix return type in pybullet
.
2016-06-20 15:00:35 -07:00
erwincoumans
b58978184c fix C99 issue, use malloc, not variable sized array.
.
2016-06-20 14:58:56 -07:00
Erwin Coumans
251fab0d75 expand b3ResourcePath automagic resource localization capability. 2016-06-20 12:40:08 -07:00
Erwin Coumans
a67df7fd03 fix cmake and premake build systems, after adding texture support in SDF,
in a nutshell, add the following two files:

examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp
examples/ThirdPartyLibs/stb_image/stb_image.cpp
2016-06-19 17:35:25 -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
yunfeibai
d51320be2c Check diffuse field in sdf. 2016-06-17 15:47:11 -07:00
Erwin Coumans
26f6618f00 colors for sdf 2016-06-17 12:07:38 -07:00
erwincoumans
c7365837cd Merge pull request #661 from erwincoumans/master
fix some issues related to controlling a robot/multibody beyond body …
2016-06-17 07:34:07 -07:00
Erwin Coumans
53a0772257 fix some issues related to controlling a robot/multibody beyond body index 0
(most testing happened with a single robot/multibody so far)
preliminary pybullet.setJointControl implementation
2016-06-16 18:46:34 -07:00
yunfeibai
1329f265c8 Set view and projection matrices from camera and frustum parameters. 2016-06-16 11:48:37 -07:00
Erwin Coumans
3f5f8d3e00 Merge remote-tracking branch 'bp/master' 2016-06-15 18:07:58 -07:00
Erwin Coumans
95a09bec99 implement getJointInfo for objects loaded through SDF 2016-06-15 18:01:41 -07:00
Jasmine Hsu
03fded3dc7 getJointPositions returns a list of all joint positions for a given bodyIndex 2016-06-15 14:21:04 -07:00
Erwin Coumans
456c844a6b work-in-progress send object/joint information after loading SDF file 2016-06-14 18:41:19 -07:00
Jasmine Hsu
934725554f remove initializeJointPosition as setting one joint is not supported 2016-06-14 15:21:50 -07:00
Jasmine Hsu
d6ab1ab434 initialize a single joint position for a given body index 2016-06-14 14:58:36 -07:00
Jasmine Hsu
d53d6366de get the state of a specific joint given a body index 2016-06-14 14:35:45 -07:00
Jasmine Hsu
55560e114e merge bulletphysics:master to commit:b06e1cb 2016-06-14 14:13:54 -07:00
Jasmine Hsu
eeaff0747b return joint state given a joint index and body index 2016-06-14 14:08:24 -07: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
566ed87c93 fix a regression in a test 2016-06-13 18:58:52 -07:00
erwincoumans
6523df336e Fix pybullet Windows build errors: C99 requires variables to be defined at the start of the function.
Improve CMake Windows support to build PyBullet (BUILD_PYBULLET)
Implement b3LoadSdfCommandInit in shared memory API
Implement pybullet SDF loading binding, in loadSDF API
TODO for SDF support is provide way to query object/link/joint information.
2016-06-13 10:11:28 -07:00
Jasmine Hsu
9c5a7925f0 add internal set matrix function 2016-06-10 15:14:00 -07:00
Jasmine Hsu
ecc192df94 render image with ability to set pixel resolution and initial camera position 2016-06-10 15:07:52 -07:00
Jasmine Hsu
b0c7c086e3 render image with ability to set pixel resolution and initial camera position 2016-06-10 15:07:41 -07:00
Erwin Coumans
98d2f91f3c fix flipped tinyrenderer image 2016-06-09 12:12:46 -07:00
Erwin Coumans
e0c3392cee don't pass width/height into renderObject 2016-06-07 17:02:47 -07:00
Erwin Coumans
d2e50d045b fix issues related to camera width/height
add width,height as arguments to pybullet.renderImage(x,y,[viewMat4x4],[projMat4x4])
2016-06-07 16:11:58 -07:00
Erwin Coumans
bd668d11b0 add .stl file support in 'File/Open' of example browser. 2016-06-07 12:57:46 -07:00
Erwin Coumans
1c7f87aff1 implement first draft of pybullet.renderImage for synthetic camera
remove a few debug printf from tinyrenderer
2016-06-06 18:54:05 -07:00
Benjamin Ellenberger
e46a718807 Add btScalar fixes and correct M_PI to SIMD_PI. 2016-06-06 23:47:33 +02:00
Erwin Coumans
8076d5235c fix window resize/width bookkeeping bug in MacOpenGLWindow.mm 2016-06-04 21:51:21 -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
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
5bf125cab5 fix some compile issues using premake
use textured cube/sphere model for test
2016-06-02 13:54:52 -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
ef85a71d4b more work on synthetic camera 2016-06-01 11:04:10 -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
de9bd65c19 fix compile issues 2016-05-26 19:22:26 -07:00
Erwin Coumans
098e0158ea fix compile issue(s) in BT_USE_DOUBLE_PRECISION mode 2016-05-26 18:21:57 -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
68545fb71a fix pybullet.getPositionAndOrientation crash/issues 2016-05-26 15:58:10 -07:00
Erwin Coumans
535ee33e3b fix build3/stringify.sh
fix some compile issues
2016-05-25 15:37:28 -07:00
Erwin Coumans
bd1620eda8 add pybullet.getBasePositionAndOrientation
add missing file to pybullet CMakeLists.txt
2016-05-24 15:29:26 -07:00
erwincoumans
ef19248daf Update URDFImporterInterface.h 2016-05-24 10:30:04 -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
erwin coumans
f4775c360f Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-05-19 09:19:44 -07:00
erwin coumans
b961545292 prepare support for VR 2016-05-19 09:19:36 -07:00
erwin coumans
9cc028d44c fix issue, some paths didn't return a value 2016-05-19 09:16:47 -07:00
Erwin Coumans
cf1012aa3d minor update in TinyRenderer example 2016-05-18 18:32:13 -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
5500fc81df fix #include 2016-05-18 16:01:36 -07:00
Erwin Coumans
cdd6954ada fix pybullet cmake compilation 2016-05-18 15:07:42 -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
erwin coumans
606f78da43 work-in-progress tinyrenderer -> shared memory API synthetic camera image 2016-05-17 23:57:19 -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
yunfeibai
7929bee128 parse root transformation and test loading two robots 2016-05-11 15:52:50 -07:00
yunfeibai
06a2669b32 test load kuka arm sdf 2016-05-11 13:43:50 -07:00
yunfeibai
1bebcc6d9a Merge remote-tracking branch 'upstream/master' 2016-05-10 10:18:27 -07:00
erwincoumans
119d47166d Update test.py 2016-05-10 01:28:45 -07:00
erwincoumans
15ce069c04 Update test.py 2016-05-10 01:26:13 -07:00
erwincoumans
9ba3a844c0 Update test.py 2016-05-10 01:24:40 -07:00
erwincoumans
94fe96e2b4 Update test.py 2016-05-10 01:13:19 -07:00
erwincoumans
bad3ff9699 Merge pull request #624 from erwincoumans/master
Allow to compile pybullet on Windows, using CMake
2016-05-10 01:12:00 -07:00
erwin coumans
99073e03f7 Allow to compile pybullet on Windows, using CMake
(got it to run, rename pybullet.dll into pybullet.pyd and copy in c:\python34\dlls)
Update test.py
Allow to compile pybullet using Python 3.x and 2.7
2016-05-10 00:57:54 -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
erwincoumans
ec5806a979 Merge pull request #614 from erwincoumans/master
add BasicExampleGui for cmake, preliminary pybullet
2016-05-04 00:35:34 -07:00
Erwin Coumans (Google)
194009f46e linux fixes 2016-05-04 00:17:39 -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
f0b9037cd2 tweak cmake, add option BUILD_PYBULLET 2016-05-03 23:42:19 -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
a251ff4331 add 'dl' target libs in cmake 2016-05-03 21:48:28 -07:00
erwincoumans
50d86b98ff Merge pull request #612 from cirosantilli/hello-world
Improve HelloWorld
2016-05-03 21:43:08 -07:00
Erwin Coumans
a9ef145910 add standalone opengl version of BasicExample for cmake, called BasicExampleGui 2016-05-03 21:27: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
fb65c29033 use "world" to make door static (instead of using mass = 0)
minor improvements to pybullet
2016-05-03 12:59:21 -07:00
erwin coumans
984c880b2c move 'main' functions into a separate folder, to make it easier to create standalone demos (console app without gui, or opengl app, and possibly even other versions, like a software renderer, producing pictures in the cloud)
Add a line in an example cpp file to allow a standalone version.
See examples/BasicExample.cpp: B3_STANDALONE_EXAMPLE(BasicExampleCreateFunc)
2016-05-01 14:52:27 -07:00
Ciro Santilli
3c5b4af1c3 Improve HelloWorld
- explain in comments the shape of the ground and better group that code
- give enough time for the sphere to hit the ground
- don't ask for confirmation to exit, it's annoying
2016-05-01 15:48:03 +02: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
ab4299f517 expose the local inertial frame for each link in the shared memory API
struct b3LinkState
{
    double m_worldPosition[3];//this is the inertial frame
    double m_worldOrientation[4];

    double m_localInertialPosition[3];//this is the local frame from inertial to link frame
    double m_localInertialOrientation[4];
};

  const btTransform link_frame_world =
               inertial_frame_world * m_local_inertial_frame->inverse();
2016-04-29 14:46:25 -07:00
Erwin Coumans
ec914b08e7 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-04-28 23:13:35 -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
615effa4d9 fix typo in texels flip
add support to create a cube in TinyRenderer (quick test)
2016-04-28 12:28:04 -07:00
Erwin Coumans
a3767193ce add example to use BasicDemo with an OpenGL Window, without example browser 2016-04-27 09:55:42 -07:00
Erwin Coumans
924456548e fix build, add premake4.lua 2016-04-26 21:08:02 -07:00
erwin coumans
40841e9078 revert floor.obj test file, load it by default in TinyRenderer/main.cpp 2016-04-26 21:01:46 -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
2cb39e358a add unmodified version of TinyRenderer, a 500 line software renderer with vertex and pixel shaders, texture mapping and Wavefront .obj support. 2016-04-26 20:47:10 -07:00
Erwin Coumans
edba85bab3 fix issue in X11OpenGLWindow (uninitialized variable causing issue at exit) 2016-04-25 19:19:19 -07:00
Erwin Coumans
64cfbacf0a Merge remote-tracking branch 'bp/master' 2016-04-25 13:24:18 -07:00
Erwin Coumans
778ce5296d add example of rendering a cube in SimpleOpenGL3 2016-04-25 13:21:56 -07:00
erwincoumans
a080a568f2 Update main.cpp
remove unused variable
2016-04-25 09:42:16 -07:00
erwincoumans
66bfb7e708 Update PhysicsClientC_API.cpp
fix a copy/paste bug -> pos+quat = 7, but pos is just 3
2016-04-25 09:37:04 -07:00
Erwin Coumans
f99d1c45aa expose multibody link world transform in the shared memory API 2016-04-23 17:29:46 -07:00
Erwin Coumans
16cbc191bd Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-04-23 11:06:49 -07:00
Erwin Coumans
d8da00aa35 re-enable Wavefront .obj loader 2016-04-23 11:06:34 -07:00
Erwin Coumans (Google)
67426ecee9 add missing stubs for the obsolete SimpleOpenGL2Renderer 2016-04-21 14:10:45 -07:00
Erwin Coumans
4e61f0cab9 add function to CommonRenderInterface to update/activate a texture
add example how to render a texture 2d quad in SimpleOpenGL3
2016-04-20 12:55:21 -07:00
Erwin Coumans
da948a0729 fix text rendering (uninitialized uniforms) 2016-04-19 18:21:53 -07:00
yunfeibai
cbeddfc897 Modify shared memory client example to test joint motor torque measurement. 2016-04-19 16:52:47 -07:00
yunfeibai
c384383250 Merge branch 'master' of https://github.com/bulletphysics/bullet3
Update measured torque name.
2016-04-19 14:20:28 -07:00
yunfeibai
c3afbf7689 set desired position target 2016-04-19 14:19:18 -07:00
Erwin Coumans
0f5ee7a0a9 rename m_jointForce -> m_jointMotorForce to separate the name from m_jointForceTorque (which should have been called m_jointReactionForce) 2016-04-19 12:22:38 -07:00
erwincoumans
05845d7df9 Merge pull request #602 from erwincoumans/master
handle window closing in InProcessPhysicsClientSharedMemoryMainThread
2016-04-19 10:58:13 -07:00
yunfeibai
f9719e2405 Add measured joint motor force to joint sensor state. 2016-04-19 10:44:59 -07:00
Erwin Coumans
bebe9a728b handle window closing in InProcessPhysicsClientSharedMemoryMainThread 2016-04-19 08:29:20 -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
476eb342ab fix scaling in URDF importer 2016-04-18 17:41:54 -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
0ca56e756f add joint damping in PhysicsServerCommandProcessor 2016-04-13 17:21:43 -07:00
Erwin Coumans
4df7257250 more comments in SharedMemory C API 2016-04-13 17:09:48 -07:00
Erwin Coumans
34e6eb4a18 add a few lines of documentation and some error checks in SharedMemory API 2016-04-13 13:06:15 -07:00
Erwin Coumans
f3c7f30684 fix some memory leaks in ImportURDF / PhysicsServerCommandProcessor 2016-04-11 16:42:02 -07:00
Erwin Coumans
59b32b7af1 re-enable command log and playback in physics server
report applied motor torque in physics server
2016-04-08 18:17:17 -07:00
Erwin Coumans
d2793ec5c0 fix char -> int, to allow check with -1, some build systems fail
to make char a signed char
fix unused variable
removed duplicate header files in Gwen/Controls/Layout
2016-03-31 12:52:04 -07:00
Erwin Coumans
6c0ef7e597 fix resize issue on Linux, using i3 window manager on Linux
fix uninitialize modified key (ALT etc) on Linux/X11
2016-03-30 21:45:20 -07:00
Erwin Coumans
5c1eb2ec07 support 'world' tag for fixed objects in URDF 2016-03-30 14:43:59 -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
643cf5ab1d Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-03-17 16:12:48 -07:00
Erwin Coumans
7e4dfb7207 remove SimpleOpenGL3 demo, it breaks some builds
reset callback to 0 after exiting a demo to avoid issues
2016-03-17 16:11:53 -07:00
erwincoumans
fe92de3e50 add infrastructure float btMultiBodyLink m_jointDamping, m_jointFriction (actual damping/friction is in a separate commit)
add door.urdf for testing damping/friction
2016-03-17 14:54:46 -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
6c9815c8f9 fix axis in r2d2.urdf
enable SimpleOpenGL3 demo for CMake
2016-03-16 08:13:53 -07:00
Erwin Coumans
aa3daaa8c6 turn test/SharedMemory/test.c into a gtest for CI unit testing in github
remove overly verbose printfs in importers
fix axis in r2d2.urdf
2016-03-15 22:47:53 -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
40a9b8cea0 fix relative include path 2016-03-07 15:12:33 -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
f90ba2eff9 fix issue, CrossSplitter.cpp cannot be disabled using #ifdef _WIN32 2016-03-01 09:10:16 -08:00
Erwin Coumans
4a70df2dfb fix some warnings 2016-02-29 15:37:03 -08:00
erwincoumans
d196cec51f Update RigidBodySoftContact.cpp
fix typo
2016-02-23 08:02:28 -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
a3154f7a56 use b3ConnectSharedMemory in PhysicsClient example, instead of b3ConnectPhysicsLoopback 2016-01-27 13:36:33 -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
erwincoumans
ab283251d3 Merge pull request #546 from erwincoumans/master
typo fixes in InverseDynamicsExample
2015-12-07 15:07:24 -08:00
Andrew Meadows
c0c1691c25 fix whitespace formatting in cmake files 2015-12-07 14:08:04 -08:00
Erwin Coumans
acbf60ddfd typo fixes in InverseDynamicsExample 2015-12-05 09:02:02 -08:00
erwincoumans
aaf4e1acfa Merge pull request #491 from nicokruithof/master
Fixed missing include directories
2015-12-04 21:49:47 -08:00
Erwin Coumans
b22e968cdd re-enable inverse dynamics/computed torque, instead of PD control in InverseDynamicsExample 2015-12-02 23:16:41 -08:00
Erwin Coumans
3dfebe0c45 show inverse dynamics demo to use floating base 2015-12-02 09:33:12 -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
5f97a56f93 portability issues fixed 2015-11-24 11:40:33 -08:00
Erwin Coumans
460998c472 fix example issues 2015-11-24 11:34:17 -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
bd4c4eb3c5 rename API->Api 2015-11-22 21:32:20 -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
Erwin Coumans
7d9365319c add InverseDynamics test/lib to premake 2015-11-17 08:26:27 -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
f6a8079353 sync repo 2015-11-11 12:44:26 -08:00
erwincoumans
3b9b803683 b3CreateBoxCommandSetColorRGBA: allow to specify color when creating bodies through shared memory API
Parse and use colors from URDF file (single rgba color per link, not per visual)
Rename btMultiBody 'stepVelocities' to 'computeAccelerationsArticulatedBodyAlgorithmMultiDof'
btHashMap, add const Value* operator[]
remove a few more obsolete btMultiBody methods (on the non-multi-dof path)
fix spelling typo in fillConstraintJacobianMultiDof (fil -> fill)
Add mention to Jakub Stepien for his work on btMultiBody
2015-11-06 17:11:15 -08:00
erwincoumans
8160354d02 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2015-11-05 21:18:10 -08:00
erwincoumans
2920d7e61f Only support btMultiBody multi-dof version (remove non-multi-dof path)
Use ATTRIBUTE_ALIGNED16 for btMultiBody
Always disable parentCollision for btMultiBody::setupFixed
2015-11-05 21:17:46 -08:00
Erwin Coumans
7ef06d532e remove debug test 2015-11-05 17:35:05 -08:00
Erwin Coumans
2317307a22 Add b3GetStatusActualState() to C_API.
Change pick-and-move C_API to use handlers
2015-11-04 16:08:28 -08:00
erwincoumans
d6464ce40d add 'replay' command log feature: no mouse interaction during replay, and use a fixed number of sim steps in stepSimulation.
workaround for reversed separating normal in gjk/epa when using very small shapes, detect case and revert normal.
use smaller world size (10 units versus 100) for higher resolution shadow map
use a hard-coded rolling friction of 0.2 for objects in physics server (will make this configurable)
fix loading of command log files, when platform features are different (64bit/32bit)
2015-11-01 12:48:15 -08:00
Erwin Coumans
6e042b1901 re-enable wireframe in PhysicsClient
inintialize variables in constructor of PhysicsClient
2015-10-30 13:24:02 -07:00
erwin coumans
c68c215ead add rudimentary command logging for shared memory physics server 2015-10-30 10:30:48 -07:00
erwin coumans
819c4f1951 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2015-10-29 11:26:01 -07:00
erwin coumans
f7bbbd88e6 preparation for CommandLogging for PhysicsServer. 2015-10-29 11:25:50 -07:00
erwin coumans
9442791cf1 Fix PhysicsServer connection issue, in cases where shared memory was not properly shut down. 2015-10-29 11:18:26 -07:00
erwincoumans
650189d50b Allow both remote debug drawer and local debug drawer for PhysicsServer (shared memory etc) 2015-10-29 08:28:49 -07:00
Erwin Coumans
8a956318e5 fix case sensitive issue 2015-10-28 16:02:55 -07:00
Erwin Coumans
6a6c0297fe Merge branch 'master' of https://github.com/erwincoumans/bullet3 2015-10-28 13:44:30 -07:00
erwin coumans
dc81e31e74 upload work-in-progress Collision example using C-API. 2015-10-28 11:48:36 -07:00
erwin coumans
2d5d89d999 Allow to request the state of a rigid body (position, orientation, lin/ang velocity) through shared memory API
PhysicsClientC_API: b3RequestActualStateCommandInit requires a body unique Id as second argument
2015-10-27 15:46:13 -07:00
erwin coumans
9cc2b1ec12 Physics SharedMemory:
Add flags BOX_SHAPE_HAS_MASS and  BOX_SHAPE_HAS_COLLISION_SHAPE_TYPE to CMD_CREATE_RIGID_BODY
(which maps to CMD_CREATE_BOX_COLLISION_SHAPE for backward compatibility for now)
Need to add way to receive world transform
2015-10-27 14:55:46 -07:00
erwincoumans
57f50f1778 Create a PhysicsLoopBack that includes both PhysicsClient and PhysicsServer over shared memory.
Add a test for PhysicsLoopBack.
2015-10-26 17:56:21 -07:00
erwincoumans
e779bb247b Merge branch 'master' of https://github.com/erwincoumans/bullet3 2015-10-26 16:16:08 -07:00
Erwin Coumans
163b797d8b Update to ZLib license for GWEN files.
Note that our copy of GWEN is modified and GWEN is not under active development anymore.
We plan to integrate and modify GWEN further into the Bullet Example Browser or rewrite the GUI and drop GWEN

fix cube.obj and cube.mtl to enable textures
2015-10-25 11:30:34 -07:00
erwincoumans
d6916107dc Merge branch 'master' of https://github.com/erwincoumans/bullet3 2015-10-24 14:01:01 -07:00