Variables
simulation-contact-dynamics Namespace Reference

Variables

 A = np.vstack((S, J_constraint))
 
 a
 
 b = pin.rnea(model, data_control, q, v, np.zeros(model.nv))
 
 collision_model
 
int constraint_index = 0
 
list contact_datas = []
 
int contact_dim = 6 * num_constraints
 
 contact_model
 
list contact_models = []
 
 data_control = model.createData()
 
 data_sim = model.createData()
 
int dt = 5e-3
 
 elapsed_time = time.time() - tic
 
list feet_name = ["left_sole_link", "right_sole_link"]
 
 frame = model.frames[frame_id]
 
list frame_ids = [model.getFrameId(frame_name) for frame_name in feet_name]
 
 J_constraint = np.zeros((contact_dim, model.nv))
 
float Kp_posture = 30.0
 
float Kv_posture = 0.05 * math.sqrt(Kp_posture)
 
string mesh_dir = pinocchio_model_dir
 
 model
 
string model_path = pinocchio_model_dir / "example-robot-data/robots"
 
 num_constraints = len(frame_ids)
 
 open
 
string pinocchio_model_dir = Path(__file__).parent.parent / "models"
 
 prox_settings = pin.ProximalSettings(1e-12, 1e-12, 10)
 
 q = q0.copy()
 
 q0 = model.referenceConfigurations["half_sitting"]
 
 q_ref = pin.integrate(model, q0, 0.1 * np.random.rand(model.nv))
 
 S = np.zeros((model.nv - 6, model.nv))
 
 sol = np.linalg.lstsq(A.T, b, rcond=None)[0]
 
string srdf_filename = "talos.srdf"
 
string srdf_full_path = model_path / "talos_data/srdf" / srdf_filename
 
int t = 0
 
int T = 5
 
 tau = np.zeros(model.nv)
 
 tic = time.time()
 
string urdf_filename = "talos_reduced.urdf"
 
string urdf_model_path = model_path / "talos_data/robots" / urdf_filename
 
 v = v0.copy()
 
 v0 = np.zeros(model.nv)
 
 v_ref = v0.copy()
 
 visual_model
 
 viz = MeshcatVisualizer(model, collision_model, visual_model)
 

Variable Documentation

◆ A

simulation-contact-dynamics.A = np.vstack((S, J_constraint))

Definition at line 110 of file simulation-contact-dynamics.py.

◆ a

simulation-contact-dynamics.a
Initial value:
1 = pin.constraintDynamics(
2  model, data_sim, q, v, tau, contact_models, contact_datas, prox_settings
3  )

Definition at line 122 of file simulation-contact-dynamics.py.

◆ b

simulation-contact-dynamics.b = pin.rnea(model, data_control, q, v, np.zeros(model.nv))

Definition at line 111 of file simulation-contact-dynamics.py.

◆ collision_model

simulation-contact-dynamics.collision_model

Definition at line 20 of file simulation-contact-dynamics.py.

◆ constraint_index

int simulation-contact-dynamics.constraint_index = 0

Definition at line 98 of file simulation-contact-dynamics.py.

◆ contact_datas

list simulation-contact-dynamics.contact_datas = []

Definition at line 60 of file simulation-contact-dynamics.py.

◆ contact_dim

int simulation-contact-dynamics.contact_dim = 6 * num_constraints

Definition at line 73 of file simulation-contact-dynamics.py.

◆ contact_model

list simulation-contact-dynamics.contact_model
Initial value:
1 = pin.RigidConstraintModel(
2  pin.ContactType.CONTACT_6D, model, frame.parentJoint, frame.placement
3  )

Definition at line 65 of file simulation-contact-dynamics.py.

◆ contact_models

list simulation-contact-dynamics.contact_models = []

Definition at line 59 of file simulation-contact-dynamics.py.

◆ data_control

simulation-contact-dynamics.data_control = model.createData()

Definition at line 57 of file simulation-contact-dynamics.py.

◆ data_sim

simulation-contact-dynamics.data_sim = model.createData()

Definition at line 56 of file simulation-contact-dynamics.py.

◆ dt

int simulation-contact-dynamics.dt = 5e-3

Definition at line 78 of file simulation-contact-dynamics.py.

◆ elapsed_time

simulation-contact-dynamics.elapsed_time = time.time() - tic

Definition at line 134 of file simulation-contact-dynamics.py.

◆ feet_name

list simulation-contact-dynamics.feet_name = ["left_sole_link", "right_sole_link"]

Definition at line 51 of file simulation-contact-dynamics.py.

◆ frame

simulation-contact-dynamics.frame = model.frames[frame_id]

Definition at line 64 of file simulation-contact-dynamics.py.

◆ frame_ids

