From 6695268fbaa5f987d2c44bf43f988c3749ea3820 Mon Sep 17 00:00:00 2001 From: yunfeibai Date: Mon, 20 Mar 2017 09:52:24 -0700 Subject: [PATCH 1/2] Fix the issue with indentation in pr2 setup. --- examples/pybullet/vr_kuka_pr2_move.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/examples/pybullet/vr_kuka_pr2_move.py b/examples/pybullet/vr_kuka_pr2_move.py index 22e5730c1..53dbe844d 100644 --- a/examples/pybullet/vr_kuka_pr2_move.py +++ b/examples/pybullet/vr_kuka_pr2_move.py @@ -15,14 +15,8 @@ BUTTONS=6 gripper_max_joint = 0.550569 while True: events = p.getVREvents() - - for e in (events): - if e[CONTROLLER_ID] == 3: # To make sure we only get the value for one of the remotes - p.changeConstraint(pr2_cid, e[POSITION], e[ORIENTATION], maxForce=500) - p.setJointMotorControl2(pr2_gripper, 0, controlMode=p.POSITION_CONTROL, - targetPosition=gripper_max_joint - e[ANALOG] * gripper_max_joint, - force=1.0) - p.setJointMotorControl2(pr2_gripper, 2, controlMode=p.POSITION_CONTROL, - targetPosition=gripper_max_joint - e[ANALOG] * gripper_max_joint, - force=1.1) - \ No newline at end of file + for e in (events): + if e[CONTROLLER_ID] == 3: # To make sure we only get the value for one of the remotes + p.changeConstraint(pr2_cid, e[POSITION], e[ORIENTATION], maxForce=500) + p.setJointMotorControl2(pr2_gripper, 0, controlMode=p.POSITION_CONTROL,targetPosition=gripper_max_joint - e[ANALOG] * gripper_max_joint,force=1.0) + p.setJointMotorControl2(pr2_gripper, 2, controlMode=p.POSITION_CONTROL,targetPosition=gripper_max_joint - e[ANALOG] * gripper_max_joint,force=1.1) \ No newline at end of file From 753f1d3d2f447ba2435edbf677fb1e4e04338d23 Mon Sep 17 00:00:00 2001 From: yunfeibai Date: Mon, 20 Mar 2017 10:16:15 -0700 Subject: [PATCH 2/2] Add lateral and spinning friction coefficients to gripper sdf model. --- data/gripper/wsg50_with_r2d2_gripper.sdf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/gripper/wsg50_with_r2d2_gripper.sdf b/data/gripper/wsg50_with_r2d2_gripper.sdf index b022faf00..d67959f19 100644 --- a/data/gripper/wsg50_with_r2d2_gripper.sdf +++ b/data/gripper/wsg50_with_r2d2_gripper.sdf @@ -215,6 +215,10 @@ + + 1.0 + 1.5 + 0.062 0 0.145 0 0 1.5708 0.2 @@ -255,6 +259,10 @@ + + 1.0 + 1.5 + -0.062 0 0.145 0 0 4.71239 0.2