JuliaGeometry / JuliaGeometry/Rotations.jl
QuatRotation construction using symbolics
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 188
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
I was trying to use a symbolic to construct a QuatRotation but failed.
Can anyone help me to debug this or is it a limitation of this package?
using Symbolics
using Rotations
julia> @variables q[1:4] = [1.0, 0, 0, 0]
1-element Vector{Symbolics.Arr{Num, 1}}:
q[1:4]
julia> QuatRotation(q...)
ERROR: MethodError: /(::Quaternions.Quaternion{Num}, ::Num) is ambiguous. Candidates:
/(a::Number, b::Num) in Symbolics at /home/jinrae/.julia/packages/SymbolicUtils/qulQp/src/methods.jl:71
/(q::Quaternions.Quaternion, x::Real) in Quaternions at /home/jinrae/.julia/packages/Quaternions/kqEsP/src/Quaternion.jl:123
Possible fix, define
/(::Quaternions.Quaternion, ::Num)
Stacktrace:
[1] sign(x::Quaternions.Quaternion{Num})
@ Base ./number.jl:161
[2] QuatRotation
@ ~/.julia/packages/Rotations/VYTDG/src/unitquaternion.jl:22 [inlined]
[3] QuatRotation
@ ~/.julia/packages/Rotations/VYTDG/src/unitquaternion.jl:46 [inlined]
[4] QuatRotation(w::Num, x::Num, y::Num, z::Num, normalize::Bool)
@ Rotations ~/.julia/packages/Rotations/VYTDG/src/unitquaternion.jl:50
[5] QuatRotation(w::Num, x::Num, y::Num, z::Num)
@ Rotations ~/.julia/packages/Rotations/VYTDG/src/unitquaternion.jl:49
[6] top-level scope
@ REPL[35]:1
[7] top-level scope
@ ~/.julia/packages/Infiltrator/r3Hf5/src/Infiltrator.jl:710
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Symbolics and Rotations interaction shown in the issue, then inspect Rotations/src/unitquaternion.jl at the QuatRotation constructors and the reported division dispatch. Compare the behavior with the Quaternions and Symbolics methods named in the error; the issue is done when the supported behavior is resolved and the ambiguity is either handled or clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100