evalio.types
Classes:
- 
          Duration–Duration class for representing a positive or negative delta time. 
- 
          Experiment–An experiment is a single run of a pipeline on a dataset. 
- 
          ExperimentStatus–Status of the experiment. 
- 
          FailedMetadataParse–Exception raised when metadata parsing fails. 
- 
          GroundTruth–Metadata for ground truth trajectories. 
- 
          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. 
- 
          LidarParams–LidarParams is a structure for storing the parameters of a lidar sensor. 
- 
          Metadata–Base class for metadata associated with a trajectory. 
- 
          Point–Point is the general point structure in evalio, with common point cloud attributes included. 
- 
          SE3–SE3 class for representing a 3D rigid body transformation using a quaternion and a translation vector. 
- 
          SO3–SO3 class for representing a 3D rotation using a quaternion. 
- 
          Stamp–Stamp class for representing an absolute point in time. 
- 
          Trajectory–A trajectory of poses with associated timestamps and metadata. 
Attributes:
- 
          Param–A parameter value for a pipeline, can be a bool, int, float, or str. 
module-attribute
  
    A parameter value for a pipeline, can be a bool, int, float, or str.
    Duration class for representing a positive or negative delta time.
Uses int64 as the underlying data storage for nanoseconds.
Methods:
- 
            __add__–Add two Durations 
- 
            __eq__–Check for equality 
- 
            __gt__–Compare two Durations 
- 
            __lt__–Compare two Durations 
- 
            __ne__–Check for inequality 
- 
            __sub__–Compute the difference between two Durations 
- 
            from_nsec–Create a Duration from nanoseconds 
- 
            from_sec–Create a Duration from seconds 
- 
            to_nsec–Convert to nanoseconds 
- 
            to_sec–Convert to seconds 
Attributes:
- 
          nsec(int) –Underlying nanoseconds representation 
Source code in python/evalio/_cpp/types.pyi
                
dataclass
  
    
              Bases: Metadata
An experiment is a single run of a pipeline on a dataset.
It contains all the information needed to reproduce the run, including the pipeline parameters, dataset, and status.
Methods:
- 
            from_pl_ds–Create an Experiment from a pipeline and dataset. 
- 
            setup–Setup the experiment by initializing the pipeline and dataset. 
Attributes:
- 
          max_elapsed(Optional[float]) –Maximum time taken for a single step in the experiment, as a string. 
- 
          name(str) –Name of the experiment. 
- 
          pipeline(str | type[Pipeline]) –Pipeline used to generate the trajectory. 
- 
          pipeline_params(dict[str, Param]) –Parameters used for the pipeline. 
- 
          pipeline_version(str) –Version of the pipeline used. 
- 
          sequence(str | Dataset) –Dataset used to run the experiment. 
- 
          sequence_length(int) –Length of the sequence 
- 
          status(ExperimentStatus) –Status of the experiment, e.g. "success", "failure", etc. 
- 
          total_elapsed(Optional[float]) –Total time taken for the experiment, as a string. 
Source code in python/evalio/types/extended.py
                | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |  | 
class-attribute
      instance-attribute
  
    Maximum time taken for a single step in the experiment, as a string.
instance-attribute
  
pipeline: str | type[Pipeline]
Pipeline used to generate the trajectory.
instance-attribute
  
pipeline_params: dict[str, Param]
Parameters used for the pipeline.
class-attribute
      instance-attribute
  
status: ExperimentStatus = NotRun
Status of the experiment, e.g. "success", "failure", etc.
class-attribute
      instance-attribute
  
    Total time taken for the experiment, as a string.
classmethod
  
    Create an Experiment from a pipeline and dataset.
Parameters:
- 
            pipe(type[Pipeline]) –The pipeline class. 
- 
            ds_obj(Dataset) –The dataset object. 
- 
            **kwargs(Any, default:{}) –Additional keyword arguments to pass to the Experiment constructor. 
Returns:
- 
Self(Self) –The created Experiment instance. 
Source code in python/evalio/types/extended.py
              
setup() -> (
    tuple[Pipeline, Dataset]
    | SequenceNotFound
    | PipelineNotFound
)
Setup the experiment by initializing the pipeline and dataset.
Parameters:
- 
            self(Experiment) –The experiment instance. 
