Commit Graph

1276 Commits

Author SHA1 Message Date
Erwin Coumans
5899425774 expose linkIndexA/B as filter option in pybullet.getContactPoints 2017-03-29 12:04:23 -07:00
Erwin Coumans
eb8c31ae82 move pybullet examples to Bullet/examples/pybullet/examples 2017-03-29 09:40:56 -07:00
erwincoumans
0750d502a8 Merge pull request #1041 from olegklimov/master
Random improvements (MJCF, error messages, gravity)
2017-03-29 09:12:48 -07:00
Erwin Coumans
fffa17dd35 little tuning for rendering 2017-03-28 08:20:10 -07:00
Erwin Coumans
46c5b00964 report actual number of instances (enable sync transforms for physics server) 2017-03-27 23:09:24 -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
fd2c0f58bc Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-03-27 17:25:40 -07:00
Oleg Klimov
77608154a3 MJCF: fix capsule length when given in size="", fix slider joint limits 2017-03-27 22:54:20 +03:00
Oleg Klimov
3048326add C API: fix b3SetContactFilterLink() when using b3RequestContactPoint() 2017-03-27 22:54:20 +03:00
Oleg Klimov
dcb7e25f34 MJCF: improve error messages 2017-03-27 22:54:20 +03:00
Oleg Klimov
634f4cfdbc MJCF: support for angle units in <compile angle="...">, kill two stdout messages 2017-03-27 22:54:20 +03:00
Erwin Coumans
38ad1bfb89 revert to m_jointFriction (from m_jointFriction1) 2017-03-27 10:16:55 -07:00
Erwin Coumans
4911916937 Expose 'flags' option for loadURDF, to allow customization of the URDF loading process while maintaining backward compatibility.
For example: URDF_USE_INERTIA_FROM_FILE flag. By default, URDF2Bullet will re-compute the inertia tensor based on mass and volume, because most URDF files have bogus Inertia values.
2017-03-27 08:30:20 -07:00
Erwin Coumans
f4be2c1ee0 pass the joint parameters for all joints 2017-03-26 20:05:48 -07:00
Erwin Coumans
7462d55128 remove non-public files 2017-03-26 16:29:06 -07:00
Erwin Coumans
7503418c72 Split Bullet/src/LinearMath/btSerializer.cpp into btSerializer64.cpp to make it easier to rebuild serialization structure.
Add several MSVC optimization flags to cmake.
Bump up VERSION because serialization format changed
Expose btScalar& jointMaxForce, btScalar& jointMaxVelocity to 'getJointInfo2' API, add backwards compatibility to examples\Importers\ImportURDFDemo\URDFImporterInterface::getJointInfo.

pybullet: expose 4 more fields to getJointInfo: jointLowerLimit/jointUpperLimit/jointMaxForce/jointMaxVelocity
fix performance issue in CMD_ACTUAL_STATE_UPDATE_COMPLETED
2017-03-26 13:06:46 -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
yunfeibai
0a552c3ba1 Merge remote-tracking branch 'upstream/master' 2017-03-23 13:55:44 -07:00
yunfeibai
d717b1db84 Add the API to get the body name and pybullet example call. 2017-03-23 13:54:44 -07:00
Erwin Coumans
0a654c2d58 expose optional targetVelocity to pybullet.resetJointState
add C-API: b3CreatePoseCommandSetJointVelocities and b3CreatePoseCommandSetJointVelocity
2017-03-23 10:29:16 -07:00
yunfeibai
50f0cfca9e Add body name when loading urdf. 2017-03-23 10:16:39 -07:00
Erwin Coumans
e381e84319 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-03-21 20:44:16 -07:00
Erwin Coumans
15e6ee1a04 add missing define in pybullet to start/stop MP4 video, pybullet.startStateLogging(STATE_LOGGING_VIDEO_MP4,"filename.mp4") 2017-03-21 20:43:23 -07:00
erwincoumans
049d9a5ca6 Update OpenGLExampleBrowser.cpp
revert original width/height to 1024x768
2017-03-21 17:41:11 -07:00
erwincoumans
a30b887595 Merge pull request #1025 from olegklimov/master
URDF loader improvement 2
2017-03-21 17:12:22 -07:00
Oleg Klimov
80a0b51a1d MJCF: fix cylinders in MJCF, also (possibly) fixes capsules in tiny renderer 2017-03-22 00:36:28 +03:00
erwincoumans
cb08d077f0 Merge pull request #1030 from erwincoumans/master
friction anchors, arm64 premake
2017-03-20 11:48:44 -07:00
Erwin Coumans
0b017b0f53 fix issue with btMultiBody friction in combination with soft contacts (friction should not re-use normal contact cfm/erp)
implement friction anchors, position friction correction, disabled by default. Use colObj->setCollisionFlag(flag | CF_HAS_FRICTION_ANCHOR); See test/RobotClientAPI/SlopeFrictionMain.cpp. In URDF or SDF, add <friction_anchor/> in <contact> section of <link> to enable.
PhysicsServer: properly restore old activation state after releasing picked object
btMultiBodyConstraintSolver: disable flip/flop of contact/friction constraint solving by default (it breaks some internal flaky unit tests)
2017-03-20 10:58:07 -07:00
yunfeibai
6695268fba Fix the issue with indentation in pr2 setup. 2017-03-20 09:52:24 -07:00
Oleg Klimov
41df15a464 MJCF: fix B3_PI, fix colors, fix capsule without 'fromto' 2017-03-19 00:19:04 +03:00
Oleg Klimov
4526b0a94a MJCF: support for default joint limited="true" 2017-03-18 04:10:07 +03:00
Oleg Klimov
e8da7bb6f8 URDF loader: fix MuJoCo xml load, also closes #993 2017-03-17 02:11:47 +03:00
Erwin Coumans
32b9eacb34 fix compile issue 2017-03-16 13:26:44 -07:00
erwincoumans
86bec45247 Merge pull request #1024 from erwincoumans/master
expose video capture as logging command
2017-03-16 11:02:58 -07:00
erwincoumans
a89d3cfb95 Merge pull request #1019 from erikogenvik/kinematic_controller_initialization
Kinematic controller initialization
2017-03-16 10:54:41 -07:00
Erwin Coumans
3d339af98d Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-03-16 09:13:55 -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
e0a4393bd2 fix compile issue 2017-03-15 17:35:10 -07:00
Erwin Coumans
b7b46b12d3 update RobotSimulator/MinitaurSetup to use data/quadruped/minitaur.urdf
add b3RobotSimulatorClientAPI::getBaseVelocity and resetBaseVelocity
add b3Quaternion::getEulerZYX
2017-03-15 17:09:17 -07:00
Erwin Coumans
4db6fa9e29 update minitaur.py to use minitaur.urdf (instead of quadruped.urdf), also sort the legs in the same order as real hardware
added test urdf files for minitaur with all fixed joints, or fixed knees.
added some stiffness/damping to minitaur legs (testing)
tiny_obj_loader, don't crash on invalid texture coordinates
btMultiBodyConstraintSolver: sweep back and forward to reduce asymmetry
2017-03-15 15:38:50 -07:00
Erwin Coumans
a613911c84 Merge remote-tracking branch 'bp/master' 2017-03-15 11:05:16 -07:00
erwincoumans
6f171f90dc Merge pull request #1015 from JulianYG/master
Fixed shaking issue, and hopefully the offset should be gone.
2017-03-15 09:15:00 -07:00
Erwin Coumans
6e2850e08a fix names (case) for Linux for MPL/hand 2017-03-14 17:03:11 -07:00
Julian
bb9601bf64 fixed numpy dependency and gripper 2017-03-14 14:43:08 -07:00
Erik Ogenvik
b0aef44668 Make it compile on Linux.
I simply copied from BasicDemo/CMakeList.txt
2017-03-14 22:08:55 +01:00
Erwin Coumans
66919cc66a fix unreachable code 2017-03-14 13:13:16 -07:00
Erwin Coumans
3d2cb1cabf also allow absolute path in asset files (.obj, .stl, .dae etc) 2017-03-14 10:40:27 -07:00
Julian
b686d1274c fixed minor issues, added 1dof on end effector rotation. gripper is raw 2017-03-13 22:09:08 -07:00
Julian
7cc31e7c98 fixed minor issues, added 1dof on end effector rotation. gripper is raw 2017-03-13 22:08:17 -07:00
Julian
fabe09fe53 add 1 dof to kuka end effector 2017-03-13 22:04:28 -07:00
Julian
8145203222 add 1dof to kuka end effector 2017-03-13 22:04:16 -07:00
erwincoumans
b5eb19ce2a Merge pull request #1013 from erwincoumans/master
relax the UseTab, apply clang-format to pybullet.c
2017-03-13 19:17:16 -07:00
erwincoumans
c1c89e6fad Merge pull request #1000 from olegklimov/master
URDF loader improvement 1
2017-03-13 19:16:45 -07:00
Erwin Coumans
5009a55ee1 Merge remote-tracking branch 'bp/master' 2017-03-13 18:50:32 -07:00
erwincoumans
1a079ceb59 Merge pull request #1003 from JulianYG/master
pybullet VR controller controls the kuka arm
2017-03-13 18:32:48 -07:00
Oleg Klimov
fa60cc5f56 URDF loader: fix SDF branch, warn about unsupported geometry 2017-03-14 02:32:02 +03:00
Erwin Coumans
901b314a1e clang-format pybullet.c
move AccessModifierOffset to -4 (public:, private:, protected: are aligned to the left in Bullet)
2017-03-13 16:06:52 -07:00
erwincoumans
55361a184c Merge pull request #1011 from erwincoumans/master
clang-format style file, easier way to format according to Bullet code style (may need some tweaks)
2017-03-13 14:13:50 -07:00
Erwin Coumans
b088f7febe Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-03-13 11:02:10 -07:00
Erwin Coumans
e36b7e02aa Fix for issue 1007
_clang-format file and applied to HelloWorld.cpp
usage:
clang-format -style=file -i examples/HelloWorld/HelloWorld.cpp
THere are still some issues with clang-format and its style
2017-03-13 11:00:56 -07:00
Mohi
43b0a8b6fb Fixing a bug on Visualizer Camera and a few more
- resetDebugVisualizerCamera now accepts negative values for pitch and
yaw angles

- Defining kitchen model to be concave, so as to be able to put floating
objects inside

- Fixed an indention error in testrender_np.py
2017-03-13 10:41:54 -07:00
Jie Tan
8c27a62e04 remove the stub calls from rllab 2017-03-10 13:41:05 -08:00
Jie Tan
37a809f5d1 added the learning algorithm from RL-lab 2017-03-10 12:29:47 -08:00
Jie Tan
923fbe8588 add gym examples 2017-03-10 11:22:38 -08:00
Oleg Klimov
3a8199ec28 Fix formatting 2017-03-10 19:46:46 +03:00
Oleg Klimov
82495f3c84 URDF loader: reuse the same resources finder routine for TinyRendererVisualShapeConverter 2017-03-10 18:17:38 +03: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
erwincoumans
4ea9fa54bb Merge pull request #995 from YunfeiBai/master
Bug fix: set logging unique id at initialization.
2017-03-09 11:40:43 -08:00
Julian
51dc3a1710 VR controller the kuka arm 2017-03-08 19:36:41 -08:00
Erwin Coumans
f2aa67d262 improve vrhand.py 2017-03-08 14:10:43 -08:00
Oleg Klimov
5b2a9d1a01 URDF loader: resources path, "package://" removal, error messages, zero material path in .obj loader 2017-03-08 15:14:54 +03:00
Erwin Coumans
af295b6eed optimize hand (hand.py, vrhand.py) MPL.xml STL meshes for better collision detection performance (using Blender decimation tool) 2017-03-07 19:07:45 -08:00
yunfeibai
3ad49ae5eb Set logging unique id at initialization. This fixed a bug that the second log couldn't be stopped properly. 2017-03-07 11:52:26 -08:00
erwincoumans
63dc57c7e6 add pybullet file to track VR controller attached to some robot (such as minitaur)
press button to toggle tracking, other button to reset orientation of controller, relative to robot.
2017-03-07 08:48:23 -08:00
erwincoumans
98e7519134 Update b3RobotSimulatorClientAPI.cpp 2017-03-06 18:54:52 -08:00
Erwin Coumans
f81211f3b0 fix quadruped.py, don't use 'realtime' and set timeout (in case connection to server is lost) to few seconds 2017-03-05 22:40:05 -08:00
erwincoumans
00361afea5 allow user to specify the maximum number of dofs to log in GenericRobotStateLogger (default = 12)
add minitaur quadruped playback of minitaur log files (real robot and simulated create the same log files)
add improved minitaur.urdf file, see https://youtu.be/lv7lybtOzeo for a preview.
2017-03-05 21:49:20 -08:00
erwincoumans
a7ad6c2860 Merge remote-tracking branch 'bp/master' 2017-03-04 15:31:02 -08:00
erwincoumans
c7579d7b82 fix quadruped, allow user to pick the maximum number of dofs to log 2017-03-04 15:30:57 -08:00
yunfeibai
e0c74a46ac Set renderer in pybullet. 2017-03-04 13:31:30 -08:00
yunfeibai
6e3cd26f11 Log time stamp and step count. 2017-03-04 13:19:43 -08:00
erwincoumans
44b140dd38 disable the gMaxNumCmdPer1ms experiment by default (-1)
fix minitaur_evaluate.py script, quadruped.py
2017-03-04 12:59:21 -08:00
Erwin Coumans
7cb5898db6 fix body name in GUI more
expose getBodyInfo to b3RobotSimulatorClientAPI
2017-03-03 11:33:20 -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
erwincoumans
255b21a776 Merge pull request #979 from erwincoumans/master
fix lack of collision scaling in pybullet URDF/SDF files (only graphi…
2017-03-02 08:18:11 -08:00
yunfeibai
a33dcdb63d Modify logging and playback to handle fixed joint. 2017-03-01 23:37:01 -08:00
Erwin Coumans
6a40c1cca7 pybullet expose resetDebugVisualizerCamera
example: pybullet.resetDebugVisualizerCamera(cameraDistance=3,cameraYaw=30,cameraPitch=52,cameraTargetPosition=[0,0,0])
2017-03-01 15:04:07 -08: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
ac28f50fa5 vrhand.py first try to connect to SHARED_MEMORY if that fails use GUI fallback 2017-03-01 13:01:02 -08:00
Erwin Coumans
2eb019cdc3 Created Wavefront obj to sdf converter, to make it easier to import complex obj models with many materials. See kitchen for example.
Fix in tinyobj, make sure material is initialized
Add fatihrmutfak kitchen model, for Virtual Reality and some research
2017-03-01 10:06:10 -08:00
Erwin Coumans
89e8e30de6 fix lack of collision scaling in pybullet URDF/SDF files (only graphics meshes supported scaling, collision objects ignored scaling) 2017-02-28 16:30:57 -08:00
erwincoumans
e2bdf124a1 Merge pull request #975 from erwincoumans/master
Rewrite 'diagonalize' to use 'extractRotation', should fix Issue 846
///See http://dl.acm.org/citation.cfm?doid=2994258.2994269
tweak Minitaur/RobotSimulator, fix target value from int to double.
2017-02-26 07:01:42 -08:00
Erwin Coumans
88aa9e899e tweak Minitaur/RobotSimulator, fix target value from int to double 2017-02-24 21:40:43 -08:00
erwincoumans
77538b04c2 Update PhysicsServerCommandProcessor.cpp 2017-02-24 16:01:18 -08:00
erwincoumans
929eb49029 Merge pull request #974 from erwincoumans/master
expose timeout in pybullet/shared memory API
2017-02-24 15:50:26 -08: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
erwincoumans
f15722ffb1 Merge pull request #973 from erwincoumans/master
allow to compile/run 64bit version of VR, co-exist of 64bit and 32bit openvr_api.dll
2017-02-22 17:38:27 -08:00
Erwin Coumans
0b27edf172 allow to compile/run 64bit version of VR lib, workaround for issue that both 32bit and 64bit version is called openvr_api.dll
Now 64bit version is called openvr64pi.dll (patched the 64bit binary library openvr_api.lib)
See also https://github.com/ValveSoftware/openvr/issues/412
2017-02-22 15:50:09 -08:00
yunfeibai
2751b34894 Add maximum joint angle. 2017-02-22 14:01:03 -08:00
yunfeibai
6f2a7220a5 Modify controller constraint in the pybullet vr gripper setup. 2017-02-22 13:52:49 -08:00
yunfeibai
86f0067266 A bug fix for logging the orientation of the base of the object. 2017-02-22 13:30:28 -08:00
Erwin Coumans
bd30ba30ce Replace large timeout (1024*1024*1024) using real-time clock timeout (10 seconds default)
Change SHARED_MEMORY_MAGIC_NUMBER to make sure server/client are using the same version (shared memory)
add --realtimesimulation to physics server (GUI, VR)
remove --G Xcode from build_cmake_pybullet_double.sh
2017-02-22 09:33:30 -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
218f883211 make flag/enable required argument
update pybullet quickstart guide PDF from
https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#
2017-02-21 17:53:49 -08:00
Erwin Coumans
926c83f2ab Merge remote-tracking branch 'bp/master' 2017-02-21 17:38:42 -08:00
Erwin Coumans
3988d363b3 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-02-21 17:38:32 -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
erwincoumans
61f05c7330 Update PhysicsServerCommandProcessor.cpp 2017-02-21 13:28:43 -08:00
Erwin Coumans
1cd65a324c update pybullet quickstart guide 2017-02-21 10:23:18 -08:00
erwincoumans
29772fc3b4 Merge pull request #965 from jietan/pullRequest
Pull request
2017-02-21 05:10:01 -08:00
erwincoumans
07bd911c36 Merge pull request #966 from erwincoumans/master
add tiny clsocket cross-platform TCP  library, update pybullet PDF doc
2017-02-20 21:17:22 -08:00
Erwin Coumans
5c74b0a199 add cmake support for TCP / clsocket in pybullet 2017-02-20 20:55:37 -08:00
Erwin Coumans
28146e816f export TCP connection mode to pybullet
made TCP disconnection detection more reliable
2017-02-20 20:34:05 -08:00
Erwin Coumans
942015df9d use TCP in main thread, accumulate bytes until size matches. 2017-02-20 18:54:12 -08:00
Erwin Coumans
3d73a9d788 shmem preliminary TCP implementation (not working yet) 2017-02-20 16:46:25 -08:00
Erwin Coumans
bfcdb8c408 add App_PhysicsServerTCP and App_PhysicsServerSharedMemoryBridgeTCP
(can be easier tunneled over SSH)
2017-02-20 14:43:01 -08:00
Erwin Coumans
55361e262e fix 6dof sensors for fixed joints (recent bug left fields uninitialized in getJointInfo)
add premake build support for Test_PhysicsClientUDP
2017-02-20 13:18:33 -08:00
yunfeibai
e12981fd45 Enable logging a specified list of objects for generic robot logging. 2017-02-20 12:17:12 -08:00
Erwin Coumans
3e94840340 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-02-19 12:09:12 -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
Erwin Coumans
957266b121 add tiny cross-platform TCP socket library from https://github.com/DFHack/clsocket
(todo: hook-up to Bullet cmake/premake build systems, and implement TCP alternative for UDP server)
2017-02-19 10:25:55 -08:00
yunfeibai
a3c1fec171 Add logging for generic robot and an example of logging state of kuka and cubes. 2017-02-17 17:41:57 -08:00
erwincoumans
45aa392a28 Update PhysicsServerCommandProcessor.cpp 2017-02-17 15:43:38 -08:00
erwincoumans
8af62239b0 Update pybullet.c 2017-02-17 15:15:13 -08:00
Erwin Coumans
cfd35840f0 initial implementation of state logging.
see examples/pybullet/logMinitaur.py for example. Other state logging will include general robot states and VR controllers state.
2017-02-17 14:25:53 -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
Jie Tan
0665a447af refactor to make minitaur example more general 2017-02-16 15:23:46 -08:00
Jie Tan
83e5e816f5 Merge remote-tracking branch 'bp/master' into pullRequest 2017-02-16 15:13:12 -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
Erwin Coumans
08b83c3cd8 Merge remote-tracking branch 'bp/master' 2017-02-16 13:41:12 -08:00
Erwin Coumans
6db217b36a remove some sleep delays from PhysicsServerExample physics loop. 2017-02-09 18:27:51 -08:00
Erwin Coumans
4587813a63 Merge remote-tracking branch 'bp/master' 2017-02-09 17:10:47 -08:00
Jie Tan
509b77054a now minitaur class can output joint angles, velocities and torques. I also extract evaluate functions to a file 2017-02-09 14:43:40 -08:00
Erwin Coumans
0e8bc418d7 add utility for reading and writing of minitaur quadruped robot log files.
Example usage:
const char* fileName = "D:/LOG00053.TXT";
btAlignedObjectArray<MinitaurLogRecord> logRecords;
btAlignedObjectArray<std::string> structNames;
std::string structTypes;
bool verbose = false;
//reading
int val = readMinitaurLogFile(fileName, structNames, structTypes,
logRecords, verbose);

//writing
const char* fileNameOut = "D:/LOG00100.TXT";
FILE* f = createMinitaurLogFile(fileNameOut,structNames,structTypes);
for (int i=0;i<logRecords.size();i++)
{
  appendMinitaurLogData(f, structTypes, logRecords[i]);
}
closeMinitaurLogFile(f);
2017-02-09 09:48:50 -08:00
Jie Tan
4df8b27626 make the motorId corresponds to that of the real minitaur. change the mass of the quadruped.urdf, change the friction of plane.urdf. 2017-02-08 17:26:36 -08:00
yunfeibai
ce69f27f32 Modify the depth buffer value in TinyRenderer to be consistent as in OpenGL. 2017-02-08 11:34:38 -08:00
Erwin Coumans
0c464e6848 [pybullet] add example for roll, pitch, yaw 2017-02-08 09:27:51 -08:00
yunfeibai
8034a6f7fc Merge remote-tracking branch 'upstream/master' 2017-02-07 17:21:14 -08:00
yunfeibai
151bc8e12c Add depth image when using hardware renderer. 2017-02-07 17:19:48 -08:00
erwincoumans
46c7974927 Merge pull request #947 from erwincoumans/master
[pybullet] add some out-of-bounds checks, reduce run-time memory allocations
2017-02-07 12:07:40 -08:00
erwincoumans
9705bb7681 Merge pull request #949 from YunfeiBai/master
EGL OpenGL window.
2017-02-07 08:39:12 -08:00
erwincoumans
61b68edb58 Merge pull request #951 from jietan/pullRequest
add minitaur class and test to the pull request
2017-02-07 08:29:55 -08:00
Erwin Coumans
56b4ac278b pybullet workaround for very slow Mac OSX GUI mode, since OpenGL can only run in main thread, just like the Python interpreter
improve quadruped.py script, to allow 'useRealTime' 0 or 1
2017-02-07 08:08:55 -08:00
erwincoumans
8a85b3b697 Update Utility.cpp
reduce stack size, it conflicts with some in-house build systems/compiler limits.
2017-02-06 17:20:03 -08:00
Jie Tan
692f7680a2 add minitaur class and test to the pull request 2017-02-06 16:27:54 -08:00
yunfeibai
c92fd6120d EGL OpenGL window. 2017-02-06 16:22:17 -08:00
erwincoumans
88fdffba04 pybullet/shared memory API: add some more check for out-of-bounds indices when setting up a command.
avoid many run-time memory allocations in btCompoundCompoundCollisionAlgorithm
2017-02-04 12:32:42 -08:00
yunfeibai
be77fb269f Add joint damping in pybullet IK example. 2017-02-03 16:36:20 -08:00
yunfeibai
df07f2aaaa minor fix 2017-02-03 14:44:25 -08:00
yunfeibai
abbd3ad884 minor fix. 2017-02-03 12:46:49 -08:00
yunfeibai
3442b6524a Merge remote-tracking branch 'upstream/master' 2017-02-03 12:32:08 -08:00
yunfeibai
ac5a8aa2d6 Set joint damping in pybullet. 2017-02-03 12:03:07 -08:00
yunfeibai
ce9378f819 Add shared memory API and RobotSim API for setting joint damping in IK. 2017-02-03 11:08:44 -08:00
erwincoumans
c1eabcf059 Merge pull request #944 from erwincoumans/master
[pybullet] fix type quation->quaternion, fix getVisualShapeData int->float, URDF parser accepts <xx/yy/zz> inertial data.
2017-02-03 09:24:20 -08:00
Erwin Coumans
58f37f85f4 fix type 'getMatrixFromQuaterion -> getMatrixFromQuaternion' (missing n, thanks Jie Tan for the report)
fix type of dimensions, visualframe in pybullet.getVisualShapeData (thanks Michael Ahn for the report)
2017-02-03 08:34:22 -08:00
erwincoumans
ab5a86576f Update CommonRigidBodyMTBase.cpp 2017-02-01 16:04:37 -08:00
erwincoumans
bbf596bce8 Update CommonRigidBodyMTBase.h 2017-02-01 16:03:00 -08:00
yunfeibai
0022d0dafb Modify damped least square IK formulation. Test setting joint damping coefficients for IK. 2017-01-31 22:58:37 -08:00
Erwin Coumans
7df123025f URDF parser: allow inertial element in just ixx, iyy, izz format (non-standard URDF)
tiny_obj_loader: don't crash when/if normals are not specified
2017-01-31 18:09:44 -08:00
erwincoumans
806f30aba5 Merge pull request #941 from erwincoumans/master
pybullet.enableJointForceTorqueSensor, add profile markers for BenchmarkDemo raytest.
2017-01-31 17:37:37 -08:00
erwincoumans
3a42b356e2 Add profile markers for BenchmarkDemo raytest.
Implement pybullet enableJointForceTorqueSensor, add forcetorquesensor.py example.
2017-01-31 10:14:00 -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
690bd4f265 fix rendering of rays in Benchmark demo when using BT_USE_DOUBLE_PRECISION 2017-01-30 18:51:19 -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
Lunkhound
f65644f3e0 fix compile error when BT_THREADSAFE not defined 2017-01-29 21:13:24 -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
446cb77a5e [UDP] disconnect needs to set m_data->m_isConnected=false 2017-01-28 23:18:26 -08:00
erwincoumans
d0e1ec8c48 add a usleep(0) to improve UDP performance on Windows (busy-loop eats all CPU time, other thread didn't proceed) 2017-01-28 22:46:23 -08:00
erwincoumans
87bce5eacf UDP networking improvements and experiments (send CMD_STEP_FORWARD_SIMULATION as 4 bytes command, status 8 bytes, instead of enormous command/status packages.
Change some timeouts to use actual RTC time instead of dummy loops 1024*1024*1024.
Fix type conected -> connected
2017-01-28 22:14:45 -08:00
Erwin Coumans
2ea7111933 [pybullet] clear error after parsing UDP string argument (instead of shared memory 'int' argument) 2017-01-28 13:03:01 -08:00
erwincoumans
2b3c25d5f2 add a b3Clock::usleep in PhysicsClientUDP to avoid clogging all resources
report more meaningful connection status for UDP.
2017-01-28 12:42:04 -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
erwincoumans
37ed4b819a [cmake] only use BT_ENABLE_VR for the _VR target
use -DUSE_DOUBLE_PRECISION=ON when building pybullet and/or VR targets
2017-01-25 22:41:31 -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
e652696f52 report localVisualFrame instead localInertialFrame 2017-01-25 08:29:45 -08:00
Erwin Coumans
76dcf3a751 remove the contype=0 in inverted_pendulum.xml, so we can 'mouse-pick' the pendulum.
[mjcf importer] add rudimentary support for inertial frame computation, for 'fromto' capsules.
2017-01-24 21:10:21 -08:00
Erwin Coumans
95e25d9942 fix a few warnings 2017-01-24 08:36:46 -08:00
Erwin Coumans
1b2db1ff09 more btCapsuleShape fixes
use hello_mjcf.xml for MJCF importer
2017-01-23 22:22:02 -08:00
Erwin Coumans
8c480b1cd7 revert to older version of stb_image, the new version causes issues in
our build system.
2017-01-23 17:36:43 -08:00
Erwin Coumans
fac943d9c7 Merge remote-tracking branch 'bp/master' 2017-01-23 16:47:07 -08:00
Erwin Coumans
d465e1eea5 add capsule support in urdf parser (non-standard extension), capsule.urdf
fix btCapsuleShape (X,Y,Z) margin issue
fix uninitialized variables in TinyRenderer: m_hasLightDistance, m_hasLightAmbientCoeff, m_hasLightDiffuseCoeff, m_hasLightSpecularCoeff
pybullet/shared memory API 'getClosestPoints' / b3InitClosestDistanceQuery, only report contacts equal/smaller distance than given
2017-01-23 16:45:18 -08:00
erwincoumans
d2c7d0b57d Merge pull request #926 from erwincoumans/master
more improvements to pybullet (bodies/constraints are up-to-date after reconnection), pybullet quickstart guide
2017-01-22 21:22:10 -08:00
Erwin Coumans
73e83d6e84 fix OSX build, fix some warnings 2017-01-22 21:06:51 -08:00
Erwin Coumans
cad45b9c20 add test script to move pr2 controller using pybullet (after initializing the world using vr_kuka_setup.py 2017-01-22 19:48:28 -08:00
Erwin Coumans
cf9f022d39 [pybullet] getNumConstraints, getConstraintInfo APIs.
[pybullet] updated pybullet_quickstartguide.pdf
Fail clearly (assert, return BT_INFINITY) if link index is out of range for btMultiBody methods localPosToWorld,worldPosToLocal,localDirToWorld,worldDirToLocal.
pybullet getConstraintInfo
Fix warnings due to Mac OSX 10.12 upgrade (with backward compatibility)
2017-01-22 19:08:31 -08:00
Erwin Coumans
f237c4440f pybullet: only allow a single local in-process GUI connection
update pybullet quickstart guide
2017-01-21 14:30:37 -08:00
erwincoumans
d834bc72af Merge pull request #925 from erwincoumans/master
Prepare for Bullet 2.86 release, update version to 2.86 (release will…
2017-01-21 12:32:41 -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
d81d62a70b Prepare for Bullet 2.86 release, update version to 2.86 (release will be tagged soon)
protect some C-API methods against negative dof indices
add triangle mesh import from MJCF files
update to recent pybullet quickstart guide pdf
2017-01-20 11:48:33 -08:00
Benelot
d3305bb76f Change jointIndex to linkIndex in getLinkState error message. 2017-01-19 09:11:06 +01:00
erwincoumans
394196e5a2 Update PhysicsServerExample.cpp 2017-01-17 17:38:30 -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
966ebb04fe set the paircache filter 2017-01-16 21:04:02 -08:00
Erwin Coumans
12a391e1f9 [pybullet] expose collision filter mode and max constraint force:
pybullet.changeUserConstraint(maxForce=<double>)
pybullet.setPhysicsEngineParameter(collisionFilterMode=<int>)
2017-01-16 18:17:18 -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
3dfcd27147 upgrade to latest stb_image from
7e989db555
2017-01-16 11:37:44 -08:00
Erwin Coumans
3d985ff7a5 add App_SharedMemoryPhysics and App_SharedMemoryPhysics_GUI to cmake
fix 'connection' detection for shared memory (due to multiple shmem blocks)
add link to pybullet.so
2017-01-16 11:17:32 -08:00
Erwin Coumans
8e9181f85c [MJCF import] add custom broadphase collision filter, for MJCF/MuJoCo compatibility
[MJCF import] improve MuJoCo importer, support collision filters
fixed a few more warnings
2017-01-16 08:23:49 -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
e3df00d5f1 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-01-15 11:22:38 -08:00
Erwin Coumans
310fabcd7e Further improvements in Bullet MuJoCo MJCF import:
[MJCF import] improved humanoid.xml, inverted_pendulum.xml import (automatically add dummy-links to connect multiple joints between bodies)
[MJCF import] fix bug in quaternion conversion (w,x,y,z) -> (x,y,z,w)
2017-01-15 11:22: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
7b7d897e3b explicitly mark dead code 2017-01-12 12:29:15 -08:00
Erwin Coumans
a93704889c add a default empty implementation for a few pure virtual calls
(in interface classes) for backward compatibility in some code base
2017-01-12 11:40:43 -08:00
Erwin Coumans
9aa5a839d5 add pybullet.changeConstraint / b3InitChangeUserConstraintCommand/ b3InitChangeUserConstraintSetPivotInB /b3InitChangeUserConstraintSetFrameInB command, to change an existing user constraint.
add constraint.py example.
allow pybullet.createConstraint to create user constraint without a child body ('fixed' to the world)
2017-01-12 10:30:46 -08:00
Erwin Coumans
1c79798583 make sure threads will get out of 'workerThreadWait' so they can exit at the end 2017-01-12 08:06:40 -08:00
Erwin Coumans
8caea20425 small tweak in inverse_kinematics.py example, to make it run better on OSX 2017-01-11 21:57:02 -08:00
Erwin Coumans
4897139dad pybullet.calculateInverseKinematics: expose null space method with and without orientation
add inverse_kinematics.py and hello_pybullet.py pybullet examples
add m_worldLinkFramePosition/Orientation fields to b3LinkState, and in pybullet.getLinkState (URDF link frame in Cartesian/world coordinates)
2017-01-11 21:39:22 -08:00
Erwin Coumans
3d6584962a remove some memory leaks in example code. 2017-01-10 14:57:16 -08:00
Erwin Coumans
5e948ebe00 add placeholder for EGLOpenGLWindow 2017-01-09 15:59:47 -08:00
Erwin Coumans
0f51fb618d micro-sleep every 8 milliseconds in physics server, to not starve other threads. 2017-01-08 13:06:08 -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
a051e6f164 fix pybullet unreachable code path 2017-01-07 10:25:10 -08:00
Erwin Coumans
b773481266 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-01-07 09:30:49 -08:00
Erwin Coumans
afdcf69837 implement some dummy methods in URDFImporterInterface, some code
breaks because of un-implemented methods
2017-01-07 09:30:06 -08:00
Lunkhound
b979064817 fix compile error on GCC 2017-01-06 21:20:44 -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
erwincoumans
d37379ddc3 remove an extra quote in the BulletMJCFImporter.cpp 2017-01-06 14:53:10 -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
Erwin Coumans
44126584fb Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-01-06 09:56:04 -08:00
Erwin Coumans
8f02e75d98 avoid creating shared memory segments with same key multiple times 2017-01-06 09:55:22 -08:00
Erwin Coumans
8e554a0c1b allow creation of multiple shared memory segments 2017-01-06 09:49:03 -08:00
Erwin Coumans
af57c812aa Merge remote-tracking branch 'bp/master' 2017-01-06 07:39:08 -08:00
Erwin Coumans
90b1026785 Merge branch 'master' of https://github.com/erwincoumans/bullet3 2017-01-05 18:36:54 -08:00
Erwin Coumans
0cf869e56a add multiple shared memory blocks, to allow multiple
simultaneous connections. At the moment, MAX_SHARED_MEMORY_BLOCKS = 2
Note that the amount of shared memory is limited on many systems,
32MB, while one block is already over 1MB at the moment...
You can connect to SHARED_MEMORY using the current key,
and key+1. There are a few commands that cannot currently be
executed in parallel among multiple connections,
since the implementation of the server
caches some data: rendering image (getCameraData),
getting contact point data and getting debug lines.
2017-01-05 18:30:01 -08:00
Erwin Coumans
83e103ac15 Add pybullet setVRCameraState and b3SetVRCameraStateCommandInit to set the VR camera root transform (position/orientation) and optional tracking object unique id (-1 for no tracking)
Fix robotcontrol.py script, getContactPointData -> getContactPoints
2017-01-05 17:41:58 -08:00
Benelot
fa2a734857 Update robotcontrol.py script. Closes #907. 2017-01-06 00:30:28 +01:00
Lunkhound
ea0df70c77 example browser: fix for GUI button toggle state 2017-01-02 23:01:22 -08:00
Lunkhound
da03d8ce5a options to change solver type and mode
Conflicts:
	examples/MultiThreadedDemo/CommonRigidBodyMTBase.h
2017-01-02 22:57:48 -08:00
erwincoumans
fb51c3f7ed Merge pull request #901 from erwincoumans/master
fix win32 UNICODE build, update pybullet quickstart quide PDF, pybullet.loadMJCF hookup
2016-12-31 17:40:28 -08:00
erwincoumans
92b53a4990 Merge pull request #895 from lunkhound/pr-fix-example-browser-text
example browser: restore on-screen text
2016-12-31 17:40:08 -08:00
Erwin Coumans
c940f0ec47 update pybullet quickstart quide PDF
hook up the loadMJCF importing MuJoCo xml files in pybullet and shared memory API b3LoadMJCFCommandInit
2016-12-31 14:43:15 -08:00
erwin coumans
63d3374c00 Merge remote-tracking branch 'bp/master' 2016-12-31 11:36:30 -08:00
erwin coumans
c6650f9329 fix win32 UNICODE build
re-enable VR teleport
2016-12-31 11:35:56 -08:00
erwincoumans
7d7e2fdf77 Merge pull request #900 from erwincoumans/master
First step towards a MuJoCo MJCF importer for Bullet. It can load the…
2016-12-30 19:02:10 -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
erwincoumans
8efdd272b2 Merge pull request #899 from erwincoumans/master
pybullet: allow to connect to multiple physics servers, while maintai…
2016-12-28 22:51:40 -08:00
Erwin Coumans
7b9d194bfd fix compile issues 2016-12-28 22:38:48 -08:00
Erwin Coumans
d7d4fe5c45 fix compile issue (use constructor) 2016-12-28 22:24:03 -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
da2cc483b4 pybullet: allow to connect to multiple physics servers, while maintaining backwards compatibility. connect method returns an integer 'physicsClientId'. This can be passed as optional argument to each method (except for a few 'obsolete' ones. 2016-12-27 20:25:52 -08:00
erwincoumans
a5ecbbc682 Merge pull request #898 from erwincoumans/master
many pybullet / VR improvements
2016-12-27 15:57:17 -08:00
e655fead29 fix CMakeLists.txt for BasicDemoGui on WIN32 2016-12-27 15:12:25 -08:00