def casadi(self, x, u, dxdt):
    '\twrite dynamics as first order ODE: dxdt = f(x(t))\n\t\t\tx is a 6x1 vector: [x, y, psi, vx, vy, omega]^T\n\t\t\tu is a 2x1 vector: [acc/pwm, steer]^T\n\t\t\tdxdt is a casadi.SX variable\n\t\t'
    pwm = u[0]
    steer = u[1]
    psi = x[2]
    vx = x[3]
    vy = x[4]
    omega = x[5]
    vmin = 0.05
    vy = cs.if_else((vx < vmin), 0, vy)
    omega = cs.if_else((vx < vmin), 0, omega)
    steer = cs.if_else((vx < vmin), 0, steer)
    vx = cs.if_else((vx < vmin), vmin, vx)
    Frx = ((((self.Cm1 - (self.Cm2 * vx)) * pwm) - self.Cr0) - (self.Cr2 * (vx ** 2)))
    alphaf = (steer - cs.atan2(((self.lf * omega) + vy), vx))
    alphar = cs.atan2(((self.lr * omega) - vy), vx)
    Ffy = (self.Df * cs.sin((self.Cf * cs.arctan((self.Bf * alphaf)))))
    Fry = (self.Dr * cs.sin((self.Cr * cs.arctan((self.Br * alphar)))))
    dxdt[0] = ((vx * cs.cos(psi)) - (vy * cs.sin(psi)))
    dxdt[1] = ((vx * cs.sin(psi)) + (vy * cs.cos(psi)))
    dxdt[2] = omega
    dxdt[3] = (((1 / self.mass) * (Frx - (Ffy * cs.sin(steer)))) + (vy * omega))
    dxdt[4] = (((1 / self.mass) * (Fry + (Ffy * cs.cos(steer)))) - (vx * omega))
    dxdt[5] = ((1 / self.Iz) * (((Ffy * self.lf) * cs.cos(steer)) - (Fry * self.lr)))
    return dxdt
write dynamics as first order ODE: dxdt = f(x(t))
x is a 6x1 vector: [x, y, psi, vx, vy, omega]^T
u is a 2x1 vector: [acc/pwm, steer]^T
dxdt is a casadi.SX variable
def casadi(self, x, u, dxdt):
    '\twrite dynamics as first order ODE: dxdt = f(x(t))\n\t\t\tx is a 6x1 vector: [x, y, psi, vx, vy, omega]^T\n\t\t\tu is a 2x1 vector: [acc/pwm, steer]^T\n\t\t\tdxdt is a casadi.SX variable\n\t\t'
    pwm = u[0]
    steer = u[1]
    psi = x[2]
    vx = x[3]
    vy = x[4]
    omega = x[5]
    vmin = 0.05
    vy = cs.if_else((vx < vmin), 0, vy)
    omega = cs.if_else((vx < vmin), 0, omega)
    steer = cs.if_else((vx < vmin), 0, steer)
    vx = cs.if_else((vx < vmin), vmin, vx)
    Frx = ((((self.Cm1 - (self.Cm2 * vx)) * pwm) - self.Cr0) - (self.Cr2 * (vx ** 2)))
    alphaf = (steer - cs.atan2(((self.lf * omega) + vy), vx))
    alphar = cs.atan2(((self.lr * omega) - vy), vx)
    Ffy = (self.Df * cs.sin((self.Cf * cs.arctan((self.Bf * alphaf)))))
    Fry = (self.Dr * cs.sin((self.Cr * cs.arctan((self.Br * alphar)))))
    dxdt[0] = ((vx * cs.cos(psi)) - (vy * cs.sin(psi)))
    dxdt[1] = ((vx * cs.sin(psi)) + (vy * cs.cos(psi)))
    dxdt[2] = omega
    dxdt[3] = (((1 / self.mass) * (Frx - (Ffy * cs.sin(steer)))) + (vy * omega))
    dxdt[4] = (((1 / self.mass) * (Fry + (Ffy * cs.cos(steer)))) - (vx * omega))
    dxdt[5] = ((1 / self.Iz) * (((Ffy * self.lf) * cs.cos(steer)) - (Fry * self.lr)))
    return dxdt