Returns:
- 
              tuple[Pipeline, Dataset] | SequenceNotFound | PipelineNotFound–Tuple containing the initialized pipeline and dataset, or an error if the pipeline or dataset could not be found or configured. 
Source code in python/evalio/types/extended.py
              
    
    
              Bases: Exception
Exception raised when metadata parsing fails.
Source code in python/evalio/types/base.py
                
              
dataclass
  
    
    ImuMeasurement is a simple structure for storing an IMU measurement.
Methods:
Attributes:
- 
          accel(NDArray[float64]) –Accelerometer measurement as a 3D vector. 
- 
          gyro(NDArray[float64]) –Gyroscope measurement as a 3D vector. 
- 
          stamp(Stamp) –Timestamp of the IMU measurement. 
Source code in python/evalio/_cpp/types.pyi
                
    
    ImuParams is a structure for storing the parameters of an IMU
Methods:
- 
            down–Simple helper for initializing with a downgravity vector.
- 
            up–Simple helper for initializing with an upgravity vector.
Attributes:
- 
          accel(float) –Accelerometer standard deviation, in m/s^2/sqrt(Hz). 
- 
          accel_bias(float) –Accelerometer bias standard deviation, in m/s^3/sqrt(Hz). 
- 
          bias_init(float) –Initial bias standard deviation. 
- 
          brand(str) –Brand of the IMU sensor. 
- 
          gravity(NDArray[float64]) –Gravity vector as a 3D vector. 
- 
          gyro(float) –Gyroscope standard deviation, in rad/s/sqrt(Hz). 
- 
          gyro_bias(float) –Gyroscope bias standard deviation, in rad/s^2/sqrt(Hz). 
- 
          integration(float) –Integration standard deviation. 
- 
          model(str) –Model of the IMU sensor. 
Source code in python/evalio/_cpp/types.pyi
                
staticmethod
  
down() -> ImuParams
    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.
Methods:
- 
            __eq__–Check for equality 
- 
            __ne__–Check for inequality 
- 
            to_vec_positions–Convert the point cloud to a (n,3) numpy array. 
- 
            to_vec_stamps–Convert the point stamps to a list of durations. 
Attributes:
- 
          points(list[Point]) –List of points in the point cloud. Note, this is always in row major format. 
- 
          stamp(Stamp) –Timestamp of the point cloud, always at the start of the scan. 
Source code in python/evalio/_cpp/types.pyi
                
property
      writable
  
points: list[Point]
List of points in the point cloud. Note, this is always in row major format.
    
    
    
    LidarParams is a structure for storing the parameters of a lidar sensor.
Methods:
- 
            delta_time–Get the time between two consecutive scans as a Duration. Inverse of the rate. 
Attributes:
- 
          brand(str) –Brand of the lidar sensor. 
- 
          max_range(float) –Maximum range of the lidar sensor, in meters. 
- 
          min_range(float) –Minimum range of the lidar sensor, in meters. 
- 
          model(str) –Model of the lidar sensor. 
- 
          num_columns(int) –Number of columns in the point cloud, also known as the number of points per scanline. 
- 
          num_rows(int) –Number of rows in the point cloud, also known as the scanlines. 
- 
          rate(float) –Rate of the lidar sensor, in Hz. 
Source code in python/evalio/_cpp/types.pyi
                
property
  
    Number of columns in the point cloud, also known as the number of points per scanline.
dataclass
  
    Base class for metadata associated with a trajectory.
Methods:
- 
            from_dict–Create an instance of the metadata class from a dictionary. 
- 
            from_yaml–Create an instance of the metadata class from a YAML string. 
- 
            tag–Get the tag for the metadata class. Will be used for serialization and deserialization. 
- 
            to_dict–Convert the metadata instance to a dictionary. 
- 
            to_yaml–Convert the metadata instance to a YAML string. 
Attributes:
- 
          file(Optional[Path]) –File where the metadata was loaded to and from, if any. 
Source code in python/evalio/types/base.py
                
class-attribute
      instance-attribute
  
    File where the metadata was loaded to and from, if any.
classmethod
  
    Create an instance of the metadata class from a dictionary.
Parameters:
- 
            data(dict[str, Any]) –The dictionary containing the metadata. 
