Functions | Variables
cassie-simulation Namespace Reference

Functions

def check_joint (model, nj)
 
def com_des (k)
 
def squashing (model, data, q_in, Nin=N, epsin=eps, verbose=True)
 
def update_axis (q)
 

Variables

float axis_size = 0.08
 
 back_placement = pinocchio.SE3(np.identity(3), np.array([0.03, -0.0, 0.0]))
 
 com_base = robot.data.com[0].copy()
 
float com_drop_amp = 0.1
 
 constraint_datas = pinocchio.StdVec_RigidConstraintData()
 
 constraint_dim = sum([cm.size() for cm in constraint_models])
 
 constraint_models = robot.constraint_models
 
 contact_model_lf1
 
 contact_model_lf2
 
 data = pinocchio.Data(robot.model)
 
int eps = 1e-6
 
list foot_joint_ids = [robot.model.getJointId(joint_name) for joint_name in foot_joints]
 
list foot_joints = ["left-plantar-foot-joint", "right-plantar-foot-joint"]
 
 foot_length = np.linalg.norm(front_placement.translation - back_placement.translation)
 
 front_placement = pinocchio.SE3(np.identity(3), np.array([-0.1, 0.11, 0.0]))
 
 gui = robot.viewer.gui
 
 joint2_placement = robot.data.oMi[joint_id] * front_placement
 
 kkt_constraint = pinocchio.ContactCholeskyDecomposition(robot.model, constraint_models)
 
 mass = robot.data.mass[0]
 
 mid_point = np.zeros(3)
 
string mid_point_name = "hpp-gui/mid_point"
 
 mid_point_pos = pinocchio.SE3(np.identity(3), mid_point)
 
int mu = 1e-4
 
int N = 1000
 
string name1 = "hpp-gui/cm1_" + str(j)
 
string name2 = "hpp-gui/cm2_" + str(j)
 
 pos1 = robot.data.oMi[cm.joint1_id] * cm.joint1_placement
 
 pos2 = robot.data.oMi[cm.joint2_id] * cm.joint2_placement
 
 q = q0.copy()
 
 q0 = robot.q0.copy()
 
 q_sol = q.copy()
 
 qin = robot.q0.copy()
 
def qout = squashing(robot.model, data, qin)
 
float radius = 0.005
 
float red_color = 1.0 * float(j) / float(len(constraint_models))
 
 robot = example_robot_data.load("cassie")
 
float transparency = 0.5
 
 window_id = robot.viewer.gui.getWindowID("python-pinocchio")
 

Function Documentation

◆ check_joint()

def cassie-simulation.check_joint (   model,
  nj 
)

Definition at line 85 of file cassie-simulation.py.

◆ com_des()

def cassie-simulation.com_des (   k)

Definition at line 164 of file cassie-simulation.py.

◆ squashing()

def cassie-simulation.squashing (   model,
  data,
  q_in,
  Nin = N,
  epsin = eps,
  verbose = True 
)

Definition at line 168 of file cassie-simulation.py.

◆ update_axis()

def cassie-simulation.update_axis (   q)

Definition at line 73 of file cassie-simulation.py.

Variable Documentation

◆ axis_size

float cassie-simulation.axis_size = 0.08

Definition at line 118 of file cassie-simulation.py.

◆ back_placement

cassie-simulation.back_placement = pinocchio.SE3(np.identity(3), np.array([0.03, -0.0, 0.0]))

Definition at line 21 of file cassie-simulation.py.

◆ com_base

cassie-simulation.com_base = robot.data.com[0].copy()

Definition at line 159 of file cassie-simulation.py.

◆ com_drop_amp

float cassie-simulation.com_drop_amp = 0.1

Definition at line 161 of file cassie-simulation.py.

◆ constraint_datas

cassie-simulation.constraint_datas = pinocchio.StdVec_RigidConstraintData()

Definition at line 68 of file cassie-simulation.py.

◆ constraint_dim

cassie-simulation.constraint_dim = sum([cm.size() for cm in constraint_models])

Definition at line 102 of file cassie-simulation.py.

◆ constraint_models

cassie-simulation.constraint_models = robot.constraint_models

Definition at line 10 of file cassie-simulation.py.

◆ contact_model_lf1

cassie-simulation.contact_model_lf1
Initial value:
2  pinocchio.ContactType.CONTACT_3D,
3  robot.model,
4  joint_id,
5  front_placement,
6  0,
7  joint2_placement,
8  pinocchio.ReferenceFrame.LOCAL,
9  )

Definition at line 33 of file cassie-simulation.py.

◆ contact_model_lf2

