Failed to precompile TrajectoryOptimization

when I add TrajectoryOptimization , I got an error message:
ERROR: LoadError: LoadError: UndefVarError: QuatRotation not defined

[ Info: Precompiling TrajectoryOptimization [c79d492b-0548-5874-b488-5a62c1d9d0ca]
ERROR: LoadError: LoadError: UndefVarError: QuatRotation not defined
Stacktrace:
  [1] top-level scope
    @ C:\Users\xxx\.julia\packages\RobotDynamics\OMNjA\src\liestate.jl:42
  [2] include(mod::Module, _path::String)
    @ Base .\Base.jl:384
  [3] include(x::String)
    @ RobotDynamics C:\Users\xxx\.julia\packages\RobotDynamics\OMNjA\src\RobotDynamics.jl:1
  [4] top-level scope
    @ C:\Users\xxx\.julia\packages\RobotDynamics\OMNjA\src\RobotDynamics.jl:28
  [5] include
    @ .\Base.jl:384 [inlined]
  [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1235
  [7] top-level scope
    @ none:1
  [8] eval
    @ .\boot.jl:360 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [10] top-level scope
    @ none:1
in expression starting at C:\Users\xxx\.julia\packages\RobotDynamics\OMNjA\src\liestate.jl:42
in expression starting at C:\Users\xxx\.julia\packages\RobotDynamics\OMNjA\src\RobotDynamics.jl:1
ERROR: LoadError: Failed to precompile RobotDynamics [38ceca67-d8d3-44e8-9852-78a5596522e1] to C:\Users\xxx\.julia\compiled\v1.6\RobotDynamics\jl_86A1.tmp.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
    @ Base .\loading.jl:1385
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1329
  [4] _require(pkg::Base.PkgId)
    @ Base .\loading.jl:1043
  [5] require(uuidkey::Base.PkgId)
    @ Base .\loading.jl:936
  [6] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:923
  [7] include
    @ .\Base.jl:384 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::String)
    @ Base .\loading.jl:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ .\boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude .\client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at C:\Users\xxx\.julia\packages\TrajectoryOptimization\cGEqd\src\TrajectoryOptimization.jl:1
ERROR: LoadError: Failed to precompile TrajectoryOptimization [c79d492b-0548-5874-b488-5a62c1d9d0ca] to C:\Users\xxx\.julia\compiled\v1.6\TrajectoryOptimization\jl_7B46.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base .\loading.jl:1385
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base .\loading.jl:1329
 [4] _require(pkg::Base.PkgId)
   @ Base .\loading.jl:1043
 [5] require(uuidkey::Base.PkgId)
   @ Base .\loading.jl:936
 [6] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:923
 [7] include(fname::String)
   @ Base.MainInclude .\client.jl:444
 [8] top-level scope
   @ REPL[7]:1
in expression starting at xxx\Altro.jl-main\examples\quickstart.jl:2

Hello and welcome to the community :wave:

This package hasn’t been maintained in a long time, I suggest you find another alternative. I suggest having a look at InfiniteOpt.jl

Thanks for your answer.
I am very interested in the Altro package, but it relies on TrajectoryOptimization. When I add the TrajectoryOptimization package, it shows the above error, how do I solve that problem?
My guess is that the dependency Rotations version in TrajectoryOptimization is too low.

You could manually add a version of Rotations that is compatible, the compat bound on Rotations in TrajectoryOptimization is probably incorrect

Someone has made an update here

you could install that PR branch instead using

pkg> add TrajectoryOptimization#update_rotations
1 Like

Thank you very much for your patient answer. My problem has been solved. Best wishes for you!

1 Like