1 0 -9.81 0.00101 model://sun <% # Parameters # Aluminum 2700 kg/m^3 density = 2700.0 dz = 0.5 dx = dz/10 dy = dz/10 mass = density * dx * dy * dz # upper_link is smaller length_ratio = 2e-1 dx2 = dx*length_ratio dy2 = dy*length_ratio dz2 = dz*length_ratio mass2 = density * dx2 * dy2 * dz2 theta_1 = Math::PI / 4 theta_2 = 0.3 %> 0 0 <%= dz*1.8 %> <%= theta_1 %> 0 0 0 0 <%= -dz2/2 %> 0 0 0 <%= mass2 %> <%= 1.0 / 12 * mass2 * (dy2*dy2 + dz2*dz2) %> <%= 1.0 / 12 * mass2 * (dz2*dz2 + dx2*dx2) %> <%= 1.0 / 12 * mass2 * (dx2*dx2 + dy2*dy2) %> 0.0 0.0 0.0 <%= dx2 %> <%= dy2 %> <%= dz2 %> <%= dx2 %> <%= dy2 %> <%= dz2 %> 0 0 <%= dz2/2 %> 0 0 0 world upper_link 1 0 0 0 <%= dz2*Math.sin(0)+dz*Math.sin(theta_1)/2 %> <%= -dz2*Math.cos(0)-dz*Math.cos(theta_1)/2 %> <%= theta_1 %> 0 0 <%= mass %> <%= 1.0 / 12 * mass * (dy*dy + dz*dz) %> <%= 1.0 / 12 * mass * (dz*dz + dx*dx) %> <%= 1.0 / 12 * mass * (dx*dx + dy*dy) %> 0.0 0.0 0.0 <%= dx %> <%= dy %> <%= dz %> <%= dx %> <%= dy %> <%= dz %> 0 0 <%= dz/2 %> 0 0 0 upper_link lower_link 1 0 0