Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion slam/vio_slam.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def initial_state():
gtsam.Point3(0.878612, 2.142470, 0.947262))
true_vel = np.array([0.009474,-0.014009,-0.002145])
true_bias = gtsam.imuBias.ConstantBias(np.array([-0.012492,0.547666,0.069073]), np.array([-0.002229,0.020700,0.076350]))
naive_pose = gtsam.Pose3.identity()
# naive_pose = gtsam.Pose3.identity()
naive_pose = gtsam.Pose3.Identity()
naive_vel = np.zeros(3)
naive_bias = gtsam.imuBias.ConstantBias()
initial_pose = true_world_T_imu_t0
Expand Down
4 changes: 2 additions & 2 deletions slam/visual_frontends/visual_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def lietorch_pose_to_gtsam(pose : lietorch.SE3):

def gtsam_pose_to_torch(pose: gtsam.Pose3, device, dtype):
t = pose.translation()
q = pose.rotation().quaternion()
return torch.tensor([t[0], t[1], t[2], q[1], q[2], q[3], q[0]], device=device, dtype=dtype)
q = pose.rotation().toQuaternion()
return torch.tensor([t[0], t[1], t[2], q.x(), q.y(), q.z(), q.w()], device=device, dtype=dtype)

class VisualFrontend(nn.Module):
def __init__(self):
Expand Down