CSVROSDataRow Class¶
- class rosdata.utils.datareader.CSVROSDataRow(data: list, fields: list)[source]¶
A helper class to store a single row of data contained within a CSV file created by ROSData tools.
- __init__(data: list, fields: list) None [source]¶
Initialises a CSVROSDataRow object where the class attributes will those contained within the fields argument. For the pose data functions to be accesible the fields argument must contain the strings [‘pos_x’, ‘pos_y’, ‘pos_z’, ‘quat_w’, ‘quat_x’, ‘quat_y’, ‘quat_z’]. Numeric data will be stored as floats, all other data will be stored as strings except for the string ‘none’ which will be stored as None.
- Parameters
data (list) – the values for the provided fields
fields (list) – the names for each field provided within the data
- Raises
ValueError – if the length of the fields and data arguments are not equal.
- get_pose() spatialmath.pose3d.SE3 [source]¶
Will retrieve the pose as a Spatial Maths SE3 object. The pose data must be stored under the headers [‘pos_x’, ‘pos_y’, ‘pos_z’, ‘quat_w’, ‘quat_x’, ‘quat_y’, ‘quat_z’].
- Returns
the pose data as a SE object or None if the pose data does not exist.
- Return type
sm.SE3
- get_pose_data() list [source]¶
Gets the pose data as individual float values. The pose data must be stored under the headers [‘pos_x’, ‘pos_y’, ‘pos_z’, ‘quat_w’, ‘quat_x’, ‘quat_y’, ‘quat_z’].
- Returns
the pose data as a list of floats. Order will be [‘pos_x’, ‘pos_y’, ‘pos_z’, ‘quat_w’, ‘quat_x’, ‘quat_y’, ‘quat_z’].
- Return type
list