list simulation-contact-dynamics.frame_ids = [model.getFrameId(frame_name) for frame_name in feet_name]

Definition at line 52 of file simulation-contact-dynamics.py.

◆ J_constraint

simulation-contact-dynamics.J_constraint = np.zeros((contact_dim, model.nv))

Definition at line 96 of file simulation-contact-dynamics.py.

◆ Kp_posture

float simulation-contact-dynamics.Kp_posture = 30.0

Definition at line 82 of file simulation-contact-dynamics.py.

◆ Kv_posture

float simulation-contact-dynamics.Kv_posture = 0.05 * math.sqrt(Kp_posture)

Definition at line 83 of file simulation-contact-dynamics.py.

◆ mesh_dir

string simulation-contact-dynamics.mesh_dir = pinocchio_model_dir

Definition at line 14 of file simulation-contact-dynamics.py.

◆ model

simulation-contact-dynamics.model

Definition at line 20 of file simulation-contact-dynamics.py.

◆ model_path

string simulation-contact-dynamics.model_path = pinocchio_model_dir / "example-robot-data/robots"

Definition at line 13 of file simulation-contact-dynamics.py.

◆ num_constraints

simulation-contact-dynamics.num_constraints = len(frame_ids)

Definition at line 72 of file simulation-contact-dynamics.py.

◆ open

simulation-contact-dynamics.open

Definition at line 33 of file simulation-contact-dynamics.py.

◆ pinocchio_model_dir

string simulation-contact-dynamics.pinocchio_model_dir = Path(__file__).parent.parent / "models"

Definition at line 11 of file simulation-contact-dynamics.py.

◆ prox_settings

simulation-contact-dynamics.prox_settings = pin.ProximalSettings(1e-12, 1e-12, 10)

Definition at line 121 of file simulation-contact-dynamics.py.

◆ q

simulation-contact-dynamics.q = q0.copy()

Definition at line 85 of file simulation-contact-dynamics.py.

◆ q0

simulation-contact-dynamics.q0 = model.referenceConfigurations["half_sitting"]

Definition at line 47 of file simulation-contact-dynamics.py.

◆ q_ref

simulation-contact-dynamics.q_ref = pin.integrate(model, q0, 0.1 * np.random.rand(model.nv))

Definition at line 48 of file simulation-contact-dynamics.py.

◆ S

simulation-contact-dynamics.S = np.zeros((model.nv - 6, model.nv))

Definition at line 80 of file simulation-contact-dynamics.py.

◆ sol

simulation-contact-dynamics.sol = np.linalg.lstsq(A.T, b, rcond=None)[0]

Definition at line 113 of file simulation-contact-dynamics.py.

◆ srdf_filename

string simulation-contact-dynamics.srdf_filename = "talos.srdf"

Definition at line 17 of file simulation-contact-dynamics.py.

◆ srdf_full_path

string simulation-contact-dynamics.srdf_full_path = model_path / "talos_data/srdf" / srdf_filename

Definition at line 18 of file simulation-contact-dynamics.py.

◆ t

int simulation-contact-dynamics.t = 0

Definition at line 77 of file simulation-contact-dynamics.py.

◆ T

int simulation-contact-dynamics.T = 5

Definition at line 89 of file simulation-contact-dynamics.py.

◆ tau

simulation-contact-dynamics.tau = np.zeros(model.nv)

Definition at line 87 of file simulation-contact-dynamics.py.

◆ tic

simulation-contact-dynamics.tic = time.time()

Definition at line 95 of file simulation-contact-dynamics.py.

◆ urdf_filename

string simulation-contact-dynamics.urdf_filename = "talos_reduced.urdf"

Definition at line 15 of file simulation-contact-dynamics.py.

◆ urdf_model_path

string simulation-contact-dynamics.urdf_model_path = model_path / "talos_data/robots" / urdf_filename

Definition at line 16 of file simulation-contact-dynamics.py.

◆ v

simulation-contact-dynamics.v = v0.copy()

Definition at line 86 of file simulation-contact-dynamics.py.

◆ v0

simulation-contact-dynamics.v0 = np.zeros(model.nv)

Definition at line 54 of file simulation-contact-dynamics.py.

◆ v_ref

simulation-contact-dynamics.v_ref = v0.copy()

Definition at line 55 of file simulation-contact-dynamics.py.

◆ visual_model

simulation-contact-dynamics.visual_model

Definition at line 20 of file simulation-contact-dynamics.py.

◆ viz

simulation-contact-dynamics.viz = MeshcatVisualizer(model, collision_model, visual_model)

Definition at line 32 of file simulation-contact-dynamics.py.



pinocchio
Author(s):
autogenerated on Sun Nov 10 2024 03:43:06