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

lunarlab-gatech / robotdataprocess / 20820881882

08 Jan 2026 02:50PM UTC coverage: 62.482% (-12.2%) from 74.672%
20820881882

Pull #10

github

DanielChaseButterfield
Add publish script for OpenVINS
Pull Request #10: (v0.2) Prototype code for ROS2 Publishing, and new ImageDataOnDisk class

181 of 277 branches covered (65.34%)

Branch coverage included in aggregate %.

212 of 546 new or added lines in 11 files covered. (38.83%)

3 existing lines in 2 files now uncovered.

1118 of 1802 relevant lines covered (62.04%)

1.24 hits per line

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

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

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

9
class CoordinateFrame(Enum):
2✔
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
2✔
21
    NED = 1
2✔
22
    ENU = 2
2✔
23
    NONE = 3
2✔
24

25
class ROSMsgLibType(Enum):
2✔
26
    """ 
27
    Enum for different ROS message library types.
28
     
29
    Attributes:
30
        ROSBAGS: Use ROS messages from the rosbags library (Pure Python library).
31
        RCLPY: Use ROS messages from the rclpy library (ROS2 Python client library).
32
        ROSPY: Use ROS messages from the rospy library (ROS1 Python client library).
33
    """
34

35
    ROSBAGS = 0
2✔
36
    RCLPY = 1
2✔
37
    ROSPY = 2
2✔
38

39
class Data:
2✔
40
    """
41
    Generic Data class that provides example methods that should be overwritten by children,
42
    and can run operations between different data types.
43
    """
44

45
    # Define data attributes for all Data classes
46
    frame_id: str
2✔
47
    timestamps: np.ndarray[Decimal]
2✔
48

49
    @typechecked
2✔
50
    def __init__(self, frame_id: str, timestamps: np.ndarray | list):
2✔
51
        
52
        # Copy initial values into attributes
53
        self.frame_id = frame_id
2✔
54
        self.timestamps = col_to_dec_arr(timestamps)
2✔
55

56
        # Check to ensure that all timestamps are sequential
57
        for i in range(len(self.timestamps) - 1):
2✔
58
            if self.timestamps[i] >= self.timestamps[i+1]:
2✔
59
                raise ValueError(f"Timestamps {self.timestamps[i]} and {self.timestamps[i+1]} do not come in sequential order!")
×
60
            
61
    def len(self):
2✔
62
        """ Returns the number of items in this data class """
63
        return len(self.timestamps)
2✔
64
    
65
    @staticmethod
2✔
66
    def get_ros_msg_type(self, libtype: ROSMsgLibType):
2✔
67
        """ Will return the msgtype for the ROS message for this Data object. """
UNCOV
68
        raise NotImplementedError("This method needs to be overwritten by the child Data class!")
×
69
    
70
    def get_ros_msg(self, libtype: ROSMsgLibType, i: int):
2✔
71
        """ Will create and return a ROS message object. """
UNCOV
72
        raise NotImplementedError("This method needs to be overwritten by the child Data class!")
×
73
    
74
    def crop_data(self, start: Decimal, end: Decimal):
2✔
75
        """ Will crop the data so only values within [start, end] inclusive are kept. """
76
        raise NotImplementedError("This method needs to be overwritten by the child Data class!")
×
77

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