cassie-simulation.contact_model_lf2
Initial value:
2  pinocchio.ContactType.CONTACT_3D,
3  robot.model,
4  joint_id,
5  back_placement,
6  0,
7  joint2_placement,
8  pinocchio.ReferenceFrame.LOCAL,
9  )

Definition at line 46 of file cassie-simulation.py.

◆ data

cassie-simulation.data = pinocchio.Data(robot.model)

Definition at line 12 of file cassie-simulation.py.

◆ eps

int cassie-simulation.eps = 1e-6

Definition at line 104 of file cassie-simulation.py.

◆ foot_joint_ids

list cassie-simulation.foot_joint_ids = [robot.model.getJointId(joint_name) for joint_name in foot_joints]

Definition at line 17 of file cassie-simulation.py.

◆ foot_joints

list cassie-simulation.foot_joints = ["left-plantar-foot-joint", "right-plantar-foot-joint"]

Definition at line 16 of file cassie-simulation.py.

◆ foot_length

cassie-simulation.foot_length = np.linalg.norm(front_placement.translation - back_placement.translation)

Definition at line 23 of file cassie-simulation.py.

◆ front_placement

cassie-simulation.front_placement = pinocchio.SE3(np.identity(3), np.array([-0.1, 0.11, 0.0]))

Definition at line 19 of file cassie-simulation.py.

◆ gui

cassie-simulation.gui = robot.viewer.gui

Definition at line 65 of file cassie-simulation.py.

◆ joint2_placement

cassie-simulation.joint2_placement = robot.data.oMi[joint_id] * front_placement

Definition at line 31 of file cassie-simulation.py.

◆ kkt_constraint

cassie-simulation.kkt_constraint = pinocchio.ContactCholeskyDecomposition(robot.model, constraint_models)

Definition at line 101 of file cassie-simulation.py.

◆ mass

cassie-simulation.mass = robot.data.mass[0]

Definition at line 157 of file cassie-simulation.py.

◆ mid_point

cassie-simulation.mid_point = np.zeros(3)

Definition at line 28 of file cassie-simulation.py.

◆ mid_point_name

string cassie-simulation.mid_point_name = "hpp-gui/mid_point"

Definition at line 143 of file cassie-simulation.py.

◆ mid_point_pos

cassie-simulation.mid_point_pos = pinocchio.SE3(np.identity(3), mid_point)

Definition at line 144 of file cassie-simulation.py.

◆ mu

int cassie-simulation.mu = 1e-4

Definition at line 105 of file cassie-simulation.py.

◆ N

int cassie-simulation.N = 1000

Definition at line 103 of file cassie-simulation.py.

◆ name1

string cassie-simulation.name1 = "hpp-gui/cm1_" + str(j)

Definition at line 125 of file cassie-simulation.py.

◆ name2

string cassie-simulation.name2 = "hpp-gui/cm2_" + str(j)

Definition at line 126 of file cassie-simulation.py.

◆ pos1

cassie-simulation.pos1 = robot.data.oMi[cm.joint1_id] * cm.joint1_placement

Definition at line 123 of file cassie-simulation.py.

◆ pos2

cassie-simulation.pos2 = robot.data.oMi[cm.joint2_id] * cm.joint2_placement

Definition at line 124 of file cassie-simulation.py.

◆ q

cassie-simulation.q = q0.copy()

Definition at line 98 of file cassie-simulation.py.

◆ q0

cassie-simulation.q0 = robot.q0.copy()

Definition at line 67 of file cassie-simulation.py.

◆ q_sol

cassie-simulation.q_sol = q.copy()

Definition at line 107 of file cassie-simulation.py.

◆ qin

def cassie-simulation.qin = robot.q0.copy()

Definition at line 249 of file cassie-simulation.py.

◆ qout

def cassie-simulation.qout = squashing(robot.model, data, qin)

Definition at line 251 of file cassie-simulation.py.

◆ radius

float cassie-simulation.radius = 0.005

Definition at line 119 of file cassie-simulation.py.

◆ red_color

float cassie-simulation.red_color = 1.0 * float(j) / float(len(constraint_models))

Definition at line 127 of file cassie-simulation.py.

◆ robot

cassie-simulation.robot = example_robot_data.load("cassie")

Definition at line 8 of file cassie-simulation.py.

◆ transparency

float cassie-simulation.transparency = 0.5

Definition at line 120 of file cassie-simulation.py.

◆ window_id

cassie-simulation.window_id = robot.viewer.gui.getWindowID("python-pinocchio")

Definition at line 109 of file cassie-simulation.py.

pinocchio::RigidConstraintModelTpl
Definition: algorithm/constraints/fwd.hpp:14


pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:50