term0
{
  name "intermediate cost"
  kind "quadratic"
  type 0              ; 0 = intermediate, 1 = final

  weights
  {
    ; state weighting
    Q
    {
      scaling 10

      ; joint position
      (0,0)   1.0

      ; joint velocity
      (1,1)   1.0

      ; motor position
      (2,2)   0.0
    }

    R
    {
      scaling 0.02

      ; motor velocity

      (0,0) 0.1
    }

    x_des
    {
      ; joint position
      (0,0)   0.0

      ; joint velocity
      (1,0)   0.0

      ; motor position
      (2,0)   0.0
    }
  }
}


term1
{
  name "final cost"
  kind "quadratic"
  type 1              ; 0 = intermediate, 1 = final

  weights
  {
    ; state weighting
    Q
    {
      scaling 10

      ; joint position
      (0,0)   1.0

      ; joint velocity
      (1,1)   1.0

        ; motor position
      (2,2)   0.0
    }

    x_des
    {
      ; joint position
      (0,0)   0.0

      ; joint velocity
      (1,0)    0.0

      ; motor pos
      (2,0)   0.0
    }
  }
}


; initial position
x_0
{
  ; joint position
  (0,0)   -3.14

  ; joint velocity
  (1,0)   0.0

  ; actuator position
  (2,0)   -3.14
}


K_init
{
  scaling 0.0

  ; joint position
  (0,0)   0.0

  ; joint velocity
  (1,0)   0.0
}





