def __init__(O, sites, masses): O.number_of_sites = len(sites) mp = mass_points(sites=sites, masses=masses) O.sum_of_masses = mp.sum_of_masses() O.alignment = joint_lib.translational_alignment( center_of_mass=mp.center_of_mass()) O.i_spatial = mp.spatial_inertia(alignment_cb_0b=O.alignment.cb_0b) # qr = matrix.col((0, 0, 0)) O.joint = joint_lib.translational(qr=qr) O.qd = O.joint.qd_zero
def __init__(O, sites, masses): O.number_of_sites = len(sites) mp = mass_points(sites=sites, masses=masses) O.sum_of_masses = mp.sum_of_masses() O.alignment = joint_lib.translational_alignment( center_of_mass=mp.center_of_mass()) O.i_spatial = mp.spatial_inertia(alignment_cb_0b=O.alignment.cb_0b) # qr = matrix.col((0,0,0)) O.joint = joint_lib.translational(qr=qr) O.qd = O.joint.qd_zero
def __init__(O): sites = [matrix.col((0.949, 2.815, 5.189))] mass_points = body_lib.mass_points(sites=sites, masses=[1.0]) O.alignment = joint_lib.translational_alignment( center_of_mass=mass_points.center_of_mass()) O.i_spatial = mass_points.spatial_inertia( alignment_cb_0b=O.alignment.cb_0b) qr = matrix.col((-0.1, 0.3, 0.2)) O.joint = joint_lib.translational(qr=qr) O.qd = matrix.col((0.05, 0.19, -0.29)) assert O.joint.get_linear_velocity(qd=O.qd).elems == O.qd.elems O.qd = O.joint.new_linear_velocity(qd=O.qd, value=-O.qd) assert O.joint.get_linear_velocity(qd=O.qd).elems == O.qd.elems O.parent = -1
def __init__(O): sites = [matrix.col((0.949, 2.815, 5.189))] mass_points = body_lib.mass_points(sites=sites, masses=[1.0]) O.alignment = joint_lib.translational_alignment( center_of_mass=mass_points.center_of_mass()) O.i_spatial = mass_points.spatial_inertia( alignment_cb_0b=O.alignment.cb_0b) qr = matrix.col((-0.1,0.3,0.2)) O.joint = joint_lib.translational(qr=qr) O.qd = matrix.col((0.05,0.19,-0.29)) assert O.joint.get_linear_velocity(qd=O.qd).elems == O.qd.elems O.qd = O.joint.new_linear_velocity(qd=O.qd, value=-O.qd) assert O.joint.get_linear_velocity(qd=O.qd).elems == O.qd.elems O.parent = -1