This commit is contained in:
Erwin Coumans 2019-12-04 15:49:30 -08:00
commit 91328f9280
28 changed files with 74259 additions and 15915 deletions

View File

@ -1,10 +1,13 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl None
Ns 0
newmtl None.003
Ns 0.000000
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
Kd 0.800000 0.800000 0.800000
Ks 0.800000 0.800000 0.800000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -3,108 +3,95 @@ import time
p.connect(p.GUI)
plane = p.loadURDF("plane.urdf")
p.setGravity(0, 0, -9.8)
p.setTimeStep(1. / 500)
p.setGravity(0,0,-9.8)
p.setTimeStep(1./500)
#p.setDefaultContactERP(0)
#urdfFlags = p.URDF_USE_SELF_COLLISION+p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS
#urdfFlags = p.URDF_USE_SELF_COLLISION+p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS
urdfFlags = p.URDF_USE_SELF_COLLISION
quadruped = p.loadURDF("laikago.urdf", [0, 0, .5], [0, 0.5, 0.5, 0],
flags=urdfFlags,
useFixedBase=False)
quadruped = p.loadURDF("laikago_toes.urdf",[0,0,.5],[0,0.5,0.5,0], flags = urdfFlags,useFixedBase=False)
#enable collision between lower legs
for j in range(p.getNumJoints(quadruped)):
print(p.getJointInfo(quadruped, j))
for j in range (p.getNumJoints(quadruped)):
print(p.getJointInfo(quadruped,j))
#2,5,8 and 11 are the lower legs
lower_legs = [2, 5, 8, 11]
lower_legs = [2,5,8,11]
for l0 in lower_legs:
for l1 in lower_legs:
if (l1 > l0):
enableCollision = 1
print("collision for pair", l0, l1,
p.getJointInfo(quadruped, l0)[12],
p.getJointInfo(quadruped, l1)[12], "enabled=", enableCollision)
p.setCollisionFilterPair(quadruped, quadruped, 2, 5, enableCollision)
for l1 in lower_legs:
if (l1>l0):
enableCollision = 1
print("collision for pair",l0,l1, p.getJointInfo(quadruped,l0)[12],p.getJointInfo(quadruped,l1)[12], "enabled=",enableCollision)
p.setCollisionFilterPair(quadruped, quadruped, 2,5,enableCollision)
jointIds = []
paramIds = []
jointOffsets = []
jointDirections = [-1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1]
jointAngles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
jointIds=[]
paramIds=[]
jointOffsets=[]
jointDirections=[-1,1,1,1,1,1,-1,1,1,1,1,1]
jointAngles=[0,0,0,0,0,0,0,0,0,0,0,0]
for i in range(4):
jointOffsets.append(0)
jointOffsets.append(-0.7)
jointOffsets.append(0.7)
for i in range (4):
jointOffsets.append(0)
jointOffsets.append(-0.7)
jointOffsets.append(0.7)
maxForceId = p.addUserDebugParameter("maxForce", 0, 100, 20)
maxForceId = p.addUserDebugParameter("maxForce",0,100,20)
for j in range(p.getNumJoints(quadruped)):
p.changeDynamics(quadruped, j, linearDamping=0, angularDamping=0)
info = p.getJointInfo(quadruped, j)
#print(info)
jointName = info[1]
jointType = info[2]
if (jointType == p.JOINT_PRISMATIC or jointType == p.JOINT_REVOLUTE):
jointIds.append(j)
for j in range (p.getNumJoints(quadruped)):
p.changeDynamics(quadruped,j,linearDamping=0, angularDamping=0)
info = p.getJointInfo(quadruped,j)
#print(info)
jointName = info[1]
jointType = info[2]
if (jointType==p.JOINT_PRISMATIC or jointType==p.JOINT_REVOLUTE):
jointIds.append(j)
p.getCameraImage(480, 320)
p.getCameraImage(480,320)
p.setRealTimeSimulation(0)
joints = []
joints=[]
with open("data1.txt", "r") as filestream:
for line in filestream:
print("line=", line)
maxForce = p.readUserDebugParameter(maxForceId)
currentline = line.split(",")
#print (currentline)
#print("-----")
frame = currentline[0]
t = currentline[1]
#print("frame[",frame,"]")
joints = currentline[2:14]
#print("joints=",joints)
for j in range(12):
targetPos = float(joints[j])
p.setJointMotorControl2(quadruped,
jointIds[j],
p.POSITION_CONTROL,
jointDirections[j] * targetPos + jointOffsets[j],
force=maxForce)
p.stepSimulation()
for lower_leg in lower_legs:
#print("points for ", quadruped, " link: ", lower_leg)
pts = p.getContactPoints(quadruped, -1, lower_leg)
#print("num points=",len(pts))
#for pt in pts:
# print(pt[9])
time.sleep(1. / 500.)
with open("data1.txt","r") as filestream:
for line in filestream:
maxForce = p.readUserDebugParameter(maxForceId)
currentline = line.split(",")
frame = currentline[0]
t = currentline[1]
joints=currentline[2:14]
for j in range (12):
targetPos = float(joints[j])
p.setJointMotorControl2(quadruped,jointIds[j],p.POSITION_CONTROL,jointDirections[j]*targetPos+jointOffsets[j], force=maxForce)
p.stepSimulation()
for lower_leg in lower_legs:
#print("points for ", quadruped, " link: ", lower_leg)
pts = p.getContactPoints(quadruped,-1, lower_leg)
#print("num points=",len(pts))
#for pt in pts:
# print(pt[9])
time.sleep(1./500.)
index = 0
for j in range (p.getNumJoints(quadruped)):
p.changeDynamics(quadruped,j,linearDamping=0, angularDamping=0)
info = p.getJointInfo(quadruped,j)
js = p.getJointState(quadruped,j)
#print(info)
jointName = info[1]
jointType = info[2]
if (jointType==p.JOINT_PRISMATIC or jointType==p.JOINT_REVOLUTE):
paramIds.append(p.addUserDebugParameter(jointName.decode("utf-8"),-4,4,(js[0]-jointOffsets[index])/jointDirections[index]))
index=index+1
for j in range(p.getNumJoints(quadruped)):
p.changeDynamics(quadruped, j, linearDamping=0, angularDamping=0)
info = p.getJointInfo(quadruped, j)
js = p.getJointState(quadruped, j)
#print(info)
jointName = info[1]
jointType = info[2]
if (jointType == p.JOINT_PRISMATIC or jointType == p.JOINT_REVOLUTE):
paramIds.append(
p.addUserDebugParameter(jointName.decode("utf-8"), -4, 4,
(js[0] - jointOffsets[j]) / jointDirections[j]))
p.setRealTimeSimulation(1)
while (1):
for i in range(len(paramIds)):
c = paramIds[i]
targetPos = p.readUserDebugParameter(c)
maxForce = p.readUserDebugParameter(maxForceId)
p.setJointMotorControl2(quadruped,
jointIds[i],
p.POSITION_CONTROL,
jointDirections[i] * targetPos + jointOffsets[i],
force=maxForce)
for i in range(len(paramIds)):
c = paramIds[i]
targetPos = p.readUserDebugParameter(c)
maxForce = p.readUserDebugParameter(maxForceId)
p.setJointMotorControl2(quadruped,jointIds[i],p.POSITION_CONTROL,jointDirections[i]*targetPos+jointOffsets[i], force=maxForce)

