Skip to content

Commit

Permalink
Fixed Realtime simple example
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Salzmann committed Mar 12, 2024
1 parent 9c9f29f commit 809ccfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/realtime/simple_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def example():
casadi_sym_inp = cs.MX.sym('inp', 2)

# First-order Taylor (Linear) approximation of the model as Casadi Function
l4c_model_order1 = l4c.RealTimeL4CasADi(pyTorch_model, approximation_order=1)
l4c_model_order1 = l4c.realtime.RealTimeL4CasADi(pyTorch_model, approximation_order=1)
casadi_lin_approx_sym_out = l4c_model_order1(casadi_sym_inp)
casadi_lin_approx_func = cs.Function('model2_lin',
[casadi_sym_inp,
Expand All @@ -43,7 +43,7 @@ def example():
casadi_lin_approx_param = l4c_model_order1.get_params(np.zeros((2,)))

# Second-order Taylor (Quadratic) approximation of the model as Casadi Function
l4c_model_order2 = l4c.RealTimeL4CasADi(pyTorch_model, approximation_order=2)
l4c_model_order2 = l4c.realtime.RealTimeL4CasADi(pyTorch_model, approximation_order=2)
casadi_quad_approx_sym_out = l4c_model_order2(casadi_sym_inp)
casadi_quad_approx_func = cs.Function('model2_lin',
[casadi_sym_inp,
Expand Down

0 comments on commit 809ccfb

Please sign in to comment.