Skip to content

Commit

Permalink
Set R to have a negative state priority
Browse files Browse the repository at this point in the history
  • Loading branch information
YingboMa committed Aug 7, 2024
1 parent 6ca4d10 commit 8272171
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/orientation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The primary difference between `NumRotationMatrix` and `RotationMatrix` is that
Never call this function directly from a component constructor, instead call `f = Frame(); R = ori(f)` and add `f` to the subsystems.
"""
function NumRotationMatrix(; R = collect(1.0I(3)), w = zeros(3), name=:R, varw = false, state_priority=nothing)
function NumRotationMatrix(; R = collect(1.0I(3)), w = zeros(3), name=:R, varw = false, state_priority=-1)
# The reason for not calling this directly is that all R vaiables have to have the same name since they are treated as connector variables (otherwise a connection error is thrown). A component with more than one rotation matrix will thus have two different R variables that overwrite each other
R = at_variables_t(:R, 1:3, 1:3; default = R, state_priority) #[description="Orientation rotation matrix ∈ SO(3)"]
# @variables w(t)[1:3]=w [description="angular velocity"]
Expand Down

0 comments on commit 8272171

Please sign in to comment.