• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lunarlab-gatech / robotdataprocess / 20172884498

12 Dec 2025 04:18PM UTC coverage: 74.672% (+1.2%) from 73.457%
20172884498

push

github

web-flow
(v0.1.2) Path Metrics & Transformations, Python >=3.8 Support

269 of 364 new or added lines in 8 files covered. (73.9%)

6 existing lines in 4 files now uncovered.

1082 of 1449 relevant lines covered (74.67%)

0.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.67
/src/robotdataprocess/data_types/Data.py
1
from __future__ import annotations
1✔
2

3
from ..conversion_utils import col_to_dec_arr
1✔
4
from decimal import Decimal
1✔
5
from enum import Enum
1✔
6
import numpy as np
1✔
7
from typeguard import typechecked
1✔
8

9
class CoordinateFrame(Enum):
1✔
10
    """ 
11
    Enum for different coordinate frames used in robotics. 
12
    
13
    Attributes:
14
        FLU: X forward, Y left, Z up := RHS
15
        NED: X forward (north), Y right (east), Z down := RHS
16
        ENU: X right (east), Y forward (north), Z up := RHS
17
        NONE: No defined coordinate frame.
18
    """
19

20
    FLU = 0
1✔
21
    NED = 1
1✔
22
    ENU = 2
1✔
23
    NONE = 3
1✔
24

25

26
class Data:
1✔
27
    """
28
    Generic Data class that provides example methods that should be overwritten by children,
29
    and can run operations between different data types.
30
    """
31

32
    # Define data attributes for all Data classes
33
    frame_id: str
1✔
34
    timestamps: np.ndarray[Decimal]
1✔
35

36
    @typechecked
1✔
37
    def __init__(self, frame_id: str, timestamps: np.ndarray | list, ):
1✔
38
        
39
        # Copy initial values into attributes
40
        self.frame_id = frame_id
1✔
41
        self.timestamps = col_to_dec_arr(timestamps)
1✔
42

43
        # Check to ensure that all timestamps are sequential
44
        for i in range(len(self.timestamps) - 1):
1✔
45
            if self.timestamps[i] >= self.timestamps[i+1]:
1✔
UNCOV
46
                raise ValueError(f"Timestamps {self.timestamps[i]} and {self.timestamps[i+1]} do not come in sequential order!")
×
47
            
48
    def len(self):
1✔
49
        """ Returns the number of items in this data class """
50
        return len(self.timestamps)
1✔
51
    
52
    @staticmethod
1✔
53
    def get_ros_msg_type():
1✔
54
        """ Will return the msgtype needed to add a connetion to a rosbag writer. """
55
        raise NotImplementedError("This method needs to be overwritten by the child Data class!")
×
56
    
57
    def get_ros_msg(self, i: int):
1✔
58
        """ Will return a ROS message object ready to be written into a ROS2 Humble bag. """
59
        raise NotImplementedError("This method needs to be overwritten by the child Data class!")
×
60
    
61
    def crop_data(self, start: Decimal, end: Decimal):
1✔
62
        """ Will crop the data so only values within [start, end] inclusive are kept. """
NEW
63
        raise NotImplementedError("This method needs to be overwritten by the child Data class!")
×
64

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc