2 A structure-from-motion example with landmarks 3 - The landmarks form a 10 meter cube 4 - The robot rotates around the landmarks, always facing towards the cube 8 from typing
import List
13 from gtsam
import Cal3_S2, Point3, Pose3
21 Point3(-10.0, -10.0, 10.0),
24 Point3(-10.0, 10.0, -10.0),
25 Point3(-10.0, -10.0, -10.0),
26 Point3(10.0, -10.0, -10.0),
32 """Generate a set of ground-truth camera poses arranged in a circle about the origin.""" 35 angles = np.linspace(0, 2 * np.pi, 8, endpoint=
False)
40 position =
gtsam.Point3(radius * np.cos(theta), radius * np.sin(theta), height)
41 camera = gtsam.PinholeCameraCal3_S2.Lookat(position, target, up, K)
42 poses.append(camera.pose())