-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symbolic Derivatives with SymPy do not work #630
Comments
@blegat, I was exploring the source of Dionysos.jl and came across BipedRobot/src/piracy.jl. Is that somehow correlated to this issue? Was the type piracy a workaround? Thanks in advance and sorry for the unsolicited tag... :P |
The issue can be fixed with # Type piracy needed in order to make Symbolics.jl types interact well with Quaternions.jl.
# This should be avoided — see https://docs.julialang.org/en/v1/manual/style-guide/#avoid-type-piracy.
function Base.:/(q::Quaternions.Quaternion, x::Symbolics.Num)
return Quaternions.Quaternion(q.s / x.val, q.v1 / x.val, q.v2 / x.val, q.v3 / x.val)
end which should be included with #648 when that gets merged. I took the snippet from BipedRobot/src/piracy.jl. |
Yes, we tried RigidBodyDynamics with SymPy but then ended up using Symbolics.jl |
As of the latest version, the example is broken.
https://github.com/JuliaRobotics/RigidBodyDynamics.jl/blob/master/examples/6.%20Symbolics%20using%20SymPy/6.%20Symbolics%20using%20SymPy.jl
Using version 2.2.0 works.
The issue is that Quaternion does not support type Sym. I can update later with more info.
The text was updated successfully, but these errors were encountered: