diff --git a/Mapping.py b/Mapping.py index 59409dc..9dcbbff 100644 --- a/Mapping.py +++ b/Mapping.py @@ -79,10 +79,12 @@ def convertFeaturesLocalToGlobal( # Then we need to convert to meters featurePointsGlobal *= RANGE_RESOLUTION_CART_M # px * (m/px) = m + # Center origin at pose center + # Rotate and translate to make into global coordinate system R = getRotationMatrix(th) t = np.array([x, y]).reshape(2, 1) - featurePointsGlobal = (R @ featurePointsGlobal.T + t).T + featurePointsGlobal = (R @ (featurePointsGlobal.T + t)).T return featurePointsGlobal @@ -198,8 +200,8 @@ def plot(self, fig: plt.figure, show: bool = False): for kf in self.keyframes: points_local = kf.featurePointsLocal points_global = kf.convertFeaturesLocalToGlobal(points_local) - - plt.plot(points_global, marker='+', color='red',label='Map Points') + + plt.scatter(points_global[:, 0], points_global[:, 1], marker='+', color='red',label='Map Points') if show: plt.show() diff --git a/img/roam_mapping/tiny_traj.mp4 b/img/roam_mapping/tiny_traj.mp4 new file mode 100644 index 0000000..9e5cd2b Binary files /dev/null and b/img/roam_mapping/tiny_traj.mp4 differ diff --git a/img/roam_mapping/tiny_traj/0001.jpg b/img/roam_mapping/tiny_traj/0001.jpg new file mode 100644 index 0000000..9f8ee7e Binary files /dev/null and b/img/roam_mapping/tiny_traj/0001.jpg differ diff --git a/img/roam_mapping/tiny_traj/0002.jpg b/img/roam_mapping/tiny_traj/0002.jpg new file mode 100644 index 0000000..d03baae Binary files /dev/null and b/img/roam_mapping/tiny_traj/0002.jpg differ diff --git a/img/roam_mapping/tiny_traj/0003.jpg b/img/roam_mapping/tiny_traj/0003.jpg new file mode 100644 index 0000000..00aecc1 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0003.jpg differ diff --git a/img/roam_mapping/tiny_traj/0004.jpg b/img/roam_mapping/tiny_traj/0004.jpg new file mode 100644 index 0000000..905cf01 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0004.jpg differ diff --git a/img/roam_mapping/tiny_traj/0005.jpg b/img/roam_mapping/tiny_traj/0005.jpg new file mode 100644 index 0000000..e72978d Binary files /dev/null and b/img/roam_mapping/tiny_traj/0005.jpg differ diff --git a/img/roam_mapping/tiny_traj/0006.jpg b/img/roam_mapping/tiny_traj/0006.jpg new file mode 100644 index 0000000..5eb3226 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0006.jpg differ diff --git a/img/roam_mapping/tiny_traj/0007.jpg b/img/roam_mapping/tiny_traj/0007.jpg new file mode 100644 index 0000000..fcce2d2 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0007.jpg differ diff --git a/img/roam_mapping/tiny_traj/0008.jpg b/img/roam_mapping/tiny_traj/0008.jpg new file mode 100644 index 0000000..6a6c762 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0008.jpg differ diff --git a/img/roam_mapping/tiny_traj/0009.jpg b/img/roam_mapping/tiny_traj/0009.jpg new file mode 100644 index 0000000..0ed1188 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0009.jpg differ diff --git a/img/roam_mapping/tiny_traj/0010.jpg b/img/roam_mapping/tiny_traj/0010.jpg new file mode 100644 index 0000000..8725796 Binary files /dev/null and b/img/roam_mapping/tiny_traj/0010.jpg differ