evalio.types
Duration
Duration class for representing a positive or negative delta time, uses int64 as the underlying data storage for nanoseconds.
ImuMeasurement
ImuMeasurement is a simple structure for storing an IMU measurement.
ImuParams
ImuParams is a structure for storing the parameters of an IMU
LidarMeasurement
LidarMeasurement is a structure for storing a point cloud measurement, with a timestamp and a vector of points. Note, the stamp always represents the start of the scan. Additionally, the points are always in row major format.
points
property
writable
points: list[Point]
List of points in the point cloud. Note, this is always in row major format.
to_vec_positions
Convert the point cloud to a (n,3) numpy array.
LidarParams
LidarParams is a structure for storing the parameters of a lidar sensor.
num_columns
property
Number of columns in the point cloud, also known as the number of points per scanline.
delta_time
delta_time() -> Duration
Get the time between two consecutive scans as a Duration. Inverse of the rate.
Point
Point is a general point structure in evalio, with common point cloud attributes included.
row
property
writable
Row index of the point in the point cloud. Also known as the scanline index.
t
property
writable
t: Duration
Timestamp of the point as a Duration. In evalio, this is always relative to the point cloud stamp, which occurs at the start of the scan.
__init__
__init__(
*,
x: float = 0,
y: float = 0,
z: float = 0,
intensity: float = 0,
t: Duration = ...,
range: int = 0,
row: int = 0,
col: int = 0,
) -> None
Create a Point from x, y, z, intensity, t, range, row, col
SE3
SE3 class for representing a 3D rigid body transformation using a quaternion and a translation vector. This is outfitted with some basic functionality, but mostly intended for storage and converting between types.
SO3
SO3 class for representing a 3D rotation using a quaternion. This is outfitted with some basic functionality, but mostly intended for storage and converting between types.
Stamp
Stamp class for representing an absolute point in time, uses uint32 as the underlying data storage for seconds and nanoseconds.
Trajectory
dataclass
metadata
class-attribute
instance-attribute
Metadata associated with the trajectory, such as the dataset name or other information.
from_csv
staticmethod
from_csv(
path: Path,
fieldnames: list[str],
delimiter=",",
skip_lines: Optional[int] = None,
) -> Trajectory
Flexible loader for stamped poses stored in csv files.
Will automatically skip any lines that start with a #. Is most useful for loading ground truth data.
from evalio.types import Trajectory
fieldnames = ["sec", "nsec", "x", "y", "z", "qx", "qy", "qz", "qw"]
trajectory = Trajectory.from_csv(path, fieldnames)
Parameters:
-
path
(Path
) –Location of file.
-
fieldnames
(list[str]
) –List of field names to use, in their expected order. See above for an example.
-
delimiter
(str
, default:','
) –Delimiter between elements. Defaults to ",".
-
skip_lines
(int
, default:None
) –Number of lines to skip, useful for skipping headers. Defaults to 0.
Returns:
-
Trajectory
(Trajectory
) –Stored dataset
from_experiment
staticmethod
from_experiment(path: Path) -> Trajectory
Load a saved experiment trajectory from file.
Works identically to from_tum, but also loads metadata from the file.
Parameters:
-
path
(Path
) –Location of trajectory results.
Returns:
-
Trajectory
(Trajectory
) –Loaded trajectory with metadata, stamps, and poses.
from_tum
staticmethod
from_tum(path: Path) -> Trajectory
Load a TUM dataset pose file. Simple wrapper around from_csv.
Parameters:
-
path
(Path
) –Location of file.
Returns:
-
Trajectory
(Trajectory
) –Stored trajectory