Commit Graph

300 Commits

Author SHA1 Message Date
Erwin Coumans
88897cc744 implement pybullet.changeTexture. For now, the width/height has to match the target texture unique id, otherwise crashes may happen (a check for width/height match will be added)
See also examples\pybullet\examples\changeTexture.py
2017-06-30 19:11:43 -07:00
Erwin Coumans
dd3d55610b fixes in pybullet.loadTexture, changeVisualShape replacing texture.
(also works for OpenGL3 renderer now)
2017-06-30 13:35:07 -07:00
Erwin Coumans
65e22ba3e9 allow auxilary link to be used for gear btMultiBodyGearConstraint. 2017-06-23 20:24:04 -07:00
Erwin Coumans
61f27a5c72 also add baseInertialFramePositionObj and baseInertialFrameOrientationObj to pybullet.createMultiBody
updated createMultiBodyLinks.py example.
2017-06-19 17:13:20 -07:00
Erwin Coumans
7441515c0e Preliminary version of pybullet.createMultiBody including links connected to parent by a joint.
See createMultiBodyLinks.py example.
2017-06-19 13:15:05 -07:00
Erwin Coumans
f3c11b6f31 add capsule, cylinder, plane, mesh support for pybullet.createCollisionShape
preparation to add links to pybullet.createMultiBody
2017-06-19 10:14:26 -07:00
Erwin Coumans
2e6f8c271e allow to disable/enable default keyboard shortcuts ('w', 'd' 's' etc) and default mouse picking
pybullet.getMouseEvents / b3RequestMouseEventsCommandInit
2017-06-17 13:29:14 -07:00
Erwin Coumans
23b155a2b4 add getAABB.py example.
fix getAABB / b3RequestCollisionInfoCommandInit to use less stack memory
2017-06-16 18:10:10 -07:00
Erwin Coumans
bb8cfe3c9a pybullet.getAABB and getAPIVersion
fix btMultiBody::getLinkCollider
bump up Bullet C-API version
2017-06-15 19:46:27 -07:00
Erwin Coumans
60e3887456 enable btGearConstraint, expose 'changeDynamics' for gearRatio, only works for maximalCoordinates rigid bodies.
See examples\pybullet\examples\mimicJointConstraint.py
2017-06-07 13:44:34 -07:00
Erwin Coumans
d08f3e5f91 expose pybullet non-contact erp, friction erp and frictionAnchor, b3PhysicsParamSetDefaultNonContactERP / b3PhysicsParamSetDefaultFrictionERP / b3ChangeDynamicsInfoSetFrictionAnchor 2017-06-07 09:37:28 -07:00
Erwin Coumans
0c3a3cc466 pybullet.changeDynamicsInfo/b3ChangeDynamicsInfoSetContactStiffnessAndDamping expose contactStiffness/contactDamping 2017-06-07 08:37:42 -07:00
Erwin Coumans
a7aed37632 work on pybullet/C-API createMultiBody (still preliminary, only sphere/box collision shapes, no links/hierarchies yet, soon)
pybullet/C-API, expose linear/angular damping
fix some warnings (param name needs to be same in .h and .cpp)
fix potential startup threading issue (args were deleted in main thread while still possibly use in child thread)
fix for spinning/rolling friction in case of mixing maximal and reduced coordinate btMultiBody+btRigidBody
2017-06-04 22:04:16 -07:00
Erwin Coumans
b23cb1dd2c pybullet.createCollisionShape, createVisualShape, createMultiBody, programmatic creation using ProgrammaticUrdfInterface
(still preliminary, not ready for commit yet, see examples\pybullet\examples\createSphereMultiBodies.py)
2017-06-03 10:57:56 -07:00
yunfeibai
bfcbb339cf Merge remote-tracking branch 'upstream/master' 2017-06-02 18:26:04 -07:00
yunfeibai
e2a9fc33dc Remove debug code. 2017-06-02 17:40:50 -07:00
yunfeibai
e97bb9d494 Add utility function to convert view matrix to camera yaw pitch roll. 2017-06-01 21:44:02 -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
87293e835c implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.
pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor
Bug fixes in b3ResourcePath::findResourcePath resolution.
add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium
minor fixes to obj2sdf
2017-06-01 12:32:44 -07:00
erwincoumans
4e03c36fa6 add pybullet.multiplyTransforms and pybullet.invertTransform
use btAssert instead of assert (glGetError is really slow)
shift default light-position a little bit, to make faces different color
2017-05-29 21:55:58 -07:00
Erwin Coumans
b645963879 expose pybullet changeDynamics(spinningFriction=..., rollingFriction=..., restitution=...)
Bullet C-API b3ChangeDynamicsInfoSetSpinningFriction/RollingFriction/Resitution
b3PhysicsParamSetRestitutionVelocityThreshold, / pybullet.setPhysicsEngineParameter restitutionVelocityThreshold:
if the velocity is below this threshhold, the restitution is zero (this prevents energy buildup at near-resting state)
pybullet restitution.py example.
2017-05-26 18:14:38 -07:00
Erwin Coumans
5e2599863d trackObject -> parentObject
trackLinkIndex -> parentLinkIndex
add example debugDrawItems.py
2017-05-24 09:06:15 -07:00
Erwin Coumans
db008ab3c2 Improve debug text/line rendering, can be use to draw frames and text in local coordinate of an object / link.
example:
kuka = p.loadURDF("kuka_iiwa/model.urdf")
p.getNumJoints(kuka)
pybullet.addUserDebugLine([0,0,0],[0,0,0.1],[0,0,1],trackObjectUniqueId=2,trackLinkIndex=6)
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],trackObjectUniqueId=2,trackLinkIndex=6)
Also allow to render text using a given orientation (instead of pointing to the camera), example:
pybullet.addUserDebugText("tip", [0,0,0.1],textColorRGB=[1,0,0],textOrientation=[0,0,0,1], trackObjectUniqueId=2,trackLinkIndex=6)
Add drawTexturedTriangleMesh, for drawing 3d text.
Expose readSingleInstanceTransformToCPU, to extract position/orientation from graphics index.
updateTexture: allow to not flip texels around up axis
2017-05-23 22:05:26 -07:00
Erwin Coumans
19295f2859 enable file caching, currently only for Wavefront .obj files. You can disable file caching using
pybullet.setPhysicsEngineParameter(enableFileCaching=0)
Allow VR camera tracking only using position tracking, no orientation tracking (use
pybullet.setVRCamera([posX,posY,posZ],trackObjectFlag=0 or pybullet.VR_CAMERA_TRACK_OBJECT_ORIENTATION)
2017-05-17 19:29:12 -07:00
Erwin Coumans
f80838e989 expose the changeVisualShape RGBA color for TinyRenderer, OpenGL3 renderer. 2017-05-13 09:18:36 -07:00
Erwin Coumans
53a82819a0 expose b3LoadMJCFCommandSetFlags / pybullet.pybullet_loadMJCF(fileName,flags=pybullet.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS) 2017-05-10 15:01:25 -07:00
yunfeibai
a587d4fec4 Use "change" instead of "reset" for changing dynamics info. 2017-05-09 10:44:33 -07:00
yunfeibai
98654a0cb4 Change dynamic to dynamics in dynamics info. 2017-05-09 10:31:28 -07:00
yunfeibai
5fe4c6bb5b Add API to get dynamic info. 2017-05-07 22:21:38 -07:00
Erwin Coumans
1f64a87abe Improve ChromeTraceUtil logging, allow filename to be specified.
Expose this ChromeTraceUtil  logging to C-API: start/statelogging and submitProfileTiming
pybullet.submitProfileTiming, and STATE_LOGGING_PROFILE_TIMINGS used in startStateLogging
added example for Python profileTiming.py and C++ b3RobotSimulatorClientAPI::submitProfileTiming
2017-05-04 17:51:40 -07:00
Erwin Coumans
a7d08ca9d7 Merge remote-tracking branch 'bp/master' 2017-05-04 10:51:42 -07:00
Erwin Coumans
a86f584824 more work towards removeBody for C-API/pybullet, work-in-progress. 2017-05-03 21:53:29 -07:00
yunfeibai
939d6ead32 Add API to reset lateral friction coefficient. 2017-05-03 21:47:53 -07:00
yunfeibai
c7e9a31898 Add API to get user constraint id. 2017-05-03 18:25:25 -07:00
yunfeibai
4da2c076a7 Add API to reset mass. 2017-05-01 22:18:54 -07:00
Erwin Coumans
bdf366b045 implement pybullet.getDebugVisualizerCamera, width, height, providing viewmatrix, projection matrix 2017-04-10 11:03:41 -07:00
Erwin Coumans
82b6bc8770 apply the deviceTypeFilter also to VR state logging. 2017-04-08 11:48:12 -07:00
Erwin Coumans
440d445a02 also report VR events for HMD and generic tracked devices. Also expose those VR events to pybullet: expose a deviceTypeFilter, that defaults to VR_DEVICE_CONTROLLER 2017-04-07 22:53:36 -07:00
erwincoumans
2e13531493 Merge pull request #1061 from erwincoumans/master
Implement rayTestBatch. At the moment, it is still testing individual…
2017-04-06 04:56:49 +00:00
Erwin Coumans
6cbb00fd6b Implement rayTestBatch. At the moment, it is still testing individual rays on the physics server. We can enable multi-threaded version later. At least the python + shared-memory IPC overhead will be much lower. 2017-04-05 15:21:26 -07:00
yunfeibai
b168f53ed9 Rename body index to body unique id. 2017-04-04 10:38:25 -07:00
yunfeibai
1e91e78469 Add pybullet API for logging contacts. 2017-04-02 16:03:20 -07:00
yunfeibai
0d83667817 Add C API to log contact points. 2017-04-02 15:45:48 -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
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
0a654c2d58 expose optional targetVelocity to pybullet.resetJointState
add C-API: b3CreatePoseCommandSetJointVelocities and b3CreatePoseCommandSetJointVelocity
2017-03-23 10:29:16 -07:00
erwincoumans
c7579d7b82 fix quadruped, allow user to pick the maximum number of dofs to log 2017-03-04 15:30:57 -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
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
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
37890e5a4d allow to enable/disable GUI, shadows, wireframe of OpenGL Visualizer from API
(pybullet.configureDebugVisualizer)
2017-02-21 17:36:54 -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
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
yunfeibai
ce9378f819 Add shared memory API and RobotSim API for setting joint damping in IK. 2017-02-03 11:08:44 -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
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
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
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
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
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
Erwin Coumans
826c5854a8 See also pybullet quickstart guide here: https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#
vrevent.py: add a Tiltbrush-style drawing example using pybullet
Expose getVREvents to pybullet / shared memory API, access to any VR controller state & state changes.
Improve performance of user debug lines (pybullet/shared memory API) by batching lines with same color/width
expose rayTest to pybullet/shared memory API (single ray for now)
add pybullet getMatrixFromQuaterion
2016-12-26 19:40:09 -08:00
yunfeibai
c253c750b9 Expose ambient, diffuse and specular coefficient of the light. 2016-12-06 15:21:35 -08:00
Erwin Coumans
15cda75130 add <restitution> in <contact> settings of URDF/SDF
allow 'useMaximalCoordinates' and 'useFixedBase' in pybullet.loadURDF.
enable split impulse for btRigidBody, even in btMultiBodyDynamicsWorld.
allow initialization of velocity and apply force for btRigidBody in pybullet/shared memory API.
process contact parameters in URDF also for btRigidBody (friction, restitution etc)
add pybullet.setPhysicsEngineParameter with numSolverIterations, useSplitImpulse etc.
2016-11-30 22:24:20 -08:00
yunfeibai
e8ff969a6f Merge remote-tracking branch 'upstream/master' 2016-11-29 14:17:38 -08:00
yunfeibai
0cb2b21b5f Add pybullet API for shadow. 2016-11-29 14:10:07 -08:00
yunfeibai
1fbd78ece5 Add shared memory API for setting shadow and light source distance. 2016-11-29 13:19:35 -08:00
Erwin Coumans
2d42c7963a add pybullet getBaseVelocity / resetBaseVelocity
C-API b3CreatePoseCommandSetBaseLinearVelocity/b3CreatePoseCommandSetBaseAngularVelocity
2016-11-28 15:11:34 -08:00
erwincoumans
0d5dcb3cc5 setDebugObjectColor 2016-11-21 07:42:11 -08:00
yunfeibai
93ba8af023 Add shared memory API to change light color. 2016-11-20 12:52:12 -08:00
erwincoumans
9ee1c4ec24 regular OR wireframe rendering, not both
add option to perform filtering of 'getClosestPoints' using linkA/linkB.
don't use 'realtimesimulation' as default
add/remove debug items within same thread
pybullet, report contact points and normal as [x,y,z] triplet/vector, not 3 scalars
separate 'getClosestPointsAlgorithm': box-box doesn't report closest points with positive distance, and the query shouldn't impact regular 'closesst points'
2016-11-19 17:13:56 -08:00
erwincoumans
8c69fa13ca add pybullet getCameraImage, replacing renderImage, cleaner API:
always pass in width, hight and viewMatrix, projectionMatrix, optionally lightDir
added helper methods computeViewMatrix, computeViewMatrixFromYawPitchRoll, computeProjectionMatrix, computeProjectionMatrixFOV
see Bullet/examples/pybullet/testrender.py + testrender_np.py for example use
add missing base_link.stl for husky.urdf
2016-11-17 15:15:52 -08:00
erwin coumans
c0fb98861d add quadruped.py script to load and initialize the a Minitaur-like quadruped
pybullet removeConstraint, createConstraint
rename b3CreateJoint to b3InitCreateUserConstraintCommand
add int b3GetStatusUserConstraintUniqueId(b3SharedMemoryStatusHandle statusHandle);
b3SharedMemoryCommandHandle  b3InitRemoveUserConstraintCommand(b3PhysicsClientHandle physClient, int userConstraintUniqueId);
2016-11-14 14:08:05 -08:00
Erwin Coumans
c521d816c6 add user debug line/text features in pybullet + shared memory API:
addUserDebugLine,
addUserDebugText
removeUserDebugItem
removeAllUserDebugItems
2016-11-14 07:39:34 -08:00
erwin coumans
7577c6d893 add pybullet loadBullet, saveBullet (work-in-progress) and placeholder for loadMJCF. 2016-11-11 18:07:42 -08:00
erwincoumans
0d47d61007 pybullet getClosestPoints 2016-11-09 21:01:04 -08:00
erwincoumans
ff2738db26 Merge remote-tracking branch 'bp/master' 2016-11-04 13:16:55 -07:00
erwincoumans
e35129ceaf Merge branch 'master' of https://github.com/erwincoumans/bullet3 2016-11-04 13:16:30 -07: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
yunfeibai
3c37db0804 Add API to set bunny properties. Add example to show coupling between softbody and multibody. 2016-11-01 16:45:10 -07:00
erwincoumans
f01389ded2 Merge pull request #842 from erwincoumans/master
added b3PhysicsParamSetInternalSimFlags command, and pybullet setInte…
2016-10-23 08:26:52 -07:00
erwincoumans
c2ca88bf44 added b3PhysicsParamSetInternalSimFlags command, and pybullet setInternalSimFlags API.
//Use at own risk: magic things may or my not happen when calling this API.

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

Add optional command-line parameter for App_PhysicsServerVR, --norobotassets, to start with an empty world, no assets in VR (no gripper, no kuka)
2016-10-23 07:14:50 -07:00
yunfeibai
3d79961725 Add API to change texture with object id and link index. 2016-10-21 11:55:27 -07:00
yunfeibai
4911b14271 Add loading texture API. 2016-10-20 23:40:30 -07:00
yunfeibai
6ef96a4027 Add programmatic render API and a basic test. 2016-10-20 10:56:44 -07:00
erwin coumans
eda400d14c Merge remote-tracking branch 'bp/master' 2016-10-19 07:43:46 -07:00
erwin coumans
f97cb7002d first version of 'getVisualShapeData' to get visual shape information to allow external renderer with pybullet and shared memory robotics API
b3InitRequestVisualShapeInformation/b3GetVisualShapeInformation in shared memory API
2016-10-18 22:05:28 -07:00
yunfeibai
3ffd95fbab Merge remote-tracking branch 'origin/master' 2016-10-17 13:20:31 -07:00
yunfeibai
b07df4d504 Load bunny through shared memory API and RobotSimAPI. Create grasp bunny example. 2016-10-17 13:01:04 -07:00
erwincoumans
33d9603e16 Add rudimentary 'saveWorld' command in shared memory API and pybullet, see examples/pybullet/saveWorld.py
Use trilinear filtering instead of bilinear
2016-10-12 23:03:36 -07:00
erwin coumans
d59b0f05a4 expose b3PhysicsParamSetNumSolverIterations
split Visual Studio project generation batch file in regular and VR+pybullet+double precision build.
disable KUKA iiwa joint limit hack
2016-10-05 16:31:48 -07:00
yunfeibai
7e8d8b0488 Expose rest pose for null space task to API. 2016-09-30 01:03:40 -07:00
yunfeibai
fd3cb061cb Expose IK with null space task to shared memory API and RobotSimAPI. 2016-09-30 00:05:00 -07:00
erwin coumans
b81eb79ef5 ping-pong back/forward in PGS solving iterations to reduce bias in constraint order
add experimental rhs clamp in btMultiBodyJointMotor to control maximum error resolution.
2016-09-28 11:17:11 -07:00
erwin coumans
0936ae6600 expose getNumBodies, getBodyUniqueId, getBodyInfo (char* baseName) to shared memory API and pybullet., making it easier to serialize the state of the world. 2016-09-27 12:13:45 -07:00
erwin coumans
310a330572 fix InverseKinematics+API for a case without tree (custom build Jacobian) 2016-09-22 13:27:09 -07:00
yunfeibai
bf16c87987 Add orientation constraint to IK. 2016-09-19 17:04:05 -07:00
Erwin Coumans
5e09b17baf experimental Inverse Kinematics for KUKA iiwa exposed in
shared memory api and pybullet. Will be extended for arbitrary bodies
and with target orientation (besides target position)
2016-09-13 23:37:46 +01:00
yunfeibai
c952c50ad9 Merge remote-tracking branch 'upstream/master' 2016-09-11 04:11:51 -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
yunfeibai
f635c64205 Expose Jacobian computation to RobotSimAPI. 2016-09-07 17:37:38 -07:00
yunfeibai
c198029cb9 Expose body Jacobian in shared memory API. 2016-09-07 16:00:38 -07:00
erwincoumans
85fd7f560c add first draft of contact point query in shared memory API
b3SharedMemoryCommandHandle b3InitRequestContactPointInformation(b3PhysicsClientHandle physClient);
void b3SetContactFilterBodyA(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueIdA);
void b3SetContactFilterBodyB(b3SharedMemoryCommandHandle commandHandle, int bodyUniqueIdB);
void b3GetContactPointInformation(b3PhysicsClientHandle physClient, struct b3ContactInformation* contactPointData);
Implemented for PhysicsClientSharedMemory, not for PhysicsDirect yet.
Add btCollisionObject::setUserIndex2
2016-09-01 13:30:07 -07:00
yunfeibai
758ca025d5 Set physics clock subdivider. 2016-08-24 14:25:06 -07:00
yunfeibai
3b25489d89 Further fix for integration test. 2016-08-24 12:44:24 -07:00
yunfeibai
ecbf94abaa Fix issues in build test. 2016-08-24 11:31:08 -07:00
yunfeibai
d46710e447 Expose fixed constraint in RobotSimAPI. 2016-08-22 18:14:29 -07:00
yunfeibai
591f922d97 Support loading Urdf as btRigidBody with RobotSimAPI. Loading Sdf as btRigidBody is work in progress. 2016-08-16 17:56:30 -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
Erwin Coumans
b880ddf76b add pybullet render API with yaw/pitch/roll option
add testrender.py file
allow option to enable OpenGL hardware renderer in multithreaded sim

b3RequestCameraImageSelectRenderer(commandHandle,ER_BULLET_HARDWARE_OPENGL);
2016-08-08 14:23:44 -07:00
Erwin Coumans
f304fd7611 add one more pybullet renderImage API and testrender.py example
tweak Bullet Inverse Dynamics, work-around compiler issue
2016-08-02 11:12:23 -07:00
Mat Kelcey
51ec707230 fix GetJointInfo to use a param called jointIndex (not linkIndex) for naming consistency 2016-07-20 11:01:02 -07:00
erwin coumans
c28cd03fbd OpenVR controller can pick/drag objects. Instructions, Windows only:
Compile using premake+visual studio, and compile App_SharedMemoryPhysics_VR
Compile pybullet using cmake using cmake -DBUILD_PYBULLET=OFF -DCMAKE_BUILD_TYPE=Release ..
Create a symbolic link from c:\python\dlls\pybullet.pyd to C:\develop\bullet3\cmp\lib\Release\pybullet.dll
App_SharedMemoryPhysics_VR
Run Python. Here are some Python lines to get going:
import pybullet as p
p.connect(p.SHARED_MEMORY)
p.loadURDF("cube.urdf")
p.setGravity(0,0,-10)
p.setRealTimeSimulation(1)

Allow real-time simulation in physics server, add pybullet command setRealTimeSimulation to control it
Mesh decimation (reduce number of triangles/vertices) using a Blender modifier for Kuka IIWA and Husky
Disabled the 'glFlush' commands in GLInstancingRenderer.
Add VR controller methods to examples\CommonInterfaces\CommonExampleInterface.h
Use the ANSI version in Windows file/string operations instead of unicode, hope this doesn't break builds.
2016-07-17 23:50:11 -07:00
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
Erwin Coumans
10cc6f14cb add option to use hardware OpenGL renderer for synthetic camera 2016-07-12 18:16:13 -07:00
Mat Kelcey
54979a0f89 pybullet renderimage with projection matrix calculated using field of view 2016-07-08 15:47:50 -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
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
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
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
95a09bec99 implement getJointInfo for objects loaded through SDF 2016-06-15 18:01:41 -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
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
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
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
606f78da43 work-in-progress tinyrenderer -> shared memory API synthetic camera image 2016-05-17 23:57:19 -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
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
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
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
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
=
4df58c35c7 use const in PhysicsClientC_Api, thanks to Roland
fix some warnings for Clang, thanks to Aaron
2015-10-15 08:15:22 -07:00
erwin coumans
a0e507280c Implement CMD_INIT_POSE to set base position, base orientation and joint position (angle).
See PhysicsClientExample for example use of CMD_INIT_POSE.
Change: CMD_INIT_POSE uses m_initPoseArgs and not m_sendDesiredStateCommandArgument
2015-10-13 22:23:28 -07:00
erwin coumans
4a29986662 initial support for multiple robots in shared memory API 2015-10-13 11:32:25 -07:00
=
5e4badc099 make PhysicsClient an interface class, and move shared memory implementation
of physics client into PhysicsClientSharedMemory class/file.
This will allow implementation of UDP and other transport protocols to a physics server.
2015-09-24 22:50:34 -07:00
=
e05825f639 improvements to the shared memory physics API:
support picking in C API etc.
2015-09-24 22:42:22 -07:00
=
23bdd0ed36 more work on physics client c-api over shared memory 2015-09-17 09:37:44 -07:00
=
003a42478b another step closer to useable shared memory C API
(force/torque sensor needs new API)
in a nutshell, users of shared memory physics API should not
directly poke into shared memory, not fill 'SharedMemorCommand'
nor read SharedMemoryStatus directly. The C-API declares 'handles' for those,
to avoid it from happening.
2015-09-16 23:09:10 -07:00
erwin coumans
f75df90d82 Allow batches of debug lines. The PhysicsClientExample rendering is still slow (one line at a time, instead of batches)
Prepare for IMU sensor in Shared Memory Server
2015-09-03 14:18:22 -07:00
Erwin Coumans (Google)
3d130d9d66 reset simulation in test/SharedMemory/test for proper cleanup,
and it can restart without shutting down/restarting physics server
w
2015-08-27 17:51:31 -07:00
=
46fae61c69 fixes in shared memory:
only allow server to create and initialize shared memory,
client will report failure
intercept signals to cleanup shared memory in standalone app, thanks to
Roland Philippsen.
2015-08-06 11:59:31 -07:00
=
eb6663ed4b further work on shared memory API
fix dependency of BulletDynamics to Bullet3Common (b3Printf)
2015-08-02 14:00:43 -07:00
erwincoumans
19c5be5646 small progress towards shared memory C-api and test.c. 2015-07-30 23:22:44 -07:00
Erwin Coumans
812c67e221 fix various warnings, more work on shared memory API 2015-07-22 18:06:05 -07:00