11using Test
22using CameraModels
3- import Manifolds as MJL
3+ import LieGroups
4+ using LieGroups:
5+ SpecialEuclideanGroup,
6+ SpecialOrthogonalGroup,
7+ hat,
8+ exp,
9+ compose,
10+ LieAlgebra
411
512
613@testset " Test intersect of line and plane" begin
2027
2128@testset " Test raytracing to plane" begin
2229
23- M = MJL . SpecialEuclidean ( 3 )
24- Mr = M . manifold[ 2 ]
30+ M = SpecialEuclideanGroup ( 3 ; variant = :right )
31+ Mr = SpecialOrthogonalGroup ( 3 )
2532R0 = [1 0 0 ; 0 1 0 ; 0 0 1. ]
2633
2734
@@ -36,8 +43,8 @@ l_FL = [0; 0; -2.]
3643
3744# local level to body to extrinsic transform
3845l_T_b = ArrayPartition ([0 ;0 ;0. ], R0)
39- b_T_ex = ArrayPartition ([0 ;0 ;0. ], MJL . exp_lie (Mr, MJL . hat (Mr, R0 , [0 ;0.2 ;0.2 ])))
40- l_T_ex = MJL . compose (M, l_T_b, b_T_ex)
46+ b_T_ex = ArrayPartition ([0 ;0 ;0. ], exp (Mr, hat (LieAlgebra (Mr) , [0 ;0.2 ;0.2 ])))
47+ l_T_ex = compose (M, l_T_b, b_T_ex)
4148
4249# Ray trace
4350l_Forb = intersectRayToPlane (
@@ -50,8 +57,8 @@ l_Forb = intersectRayToPlane(
5057
5158
5259# # Place the body somewhere in the world
53- w_T_b = ArrayPartition ([0. ;0. ;2. ], MJL . exp_lie (Mr, MJL . hat (Mr, R0 , [0 ;0 ;0. ])))
60+ w_T_b = ArrayPartition ([0. ;0. ;2. ], LieGroups . exp (Mr, LieGroups . hat (LieAlgebra (Mr) , [0 ;0 ;0. ])))
5461# find feature points in the world frame
55- _w_Forb = MJL. affine_matrix (M, w_T_b)* [l_Forb; 1. ]
62+ # _w_Forb = MJL.affine_matrix(M, w_T_b)*[l_Forb; 1.]
5663
5764end
0 commit comments