Commit Graph

73 Commits

Author SHA1 Message Date
erwincoumans
666c8f47b7 Merge pull request #800 from bulletphysics/iktest
Iktest
2016-09-23 07:40:09 -07:00
erwincoumans
b6bb937dc0 URDF: don't parse joint limit for continuous joints
tweak KUKA iiwa inverse kinematics test in physics server
2016-09-22 23:21:24 -07:00
erwin coumans
e356f4f1f6 add test end-effector for Kuka iiwa (IK) 2016-09-22 19:48:26 -07:00
erwin coumans
310a330572 fix InverseKinematics+API for a case without tree (custom build Jacobian) 2016-09-22 13:27:09 -07:00
erwincoumans
46b32f17bb Add small sphere, make teddy small too
Add physics time scale in VR mode
Fix compound collision margin in physics server
Enable visuals for rigid body (non-multi-body) URDF/SDF loading in physics server.
2016-09-22 08:50:28 -07:00
yunfeibai
27fab2adb5 Create a demo for one motor gripper grasp. 2016-09-21 12:08:03 -07:00
erwincoumans
b8541cf721 Merge pull request #796 from erwincoumans/master
decrease some gjk/epa tolerance to improve collision detection using …
2016-09-20 17:51:49 -07:00
erwincoumans
cca2236f1a Merge pull request #795 from YunfeiBai/master
Inverse kinematics with orientation constraint.
2016-09-20 17:49:35 -07:00
erwin coumans
0a628f06cc decrease some gjk/epa tolerance to improve collision detection using very small collision margins (0.001/1mm)
tweak pr2 gripper.
2016-09-20 12:37:13 -07:00
yunfeibai
bf16c87987 Add orientation constraint to IK. 2016-09-19 17:04:05 -07:00
erwin coumans
3eb149ca75 Merge branch 'master' of https://github.com/erwincoumans/bullet3
# Conflicts:
#	examples/SharedMemory/PhysicsServerCommandProcessor.cpp
2016-09-19 14:33:55 -07:00
erwin coumans
a3aa8ef7f1 tune gripper parameters for VR demo 2016-09-19 14:31:47 -07:00
Erwin Coumans
e488c72496 fix build issue 2016-09-19 10:19:51 -07:00
erwin coumans
db3122233f remove that odd triangle in the origin of samurai castle (VR)
add rolling/spinning friction to cube, remove it from plane/samurai.urdf
URDF2Bullet: support joint limits for revolute and prismatic, only if defined (if upper < lower, disable limit)
add some profiling markers to improve performance
2016-09-19 07:02:43 -07:00
Erwin Coumans
567b003654 separate spinning and rolling friction coefficients, exposed in URDF as spinning_friction / m_rolling_friction
improvements in VR demo, add grasper etc.
2016-09-16 00:57:00 +01:00
Erwin Coumans
4d6a95017e default contact erp (m_erp2) was too low in physics server
causing gripper to penetrate box
2016-09-15 23:11:27 +01: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
erwincoumans
e5a8eb2425 rolling friction -> combine using rolling*normal friction, add for both objects.
rolling friction -> only along the normal, until we have separate rolling friction coefficients on normal and non-normal directions
Don't teleport with grasping controller (VR)
Tune VR grasping a bit.
2016-09-12 19:10:20 +01:00
yunfeibai
c952c50ad9 Merge remote-tracking branch 'upstream/master' 2016-09-11 04:11:51 -07:00
erwin coumans
c5d775a635 disable real-time by default 2016-09-09 14:41:23 -07:00
erwin coumans
3c706306cd add experimental pr2-gripper support in VR physics server
add setErp to btMultiBodyJointMotor
2016-09-09 14:30:37 -07:00
erwin coumans
f72982306e fix issues with VR physics server 2016-09-09 11:28:38 -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
Erwin Coumans
e98fca1e5e implement pybullet.getContactPointData(), two optional object unique ids as filter
returns a pylist of contact points. Each point has the following data:

	0     int m_contactFlags;//unused for now
         1     int m_bodyUniqueIdA;
         2     int m_bodyUniqueIdB;
         3     int m_linkIndexA;
         4     int m_linkIndexB;
         5-6-7     double m_positionOnAInWS[3];//contact point location on object A, in world space coordinates
         8-9-10     double m_positionOnBInWS[3];//contact point location on object A, in world space coordinates
         11-12-13     double m_contactNormalOnBInWS[3];//the separating contact normal, pointing from object B towards object A
         14     double m_contactDistance;//negative number is penetration, positive is distance.

         15    double m_normalForce;
2016-09-01 18:28:39 -07:00
erwincoumans
fe46ee8adf Merge branch 'master' of https://github.com/erwincoumans/bullet3
Conflicts:
	examples/SharedMemory/PhysicsServerCommandProcessor.cpp
2016-09-01 13:32:07 -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
Jeffrey Bingham
1c65cae6d0 [SharedMemory] Calculate inverse dynamics now uses world gravity.
Small change that takes the world gravity and applies it to the
body during the call to inverse dynamics in the shared memory
interface. Otherwise the gravity vector is left at the default
value and there is currently no interface to set the gravity
for the inverse dynamics system.
2016-09-01 10:46:34 -07:00
Logan Su
f86ce4d44b Add flags to load inertia values from URDF. 2016-08-29 15:09:18 -07:00
erwin coumans
4094b9f0df Disable 'm_robotSim.setNumSimulationSubSteps' because it is not needed at the moment
Fix issue in contact/friction between btMultibody and btRigidBody (external force/torque of btRigidBody was not taken into account during contact/friction setup)
Allow 0.1 mm slop in contact, to avoid loosing contact. Todo: allow contacts with positive distance in multibody solver.
2016-08-27 13:44:18 -07:00
yunfeibai
5b9b5178f9 Expose slider constraint in RobotSimAPI. 2016-08-26 10:35:10 -07:00
yunfeibai
758ca025d5 Set physics clock subdivider. 2016-08-24 14:25:06 -07:00
yunfeibai
d46710e447 Expose fixed constraint in RobotSimAPI. 2016-08-22 18:14:29 -07:00
erwin coumans
a68c9ca845 avoid MT crash in VR/physics server due to printf from separate thread.
add fps display in VR
use 1./240. internal substep for real-time physics sim in VR/physics server for more accurate robotics sim.
2016-08-18 21:43:43 -07:00
Erwin Coumans
91839cb274 revert change of default position control in shared memory api/pybullet 2016-08-18 16:48:14 -07:00
erwin coumans
2c636b52f7 bugfix: in torque control mode, torque index starts at 6. 2016-08-18 15:36:18 -07:00
erwin coumans
5b0253ed47 Remove undesired assert, it makes pybullet mistakes fail in c++
Shared memory api/pybullet: by default, set joint motors in position PD mode with target 0, to maintain 0 joint angle.
pybullet: allow setJointControlMode(body, link, POSITION_CONTROL,targetPos etc.
2016-08-18 13:10:28 -07:00
Erwin Coumans
17c16ccfa0 pybullet, deal with overflow of joints (maximum of 128 joints/links per multibody at the moment)
increase from 64 to 128 joints in shared memory API/pybullet
fix potential issue in tinyrenderer, related to missing segmentation mask buffer
report error if CMD_REQUEST_ACTUAL_STATE command on a multibody that exceed the number of links,
todo: stream data to allow arbitrary large number of links in shared memory API
2016-08-17 19:35:52 -07:00
Erwin Coumans
7c9441c3f5 by default, have a strong force keep the robot together, instead of floppy joints. 2016-08-17 10:30:50 -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
yunfeibai
4bc31394a0 Allow choosing loaded as btRigidBody with RobotSimAPI. 2016-08-16 16:57:48 -07:00
Erwin Coumans
3c30e2f821 add segmentation mask rendering to TinyRenderer and shared memory API
similar to the zbuffer, but storing the object index (int) instead of float depth
2016-08-11 14:55: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
93db3d7ba6 fix CMD_INIT_POSE+INIT_POSE_HAS_INITIAL_ORIENTATION,
setWorldToBaseRot takes inverse orientation (need to remove that API!)
2016-08-02 09:30:33 -07:00
Erwin Coumans
a6216f4f24 add robotics learning grasp contact example
add wsg50 gripper with modified r2d2 gripper tip
expose a fudge factor to scale inertia, to make grasping more stable
(until we have better grasping contact model/implementation)
2016-07-25 11:48:44 -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
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
589fa376b3 only add compound child shapes to 'allocated' list once 2016-07-16 17:58:06 -07:00
Erwin Coumans
10cc6f14cb add option to use hardware OpenGL renderer for synthetic camera 2016-07-12 18:16:13 -07:00