Exemple #1
0
 def __init__(self, pinocchioModel, frame, ref, nu=None, activation=None):
     self.CostDataType = CostDataFrameRotation
     CostModelPinocchio.__init__(self, pinocchioModel, ncost=3, nu=nu)
     self.ref = ref
     self.frame = frame
     self.activation = activation if activation is not None else ActivationModelQuad(
     )
Exemple #2
0
 def __init__(self, pinocchioModel, nu=None, ref=None, activation=None):
     self.CostDataType = CostDataControl
     nu = nu if nu is not None else pinocchioModel.nv
     if ref is not None:
         assert (ref.shape == (nu, ))
     CostModelPinocchio.__init__(self, pinocchioModel, nu=nu, ncost=nu)
     self.ref = ref
     self.activation = activation if activation is not None else ActivationModelQuad(
     )
Exemple #3
0
 def __init__(self,
              pinocchioModel,
              frame,
              ref=None,
              nu=None,
              activation=None):
     self.CostDataType = CostDataFrameVelocityLinear
     CostModelPinocchio.__init__(self, pinocchioModel, ncost=3)
     self.ref = ref if ref is not None else np.zeros(3)
     self.frame = frame
     self.activation = activation if activation is not None else ActivationModelQuad(
     )
Exemple #4
0
 def __init__(self,
              pinocchioModel,
              contactModel,
              ncost=6,
              ref=None,
              nu=None,
              activation=None):
     self.CostDataType = CostDataForce
     CostModelPinocchio.__init__(self, pinocchioModel, ncost=ncost, nu=nu)
     self.ref = ref if ref is not None else np.zeros(ncost)
     self.contact = contactModel
     self.activation = activation if activation is not None else ActivationModelQuad(
     )
Exemple #5
0
 def __init__(self,
              pinocchioModel,
              State,
              ref=None,
              nu=None,
              activation=None):
     self.CostDataType = CostDataState
     CostModelPinocchio.__init__(self,
                                 pinocchioModel,
                                 ncost=State.ndx,
                                 nu=nu)
     self.State = State
     self.ref = ref if ref is not None else State.zero()
     self.activation = activation if activation is not None else ActivationModelQuad(
     )