Returns:
- 
              Self–An instance of the metadata class. 
Source code in python/evalio/types/base.py
              
classmethod
  
from_yaml(yaml_str: str) -> Metadata | FailedMetadataParse
Create an instance of the metadata class from a YAML string.
Will return the appropriate subclass based on the "type" field in the YAML.
Parameters:
- 
            yaml_str(str) –The YAML string containing the metadata. 
Returns:
- 
              Metadata | FailedMetadataParse–An instance of the metadata class or an error. 
Source code in python/evalio/types/base.py
              
classmethod
  
    Get the tag for the metadata class. Will be used for serialization and deserialization.
Returns:
- 
              str–The tag for the metadata class. 
    Convert the metadata instance to a dictionary.
Returns:
- 
              dict[str, Any]–The dictionary representation of the metadata. 
Source code in python/evalio/types/base.py
              
    Convert the metadata instance to a YAML string.
Returns:
- 
              str–The YAML representation of the metadata. 
    Point is the general point structure in evalio, with common point cloud attributes included.
Methods:
- 
            __eq__–Check for equality 
- 
            __init__–Create a Point from x, y, z, intensity, t, range, row, col 
- 
            __ne__–Check for inequality 
Attributes:
- 
          col(int) –Column index of the point in the point cloud. 
- 
          intensity(float) –Intensity value as a float. 
- 
          range(int) –Range value as a uint32. 
- 
          row(int) –Row index of the point in the point cloud. Also known as the scanline index. 
- 
          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. 
- 
          x(float) –X coordinate 
- 
          y(float) –Y coordinate 
- 
          z(float) –Z coordinate 
Source code in python/evalio/_cpp/types.pyi
                | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |  | 
property
      writable
  
    Row index of the point in the point cloud. Also known as the scanline index.
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__(
    *,
    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 class for representing a 3D rigid body transformation using a quaternion and a translation vector.
This is outfitted with some basic functionality, but is mostly intended for storage and converting between types.
Methods:
- 
            __eq__–Check for equality 
- 
            __mul__–Compose two rigid body transformations. 
- 
            __ne__–Check for inequality 
- 
            distance–Compute the distance between two SE3s. 
- 
            error–Compute the rotational (degrees) and translational (meters) error between two SE3s as a tuple (rot, trans). 
- 
            exp–Create a SE3 from a 3D vector. 
- 
            fromMat–Create a SE3 from a 4x4 transformation matrix. 
- 
            identity–Create an identity SE3. 
- 
            inverse–Compute the inverse. 
- 
            log–Compute the logarithm of the transformation. 
- 
            toMat–Convert to a 4x4 matrix. 
Attributes:
Source code in python/evalio/_cpp/types.pyi
                
    
    
    
staticmethod
  
    
staticmethod
  
    Compute the rotational (degrees) and translational (meters) error between two SE3s as a tuple (rot, trans).
staticmethod
  
exp(xi: NDArray[float64]) -> SE3
staticmethod
  
fromMat(mat: NDArray[float64]) -> SE3
staticmethod
  
identity() -> SE3
inverse() -> SE3
    
    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.
Methods:
- 
            __eq__–Check for equality 
- 
            __mul__–Compose two rotations. 
- 
            __ne__–Check for inequality 
- 
            exp–Create a rotation from a 3D vector. 
- 
            fromMat–Create a rotation from a 3x3 rotation matrix. 
- 
            identity–Create an identity rotation. 
- 
            inverse–Compute the inverse of the rotation. 
- 
            log–Compute the logarithm of the rotation. 
- 
            rotate–Rotate a 3D vector by the rotation. 
- 
            toMat–Convert the rotation to a 3x3 matrix. 
Attributes:
- 
          qw(float) –Scalar component of the quaternion. 
- 
          qx(float) –X component of the quaternion. 
- 
          qy(float) –Y component of the quaternion. 
- 
          qz(float) –Z component of the quaternion. 
Source code in python/evalio/_cpp/types.pyi
                
    Stamp class for representing an absolute point in time.
Uses uint32 as the underlying data storage for seconds and nanoseconds.
Methods:
- 
            __add__–Add a Duration to a Stamp 
- 
            __eq__–Check for equality 
- 
            __gt__–Compare two Stamps to see which happened first 
- 
            __lt__–Compare two Stamps to see which happened first 
- 
            __ne__–Check for inequality 
- 
            from_nsec–Create a Stamp from nanoseconds 
- 
            from_sec–Create a Stamp from seconds 
- 
            to_nsec–Convert to nanoseconds 
- 
            to_sec–Convert to seconds 
Attributes:
Source code in python/evalio/_cpp/types.pyi
                
dataclass
  
    
              Bases: Generic[M]
A trajectory of poses with associated timestamps and metadata.
Methods:
- 
            __getitem__–Get a (stamp, pose) pair by index. 
- 
            __iter__–Iterate over the trajectory. 
- 
            __len__–Get the length of the trajectory. 
- 
            append–Append a new pose to the trajectory. 
- 
            close–Close the CSV file if it was opened with open. 
- 
            from_csv–Flexible loader for stamped poses stored in csv files. 
- 
            from_file–Load a saved evalio trajectory from file. 
- 
            from_tum–Load a TUM dataset pose file. Simple wrapper around from_csv. 
- 
            open–Open a CSV file for writing. 
- 
            rewrite–Update the contents of an open file. 
- 
            to_file–Save the trajectory to a CSV file. 
- 
            transform_in_place–Apply a transformation to all poses in the trajectory. 
Attributes:
- 
          metadata(M) –Metadata associated with the trajectory, such as the dataset name or other information. 
- 
          poses(list[SE3]) –List of poses, in the same order as the timestamps. 
- 
          stamps(list[Stamp]) –List of timestamps for each pose. 
Source code in python/evalio/types/base.py
                | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |  | 
class-attribute
      instance-attribute
  
    Metadata associated with the trajectory, such as the dataset name or other information.
class-attribute
      instance-attribute
  
poses: list[SE3] = field(default_factory=list)
List of poses, in the same order as the timestamps.
class-attribute
      instance-attribute
  
stamps: list[Stamp] = field(default_factory=list)
List of timestamps for each pose.
    Get a (stamp, pose) pair by index.
Parameters:
- 
            idx(int) –The index of the (stamp, pose) pair. 
Returns:
Source code in python/evalio/types/base.py
              
            
    Iterate over the trajectory.
Returns:
    Get the length of the trajectory.
Returns:
- 
              int–The number of (stamp, pose) pairs in the trajectory. 
    Append a new pose to the trajectory.
Will also write to file if the trajectory was opened with open.
Parameters:
Source code in python/evalio/types/base.py
              
    Close the CSV file if it was opened with open.
Source code in python/evalio/types/base.py
              
            
staticmethod
  
from_csv(
    path: Path,
    fieldnames: list[str],
    delimiter: str = ",",
    skip_lines: int = 0,
) -> Trajectory
Flexible loader for stamped poses stored in csv files.
Will automatically skip any lines that start with a #.
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:0) –Number of lines to skip, useful for skipping headers. Defaults to 0. 
Returns:
- 
              Trajectory–Stored trajectory 
Source code in python/evalio/types/base.py
              
staticmethod
  
from_file(
    path: Path,
) -> (
    Trajectory[Metadata]
    | FailedMetadataParse
    | FileNotFoundError
)
Load a saved evalio trajectory from file.
Works identically to from_tum, but also loads metadata from the file.
Parameters:
- 
            path(Path) –Location of trajectory results. 
Returns:
- 
              Trajectory[Metadata] | FailedMetadataParse | FileNotFoundError–Loaded trajectory with metadata, stamps, and poses. 
Source code in python/evalio/types/base.py
              
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–Stored trajectory 
Source code in python/evalio/types/base.py
              
    Open a CSV file for writing.
This will overwrite any existing file. If no path is provided, will use the path in the metadata, if it exists.
Parameters:
- 
            path(Optional[Path], default:None) –Path to the CSV file. Defaults to None. 
Source code in python/evalio/types/base.py
              
    Update the contents of an open file.
Source code in python/evalio/types/base.py
              
    Save the trajectory to a CSV file.
Parameters:
- 
            path(Optional[Path], default:None) –Path to the CSV file. If not specified, utilizes the path in the metadata, if it exists. Defaults to None.