remove function import
parent
1cabd2000f
commit
b02cc3f7e3
|
@ -1,6 +1,7 @@
|
|||
import gtsam
|
||||
import math
|
||||
import numpy as np
|
||||
from math import pi, cos, sin
|
||||
from math import pi
|
||||
|
||||
|
||||
def circlePose3(numPoses=8, radius=1.0, symbolChar='\0'):
|
||||
|
@ -25,7 +26,7 @@ def circlePose3(numPoses=8, radius=1.0, symbolChar='\0'):
|
|||
np.array([[0., 1., 0.], [1., 0., 0.], [0., 0., -1.]], order='F'))
|
||||
for i in range(numPoses):
|
||||
key = gtsam.symbol(symbolChar, i)
|
||||
gti = gtsam.Point3(radius * cos(theta), radius * sin(theta), 0)
|
||||
gti = gtsam.Point3(radius * math.cos(theta), radius * math.sin(theta), 0)
|
||||
oRi = gtsam.Rot3.Yaw(
|
||||
-theta) # negative yaw goes counterclockwise, with Z down !
|
||||
gTi = gtsam.Pose3(gRo.compose(oRi), gti)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
from math import pi, cos, sin
|
||||
import math
|
||||
from math import pi
|
||||
import gtsam
|
||||
from gtsam import PinholeCameraCal3_S2
|
||||
|
||||
|
@ -85,7 +86,7 @@ def generate_data(options):
|
|||
r = 10
|
||||
for j in range(len(truth.points)):
|
||||
theta = j * 2 * pi / nrPoints
|
||||
truth.points[j] = gtsam.Point3(r * cos(theta), r * sin(theta), 0)
|
||||
truth.points[j] = gtsam.Point3(r * math.cos(theta), r * math.sin(theta), 0)
|
||||
else: # 3D landmarks as vertices of a cube
|
||||
truth.points = [
|
||||
gtsam.Point3(10, 10, 10), gtsam.Point3(-10, 10, 10),
|
||||
|
@ -99,7 +100,7 @@ def generate_data(options):
|
|||
r = 40
|
||||
for i in range(options.nrCameras):
|
||||
theta = i * 2 * pi / options.nrCameras
|
||||
t = gtsam.Point3(r * cos(theta), r * sin(theta), height)
|
||||
t = gtsam.Point3(r * math.cos(theta), r * math.sin(theta), height)
|
||||
truth.cameras[i] = PinholeCameraCal3_S2.Lookat(t,
|
||||
gtsam.Point3(0, 0, 0),
|
||||
gtsam.Point3(0, 0, 1),
|
||||
|
|
Loading…
Reference in New Issue