View File

@ -1,477 +1,474 @@
<?xml version="1.0" ?>
<robot name="plane">
<link name="chassis">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 0.03 0.043794"/>
<mass value="13.715"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0.043794"/>
<geometry>
<mesh filename="chassis.stl" scale="1 1 1"/>
</geometry>
<material name="yellow">
<color rgba="0.95 0.75 0.05 1"/>
</material>
</visual>
<collision>
<origin rpy="-1.57 0 0" xyz="0 0 0.043794"/>
<geometry>
<mesh filename="chassis_vhacd_mod.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<link name="FR_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
<material name="green"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 -1"/>
<parent link="chassis"/>
<child link="FR_hip_motor"/>
<origin rpy="0 0 0" xyz="-0.0817145 0 0.242889"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FR_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror.stl" scale="1 1 1"/>
</geometry>
<material name="blue"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_right_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FR_hip_motor"/>
<child link="FR_upper_leg"/>
<origin rpy="0 0 0" xyz="-0.053565 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FR_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
<material name="red"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FR_upper_leg"/>
<child link="FR_lower_leg"/>
<origin rpy="0 0 0" xyz="0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="-.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
<material name="green">
<color rgba="0.23 0.73 0.33 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="chassis"/>
<child link="FL_hip_motor"/>
<origin rpy="0 0 0" xyz="0.0817145 0 0.242889"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg.stl" scale="1 1 1"/>
</geometry>
<material name="blue">
<color rgba="0.28 0.52 0.93 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FL_hip_motor"/>
<child link="FL_upper_leg"/>
<origin rpy="0 0 0" xyz="0.055855 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
<material name="red">
<color rgba="0.85 0.19 0.21 1"/>
</material>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FL_upper_leg"/>
<child link="FL_lower_leg"/>
<origin rpy="0 0 0" xyz="-0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
<material name="green"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 -1"/>
<parent link="chassis"/>
<child link="RR_hip_motor"/>
<origin rpy="0 0 0" xyz="-0.0817145 0 -0.194401"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror.stl" scale="1 1 1"/>
</geometry>
<material name="blue"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_right_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RR_hip_motor"/>
<child link="RR_upper_leg"/>
<origin rpy="0 0 0" xyz="-0.053565 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
<material name="red"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RR_upper_leg"/>
<child link="RR_lower_leg"/>
<origin rpy="0 0 0" xyz="0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="-.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
<material name="green"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="chassis"/>
<child link="RL_hip_motor"/>
<origin rpy="0 0 0" xyz="0.0817145 0 -0.194401"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg.stl" scale="1 1 1"/>
</geometry>
<material name="blue"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RL_hip_motor"/>
<child link="RL_upper_leg"/>
<origin rpy="0 0 0" xyz="0.055855 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
<material name="red"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RL_upper_leg"/>
<child link="RL_lower_leg"/>
<origin rpy="0 0 0" xyz="-0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
</robot>
<?xml version="1.0" ?>
<robot name="plane">
<link name="chassis">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 0.03 0.043794"/>
<mass value="13.715"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0.043794"/>
<geometry>
<mesh filename="chassis.obj" scale="1 1 1"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<origin rpy="-1.57 0 0" xyz="0 0 0.043794"/>
<geometry>
<mesh filename="chassis_vhacd_mod.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<link name="FR_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 -1"/>
<parent link="chassis"/>
<child link="FR_hip_motor"/>
<origin rpy="0 0 0" xyz="-0.0817145 0 0.242889"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FR_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_right_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FR_hip_motor"/>
<child link="FR_upper_leg"/>
<origin rpy="0 0 0" xyz="-0.053565 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FR_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg_3_collision.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FR_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FR_upper_leg"/>
<child link="FR_lower_leg"/>
<origin rpy="0 0 0" xyz="0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="-.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.obj" scale="1 1 1"/>
</geometry>
<material name="white">
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="chassis"/>
<child link="FL_hip_motor"/>
<origin rpy="0 0 0" xyz="0.0817145 0 0.242889"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left.obj" scale="1 1 1"/>
</geometry>
<material name="white">
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FL_hip_motor"/>
<child link="FL_upper_leg"/>
<origin rpy="0 0 0" xyz="0.055855 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="FL_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white">
</material>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3_collision.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="FL_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="FL_upper_leg"/>
<child link="FL_lower_leg"/>
<origin rpy="0 0 0" xyz="-0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 -1"/>
<parent link="chassis"/>
<child link="RR_hip_motor"/>
<origin rpy="0 0 0" xyz="-0.0817145 0 -0.194401"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror2.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_right_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RR_hip_motor"/>
<child link="RR_upper_leg"/>
<origin rpy="0 0 0" xyz="-0.053565 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RR_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3_collision.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RR_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RR_upper_leg"/>
<child link="RR_lower_leg"/>
<origin rpy="0 0 0" xyz="0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_hip_motor">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="-.02 0 0"/>
<mass value="1.095"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_hip_motor_2_chassis_joint" type="continuous">
<axis xyz="0 0 1"/>
<parent link="chassis"/>
<child link="RL_hip_motor"/>
<origin rpy="0 0 0" xyz="0.0817145 0 -0.194401"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_upper_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.04 -0.04"/>
<mass value="1.527"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left2.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_left_vhacd.obj" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_upper_leg_2_hip_motor_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RL_hip_motor"/>
<child link="RL_upper_leg"/>
<origin rpy="0 0 0" xyz="0.055855 0 0"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
<link name="RL_lower_leg">
<contact>
<lateral_friction value="1"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 -0.16 -0.02"/>
<mass value="0.241"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3_collision.stl" scale="1 1 1"/>
</geometry>
</collision>
</link>
<joint name="RL_lower_leg_2_upper_leg_joint" type="continuous">
<axis xyz="1 0 0"/>
<parent link="RL_upper_leg"/>
<child link="RL_lower_leg"/>
<origin rpy="0 0 0" xyz="-0.02069 -0.20833 -0.1422"/>
<limit effort="100" velocity="100"/>
<joint_properties damping=".0" friction=".0"/>
</joint>
</robot>

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

View File

@ -12,10 +12,10 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0.043794"/>
<geometry>
<mesh filename="chassis.stl" scale="1 1 1"/>
<mesh filename="chassis.obj" scale="1 1 1"/>
</geometry>
<material name="yellow">
<color rgba="0.95 0.75 0.05 1"/>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
@ -38,9 +38,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
<mesh filename="hip_motor_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="green"/>
<material name="white"/>
</visual>
<collision>
@ -72,9 +72,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror.stl" scale="1 1 1"/>
<mesh filename="upper_leg_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="blue"/>
<material name="white"/>
</visual>
<collision>
@ -107,9 +107,9 @@
<visual>
<origin rpy="0 1.57079 0" xyz="0 0.0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="red"/>
<material name="white"/>
</visual>
<collision>
@ -142,10 +142,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
<mesh filename="hip_motor.obj" scale="1 1 1"/>
</geometry>
<material name="green">
<color rgba="0.23 0.73 0.33 1"/>
<material name="white">
</material>
</visual>
@ -180,10 +179,9 @@
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg.stl" scale="1 1 1"/>
<mesh filename="upper_leg_left.obj" scale="1 1 1"/>
</geometry>
<material name="blue">
<color rgba="0.28 0.52 0.93 1"/>
<material name="white">
</material>
</visual>
@ -219,11 +217,10 @@
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="red">
<color rgba="0.85 0.19 0.21 1"/>
</material>
<material name="white">
</material>
</visual>
<collision>
@ -262,9 +259,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor_mirror.stl" scale="1 1 1"/>
<mesh filename="hip_motor_mirror.obj" scale="1 1 1"/>
</geometry>
<material name="green"/>
<material name="white"/>
</visual>
<collision>
@ -297,9 +294,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg_mirror.stl" scale="1 1 1"/>
<mesh filename="upper_leg_mirror2.obj" scale="1 1 1"/>
</geometry>
<material name="blue"/>
<material name="white"/>
</visual>
<collision>
@ -332,9 +329,9 @@
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="red"/>
<material name="white"/>
</visual>
<collision>
@ -368,9 +365,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="hip_motor.stl" scale="1 1 1"/>
<mesh filename="hip_motor.obj" scale="1 1 1"/>
</geometry>
<material name="green"/>
<material name="white"/>
</visual>
<collision>
@ -404,9 +401,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="upper_leg.stl" scale="1 1 1"/>
<mesh filename="upper_leg_left2.obj" scale="1 1 1"/>
</geometry>
<material name="blue"/>
<material name="white"/>
</visual>
<collision>
@ -441,9 +438,9 @@
<visual>
<origin rpy="0 1.57079 0" xyz="0 0 0"/>
<geometry>
<mesh filename="lower_leg_3.stl" scale="1 1 1"/>
<mesh filename="lower_leg3.obj" scale="1 1 1"/>
</geometry>
<material name="red"/>
<material name="white"/>
</visual>
<collision>
@ -475,9 +472,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
<sphere radius="0.0"/>
</geometry>
<material name="darkgray"/>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
@ -508,9 +505,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
<sphere radius="0.0"/>
</geometry>
<material name="darkgray"/>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
@ -541,9 +538,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
<sphere radius="0.0"/>
</geometry>
<material name="darkgray"/>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
@ -574,9 +571,9 @@
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.03"/>
<sphere radius="0.0"/>
</geometry>
<material name="darkgray"/>
<material name="white"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,13 @@
# Blender MTL File: 'None'
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
newmtl None.005
Ns 0.000000
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
Kd 0.800000 0.800000 0.800000
Ks 0.800000 0.800000 0.800000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None.004
Ns 0.000000
Ka 0.000000 0.000000 0.000000
Kd 0.800000 0.800000 0.800000
Ks 0.800000 0.800000 0.800000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,11 @@
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,13 @@
# Blender MTL File: 'None'
# Blender MTL File: 'laikago_textured.blend'
# Material Count: 1
newmtl None
Ns 0
newmtl None.002
Ns 0.000000
Ka 0.000000 0.000000 0.000000
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
Kd 0.800000 0.800000 0.800000
Ks 0.800000 0.800000 0.800000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd laikago_tex.jpg

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@ p.setTimeStep(1. / 500)
#p.setDefaultContactERP(0)
#urdfFlags = p.URDF_USE_SELF_COLLISION+p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS
urdfFlags = p.URDF_USE_SELF_COLLISION
quadruped = p.loadURDF("laikago/laikago.urdf", [0, 0, .5], [0, 0.5, 0.5, 0],
quadruped = p.loadURDF("laikago/laikago_toes.urdf", [0, 0, .5], [0, 0.5, 0.5, 0],
flags=urdfFlags,
useFixedBase=False)
@ -87,6 +87,7 @@ with open(pd.getDataPath() + "/laikago/data1.txt", "r") as filestream:
# print(pt[9])
time.sleep(1. / 500.)
index = 0
for j in range(p.getNumJoints(quadruped)):
p.changeDynamics(quadruped, j, linearDamping=0, angularDamping=0)
info = p.getJointInfo(quadruped, j)
@ -95,9 +96,10 @@ for j in range(p.getNumJoints(quadruped)):
jointName = info[1]
jointType = info[2]
if (jointType == p.JOINT_PRISMATIC or jointType == p.JOINT_REVOLUTE):
paramIds.append(
p.addUserDebugParameter(jointName.decode("utf-8"), -4, 4,
(js[0] - jointOffsets[j]) / jointDirections[j]))
paramIds.append(p.addUserDebugParameter(jointName.decode("utf-8"), -4, 4,
(js[0] - jointOffsets[index]) / jointDirections[index]))
index = index+1
p.setRealTimeSimulation(1)