dojo-sim / Dojo.jl

A differentiable physics engine for robotics
MIT License
297 stars 26 forks source link

cartpole_min and cartpole_max broken #46

Closed GlenHenshaw closed 1 year ago

GlenHenshaw commented 2 years ago
glenhenshaw@vpn202077 Dojo % julia cartpole_max.jl
  Activating project at `~/Code/ahrm`
┌ Info: MeshCat server started. You can open the visualizer by visiting the following URL in your browser:
└ http://127.0.0.1:8701
ERROR: LoadError: MethodError: no method matching Options(; max_al_iter=10, verbose=true)
Closest candidates are:
  Options(; line_search, max_iterations, max_dual_updates, min_step_size, objective_tolerance, lagrangian_gradient_tolerance, constraint_tolerance, constraint_norm, initial_constraint_penalty, scaling_penalty, max_penalty, reset_cache, verbose) at  /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/util.jl:489 got unsupported keyword argument "max_al_iter"
  Options(::Symbol, ::Int64, ::Int64, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::T, ::Bool, ::Any) where T at ~/.julia/packages/IterativeLQR/uZ1DR/src/options.jl:2 got unsupported keyword arguments "max_al_iter", "verbose"
Stacktrace:
 [1] kwerr(kw::NamedTuple{(:max_al_iter, :verbose), Tuple{Int64, Bool}}, args::Type)
   @ Base ./error.jl:163
 [2] top-level scope
   @ ~/Code/ahrm/Dojo/cartpole_max.jl:66
in expression starting at /Users/glenhenshaw/Code/ahrm/Dojo/cartpole_max.jl:66

Oddly, I got it to run exactly once, the very first time I tried it, from a Jupyter notebook. It failed with this error the second time and every subsequent time, both from a notebook and from the terminal.

janbruedigam commented 1 year ago

The cartpole examples were updated. There is a minimal-coordinate cartpole example with LQR now, and an example interfacing ReinforcementLearning.jl with DQN. The RL example might be broken though, since ReinforcementLearningL.jl is going through major changes.