diff --git a/data/gripper/wsg50_one_motor_gripper_new.sdf b/data/gripper/wsg50_one_motor_gripper_new.sdf new file mode 100644 index 000000000..a3a11f3b2 --- /dev/null +++ b/data/gripper/wsg50_one_motor_gripper_new.sdf @@ -0,0 +1,386 @@ + + + + + 0 0 0.26 3.14 0 0 + + + + + + world + base_link + + 0 0 1 + + -0.5 + 10 + 1 + 1 + + + 0 + 0 + 0 + 0 + + + + + + 0 0 0 0 0 0 + + 0 0 0 0 0 0 + 1.2 + + 1 + 0 + 0 + 1 + 0 + 1 + + + + + 0 0 0 0 -0 0 + + + 1 1 1 + meshes/WSG50_110.stl + + + + + + + + + + + 0 0 0.03 0 0 0 + + 0 0 0 0 0 0 + 0.1 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + 0 0 0.01 0 0 0 + + + 0.02 0.02 0.02 + + + + + + + motor + base_link + + 0 0 1 + + -0.055 + 0.001 + 10.0 + 10.0 + + + 0 + 0 + 0 + 0 + + + + + + 0 0 0.04 0 0 0 + + 0 0 0.035 0 0 0 + 0.1 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + -0.03 0 0.01 0 -1.2 0 + + + 0.02 0.02 0.07 + + + + + + + left_hinge + motor + + 0 1 0 + + -20.0 + 20.0 + 10 + 10 + + + 0 + 0 + 0 + 0 + + 0 + + + + + 0 0 0.04 0 0 0 + + 0 0 0.035 0 0 0 + 0.1 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + 0.03 0 0.01 0 1.2 0 + + + 0.02 0.02 0.07 + + + + + + + right_hinge + motor + + 0 1 0 + + -20.0 + 20.0 + 10 + 10 + + + 0 + 0 + 0 + 0 + + 0 + + + + + -0.055 0 0.06 0 -0 0 + + 0 0 0.0115 0 -0 0 + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 -0.06 0 0 0 + + + 0.001 0.001 0.001 + meshes/GUIDE_WSG50_110.stl + + + + + 0 0 -0.037 0 0 0 + + + 0.001 0.001 0.001 + meshes/WSG-FMF.stl + + + + + + + + gripper_left + base_link + + 1 0 0 + + -0.01 + 0.05 + 1 + 1 + + + 0 + 0 + 0 + 0 + + + + + + 0.055 0 0.06 0 0 3.14159 + + 0 0 0.0115 0 -0 0 + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 -0.06 0 0 0 + + + 0.001 0.001 0.001 + meshes/GUIDE_WSG50_110.stl + + + + + 0 0 -0.037 0 0 0 + + + 0.001 0.001 0.001 + meshes/WSG-FMF.stl + + + + + + + gripper_right + base_link + + 1 0 0 + + -0.01 + 0.05 + 1 + 1 + + + 0 + 0 + 0 + 0 + + + + + + 0.062 0 0.145 0 0 1.5708 + + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 0.042 0 0 0 + + + 0.02 0.02 0.15 + + + + + + + 0 0 0 0 0 0 + + + 1 1 1 + meshes/l_gripper_tip_scaled.stl + + + + + + + gripper_right + finger_right + + + + -0.062 0 0.145 0 0 4.71239 + + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 0.042 0 0 0 + + + 0.02 0.02 0.15 + + + + + + + 0 0 0 0 0 0 + + + 1 1 1 + meshes/l_gripper_tip_scaled.stl + + + + + + + gripper_left + finger_left + + + + \ No newline at end of file diff --git a/data/gripper/wsg50_one_motor_gripper_new_free_base.sdf b/data/gripper/wsg50_one_motor_gripper_new_free_base.sdf new file mode 100644 index 000000000..190e591a3 --- /dev/null +++ b/data/gripper/wsg50_one_motor_gripper_new_free_base.sdf @@ -0,0 +1,383 @@ + + + + + 0 -2.3 2.1 0 0 0 + + 0 0 0 0 0 0 + + 0 0 0 0 0 0 + 0.1 + + 1 + 0 + 0 + 1 + 0 + 1 + + + + + + world + base_link + + + + 0 0 0 0 0 0 + + 0 0 0 0 0 0 + 1.2 + + 1 + 0 + 0 + 1 + 0 + 1 + + + + + 0 0 0 0 -0 0 + + + 1 1 1 + meshes/WSG50_110.stl + + + + + + + + + + + 0 0 0.03 0 0 0 + + 0 0 0 0 0 0 + 0.1 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + 0 0 0.01 0 0 0 + + + 0.02 0.02 0.02 + + + + + + + motor + base_link + + 0 0 1 + + -0.055 + 0.001 + 10.0 + 10.0 + + + 0 + 0 + 0 + 0 + + + + + + 0 0 0.04 0 0 0 + + 0 0 0.035 0 0 0 + 0.1 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + -0.03 0 0.01 0 -1.2 0 + + + 0.02 0.02 0.07 + + + + + + + left_hinge + motor + + 0 1 0 + + -20.0 + 20.0 + 10 + 10 + + + 0 + 0 + 0 + 0 + + 0 + + + + + 0 0 0.04 0 0 0 + + 0 0 0.035 0 0 0 + 0.1 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + 0.03 0 0.01 0 1.2 0 + + + 0.02 0.02 0.07 + + + + + + + right_hinge + motor + + 0 1 0 + + -20.0 + 20.0 + 10 + 10 + + + 0 + 0 + 0 + 0 + + 0 + + + + + -0.055 0 0.06 0 -0 0 + + 0 0 0.0115 0 -0 0 + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 -0.06 0 0 0 + + + 0.001 0.001 0.001 + meshes/GUIDE_WSG50_110.stl + + + + + 0 0 -0.037 0 0 0 + + + 0.001 0.001 0.001 + meshes/WSG-FMF.stl + + + + + + + + gripper_left + base_link + + 1 0 0 + + -0.01 + 0.05 + 1 + 1 + + + 0 + 0 + 0 + 0 + + + + + + 0.055 0 0.06 0 0 3.14159 + + 0 0 0.0115 0 -0 0 + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 -0.06 0 0 0 + + + 0.001 0.001 0.001 + meshes/GUIDE_WSG50_110.stl + + + + + 0 0 -0.037 0 0 0 + + + 0.001 0.001 0.001 + meshes/WSG-FMF.stl + + + + + + + gripper_right + base_link + + 1 0 0 + + -0.01 + 0.05 + 1 + 1 + + + 0 + 0 + 0 + 0 + + + + + + 0.062 0 0.145 0 0 1.5708 + + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 0.042 0 0 0 + + + 0.02 0.02 0.15 + + + + + + + 0 0 0 0 0 0 + + + 1 1 1 + meshes/l_gripper_tip_scaled.stl + + + + + + + gripper_right + finger_right + + + + -0.062 0 0.145 0 0 4.71239 + + 0.2 + + 0.1 + 0 + 0 + 0.1 + 0 + 0.1 + + + + + 0 0 0.042 0 0 0 + + + 0.02 0.02 0.15 + + + + + + + 0 0 0 0 0 0 + + + 1 1 1 + meshes/l_gripper_tip_scaled.stl + + + + + + + gripper_left + finger_left + + + + \ No newline at end of file diff --git a/examples/RoboticsLearning/GripperGraspExample.cpp b/examples/RoboticsLearning/GripperGraspExample.cpp index 7aa2f2571..b46706e65 100644 --- a/examples/RoboticsLearning/GripperGraspExample.cpp +++ b/examples/RoboticsLearning/GripperGraspExample.cpp @@ -235,7 +235,7 @@ public: { b3RobotSimLoadFileArgs args(""); b3RobotSimLoadFileResults results; - args.m_fileName = "cube_small.urdf"; + args.m_fileName = "sphere_small.urdf"; args.m_startPosition.setValue(0, 0, .107); args.m_startOrientation.setEulerZYX(0, 0, 0); args.m_useMultiBody = true; @@ -244,7 +244,7 @@ public: { b3RobotSimLoadFileArgs args(""); - args.m_fileName = "gripper/wsg50_one_motor_gripper.sdf"; + args.m_fileName = "gripper/wsg50_one_motor_gripper_new.sdf"; args.m_fileType = B3_SDF_FILE; args.m_useMultiBody = true; b3RobotSimLoadFileResults results; @@ -287,6 +287,7 @@ public: } m_robotSim.setGravity(b3MakeVector3(0,0,-10)); + /* b3JointInfo sliderJoint1; sliderJoint1.m_parentFrame[0] = 0; sliderJoint1.m_parentFrame[1] = 0; @@ -327,6 +328,47 @@ public: sliderJoint2.m_jointType = ePrismaticType; m_robotSim.createJoint(1, 0, 1, 3, &sliderJoint1); m_robotSim.createJoint(1, 0, 1, 6, &sliderJoint2); + */ + b3JointInfo revoluteJoint1; + revoluteJoint1.m_parentFrame[0] = -0.055; + revoluteJoint1.m_parentFrame[1] = 0; + revoluteJoint1.m_parentFrame[2] = 0.02; + revoluteJoint1.m_parentFrame[3] = 0; + revoluteJoint1.m_parentFrame[4] = 0; + revoluteJoint1.m_parentFrame[5] = 0; + revoluteJoint1.m_parentFrame[6] = 1.0; + revoluteJoint1.m_childFrame[0] = 0; + revoluteJoint1.m_childFrame[1] = 0; + revoluteJoint1.m_childFrame[2] = 0; + revoluteJoint1.m_childFrame[3] = 0; + revoluteJoint1.m_childFrame[4] = 0; + revoluteJoint1.m_childFrame[5] = 0; + revoluteJoint1.m_childFrame[6] = 1.0; + revoluteJoint1.m_jointAxis[0] = 1.0; + revoluteJoint1.m_jointAxis[1] = 0.0; + revoluteJoint1.m_jointAxis[2] = 0.0; + revoluteJoint1.m_jointType = ePoint2PointType; + b3JointInfo revoluteJoint2; + revoluteJoint2.m_parentFrame[0] = 0.055; + revoluteJoint2.m_parentFrame[1] = 0; + revoluteJoint2.m_parentFrame[2] = 0.02; + revoluteJoint2.m_parentFrame[3] = 0; + revoluteJoint2.m_parentFrame[4] = 0; + revoluteJoint2.m_parentFrame[5] = 0; + revoluteJoint2.m_parentFrame[6] = 1.0; + revoluteJoint2.m_childFrame[0] = 0; + revoluteJoint2.m_childFrame[1] = 0; + revoluteJoint2.m_childFrame[2] = 0; + revoluteJoint2.m_childFrame[3] = 0; + revoluteJoint2.m_childFrame[4] = 0; + revoluteJoint2.m_childFrame[5] = 0; + revoluteJoint2.m_childFrame[6] = 1.0; + revoluteJoint2.m_jointAxis[0] = 1.0; + revoluteJoint2.m_jointAxis[1] = 0.0; + revoluteJoint2.m_jointAxis[2] = 0.0; + revoluteJoint2.m_jointType = ePoint2PointType; + m_robotSim.createJoint(1, 2, 1, 4, &revoluteJoint1); + m_robotSim.createJoint(1, 3, 1, 6, &revoluteJoint2); } } @@ -372,6 +414,7 @@ public: } } + m_robotSim.stepSimulation(); } virtual void renderScene()