Skip to content

Commit

Permalink
type stability in logT
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Feb 13, 2021
1 parent 32f2a2d commit e6b5775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Robotlib"
uuid = "a75dfa10-1339-53f3-8748-4d618c3d76af"
authors = ["baggepinnen <baggepinnen@gmail.com>"]
version = "1.1.4"
version = "1.1.5"

[deps]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
6 changes: 3 additions & 3 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ Calculates the matrix logarithm of a transformation matrix ∈ SE(3)
Does not seem to be very reliable for very small rotations, use logm instead, which is a bit slower.
"""
function logT(T) # Verified to work in the vicinity of I, but not for very small errors
R = T[1:3,1:3]
t = T[1:3,4]
R = T2R(T)
t = T2t(T)
ω = logR(R)
= norm(skewcoords(ω))
if< 1e-3
Expand All @@ -110,7 +110,7 @@ function logT(T) # Verified to work in the vicinity of I, but not for very small
fact = (2sin(nω)-*(1+cos(nω)))/(2*^2*sin(nω))
end
Ai = I-0.5ω+fact*ω^2
return [ω Ai*t;0 0 0 0]
return [[ω Ai*t]; SA[0 0 0 0]]
end

"""Calculates the matrix logarithm of a rotation matrix ∈ SO(3)"""
Expand Down

0 comments on commit e6b5775

Please sign in to comment.