Commit Graph

27 Commits

Author SHA1 Message Date
Erwin Coumans
1452cae641 * add textured models of ball.vtk (obj/mtl) and torus (obj/mtl) and cloth.
1) allow to render deformables in 'getCameraImage', for TinyRenderer (tested OK) and EGL (untested)
2) allow to have textures for deformables. See deformable_ball.py, deformable_anchor.py and deformable_torus.py for examples
3) deformables: allow to request simulation mesh data (even if there is a render mesh) See deformable_anchor.py for an example usage
   data = p.getMeshData(clothId, -1, flags=p.MESH_DATA_SIMULATION_MESH)
4) fix deletion of deformables, thanks to Fychuyan, https://github.com/bulletphysics/bullet3/pull/3048
5) allow to enable and disable double-sided rendering, p.changeVisualShape(objectUid, linkIndex, flags=p.VISUAL_SHAPE_DOUBLE_SIDED)
6) fix GripperGraspExample, model not found
7) Fix deformable anchor not attaching to multibody with object unique id of 0
8) Fix issue with assignment of unique ids in TinyRenderer/EGL renderer (always use broadphase uid)
9) Avoid crash/issue of simulation with pinned vertices (mass 0) in btDeformableBackwardEulerObjective::applyExplicitForce
10) Store uv/normal in btSoftBody::RenderNode to allow textured meshes
11) (uncomment in btSoftBodyHelpers.cpp): dump vertices and indices in obj wavefront format, when loading a VTK file, for quicker creation of a (textured) surface mesh
12) allow interpolateRenderMesh also for old position-based soft bodies (not only the shiny new FEM deformables)
13) fix a few premake targets
14) update build_visual_studio_vr_pybullet_double_cmake.bat so it suits c:\python37 and installs locally
    for local install of Bullet, see also this example https://github.com/erwincoumans/hello_bullet_cmake
2020-09-12 01:03:04 -07:00
erwincoumans
dba239fe8d First pass of load files through an interface (to allow loading from memory, zip file etc). So instead of posix fopen/fread, using CommonFileIOInterface.
A fileIO plugin can override custom file IO operations. As a small test, load files from a zipfile in memory.
Default fileIO implementation is in examples/Utils/b3BulletDefaultFileIO.h
Affects URDF, SDF, MJCF, Wavefront OBJ, STL, DAE, images.
2018-10-08 21:27:08 -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
erwincoumans
15a429f1bf premake build system fixes 2018-01-09 12:23:25 -08:00
Erwin Coumans
aafaa7e33e Expose optional "globalScaling" factor to pybullet.loadURDF and pybullet.loadSDF. This will scale the visual, collision shapes and transform locations.
Fix two_cubes.sdf (was lacking collision shape for second cube)
2017-08-14 14:59:41 -07:00
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
c0c4c8ba3f fix many warnings
remove btMultiSapBroadphase.*
make collisionFilterGroup/collisionFilterMark int (instead of short int)
2017-01-15 22:26:11 -08: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
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
f9762d63ab Removed many memoryleaks in Example Browser, reducing some technical debt.
When running the Example Browser with Basic Example, 'visual leak detector' show no leak.
Many other individual examples still leak, so it is work-in-progress.
Disabled the profiler window (too many leaks)
2016-07-16 00:55:56 -07:00
erwin coumans
7633cfb800 prepare robotics learning examples, see examples/RoboticsLearning/b3RobotSimAPI.h
prepare compliant contact work, urdf loading of parameters (see data/cube.urdf)
2016-07-11 00:26:40 -07:00
Erwin Coumans
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
f469a2cb49 update to tinyrenderer synthetic camera 2016-05-31 22:55:13 -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
535ee33e3b fix build3/stringify.sh
fix some compile issues
2016-05-25 15:37:28 -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
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
erwin coumans
0a3efbe349 make standalone versions (console, tinyrender, opengl) of InverseDynamics/InverseDynamicsExample 2016-05-06 13:57:48 -07:00
Erwin Coumans
acbf60ddfd typo fixes in InverseDynamicsExample 2015-12-05 09:02:02 -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
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