RoboticExplorationLab / AltroTutorials.jl

MIT License
9 stars 4 forks source link

DimensionMismatch("No precise constructor for RBState found. Length of input was 4.") #2

Open wly2014 opened 2 years ago

wly2014 commented 2 years ago

Sorry, why do I meet an error when I run the code x = zeros(model)[1] in Quadrotor.ipynb:

DimensionMismatch("No precise constructor for RBState found. Length of input was 4.")
Stacktrace:
 [1] RBState(x::Tuple{Tuple{Tuple{Tuple{SVector{3, Float64}, SMatrix{3, 3, Float64, 9}, SVector{3, Float64}, SVector{3, Float64}}}}})
   @ StaticArrays ~/.julia/packages/StaticArrays/OWJK7/src/convert.jl:1
 [2] StaticArray (repeats 4 times)
   @ ~/.julia/packages/StaticArrays/OWJK7/src/convert.jl:4 [inlined]
 [3] build_state(::Quadrotor{QuatRotation}, ::SVector{3, Float64}, ::SMatrix{3, 3, Float64, 9}, ::SVector{3, Float64}, ::SVector{3, Float64})
   @ RobotDynamics ~/.julia/packages/RobotDynamics/tXate/src/rigidbody.jl:134
 [4] zeros(model::Quadrotor{QuatRotation})
   @ RobotDynamics ~/.julia/packages/RobotDynamics/tXate/src/rigidbody.jl:28
 [5] top-level scope 
... ...
bjack205 commented 2 years ago

The problem is with the newest version of Rotations.jl. They broke some compatibility with the previous version. For now just use v1.0 of Rotations.jl and that should fix the issue.

wly2014 commented 2 years ago

Sorry, after I changed the version of Rotations.jl to v1.0.4 using ]add Rotations@v1.0, I still met this error.