motion_planning icon indicating copy to clipboard operation
motion_planning copied to clipboard

ERROR: LoadError: UndefVarError: Model not defined

Open Schortenger opened this issue 4 years ago • 6 comments

When I run the examples, they are all illustrating that: ERROR: LoadError: UndefVarError: XX not defined. I am new to Julia, could you please tell me what's wrong with it?

Schortenger avatar Nov 19 '21 21:11 Schortenger

hi!

I am not sure which script you are trying to run, but in order to run most of the scripts in this repository you will need to set the environment and module to motion_planning. This can be done using an IDE like VSCode or Atom.

At this stage, the repository is not set up like a normal Julia package. It primarily exists so I can easily share code with collaborators.

Please let me know if there is a specific example that is not working and I can make sure it runs.

thowell avatar Nov 20 '21 17:11 thowell

Hi, there are some definition errors, and I am sure that I have already set the module to motion_planning. For example,

  1. I run the code /examples/implicit_dynamics/examples/planar_push_rotate.jl. There is an error called ERROR: LoadError: UndefVarError: J not defined image

  2. I run the code examples/model_predictive_control/acrobot.jl. There is an error called ERROR: LoadError: type QuatRotation has no field x image

Almost all of the code has some error called LoadError. Do you know what's wrong with it?

Schortenger avatar Nov 21 '21 16:11 Schortenger

  1. Looks like some sort of scope issue. I am in the process of moving the implicit dynamics examples into a separate repository to go along with the paper. This should be complete in the next week or two.
  2. This issue is related to Rotations.jl recently changing UnitQuaternion -> QuatRotation. For now you can enforce the package version for Rotations.jl as v1.0.2. I need to set up compat for motion_planning to prevent issue like this in the future.

thowell avatar Nov 21 '21 22:11 thowell

Hi, I have already reinstalled the Rotation pkg as v1.0.2 by Pkg.add(name="Rotations", version="1.0.2"), image Then I run the code from motion_planning/examples/implicit_dynamics/examples/comparisons/planar_push.jl. However, it still shows the error as ERROR: LoadError: type QuatRotation has no field x. image

Schortenger avatar Nov 22 '21 09:11 Schortenger

Looks like the actual trajectory optimization works and the subsequent issue is still with the rotations package. Will have time to fix the motion_planning in a few weeks. If you are specifically interested in this example I should have it spun out quite soon for paper revisions.

thowell avatar Nov 24 '21 05:11 thowell

@Schortenger I made a separate repo that includes the planar push example.

thowell avatar Dec 11 '21 17:12 thowell