Commit 66aced55 authored by czb5793's avatar czb5793
Browse files

Comments

parent 3f495e40
...@@ -47,7 +47,7 @@ class SlamEvaluation2: ...@@ -47,7 +47,7 @@ class SlamEvaluation2:
def __find_distance_by_landmark_id(self, slam_obstacle, obstacles): def __find_distance_by_landmark_id(self, slam_obstacle, obstacles):
""" """
Finds the distance of the estimated obstacle to the actual obstacle regarding its identifier Finds the distance of the estimated obstacle to the actual obstacle regarding its identifiers
:param slam_obstacle: An estimated obstacle position of a SLAM algorithm :param slam_obstacle: An estimated obstacle position of a SLAM algorithm
:param obstacles: The list of actual obstacles in the map :param obstacles: The list of actual obstacles in the map
:return: Distance of estimated obstacle to the actual obstacle :return: Distance of estimated obstacle to the actual obstacle
......
...@@ -9,6 +9,7 @@ class Edge: ...@@ -9,6 +9,7 @@ class Edge:
def __init__(self, id_vertex1, id_vertex2, z, information, list_vertices): def __init__(self, id_vertex1, id_vertex2, z, information, list_vertices):
""" """
A Edge class. It is a component of a graph
:param id_vertex1: id of previous vertex :param id_vertex1: id of previous vertex
:param id_vertex2: id of current vertex :param id_vertex2: id of current vertex
:param z: actual measurement obtained by sensor :param z: actual measurement obtained by sensor
......
...@@ -6,12 +6,17 @@ import numpy as np ...@@ -6,12 +6,17 @@ import numpy as np
class Vertex: class Vertex:
def __init__(self, pose, sigma, observation = None): def __init__(self, pose, sigma, observation = None):
"""
self.id = -1 A vertex class. It is a component of a graph
:param pose: a vector of pose
:param sigma: a covariance matrix, uncertainty of measurement
:param observation: sensor observation
"""
self.id = -1 # identifier of a vertex
self.pose = np.copy(pose) self.pose = np.copy(pose)
self.observation = np.copy(observation) self.observation = np.copy(observation)
self.sigma = np.copy(sigma) self.sigma = np.copy(sigma)
self.dim = pose.shape[0] # dimension of the pose vector self.dim = pose.shape[0] # dimension of the pose vector # vector dimension.
def update_pose(self, pose): def update_pose(self, pose):
self.pose = pose self.pose = pose
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment