Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crash while plotting corrected vehicle/wheel speeds. #259

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/fusion_engine_client/analysis/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ def plot_dop(self):
mode='markers', marker={'color': color_by_dop[name]}),
1, 1)

self._add_figure(name='dilution_of_precision', figure=figure, title='Dilution of Precision vs. Time')
self._add_figure(name='gnss_dop', figure=figure, title='GNSS Dilution of Precision (DOP) vs. Time')

def plot_gnss_corrections_status(self):
"""!
Expand Down
18 changes: 18 additions & 0 deletions python/fusion_engine_client/messages/measurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def to_numpy(cls, messages):
'gyro_rps': np.array([m.gyro_rps for m in messages]).T,
'gyro_std_rps': np.array([m.gyro_std_rps for m in messages]).T,
}

# For convenience and consistency with raw measurement messages, we artificially create the following fields
# from MeasurementDetails:
result['measurement_time_source'] = np.full_like(result['p1_time'], SystemTimeSource.P1_TIME)
result['measurement_time'] = result['p1_time'] # No need to copy, reference is fine here.

return result

@classmethod
Expand Down Expand Up @@ -236,6 +242,12 @@ def to_numpy(cls, messages):
'rear_left_speed_mps': np.array([m.rear_left_speed_mps for m in messages]),
'rear_right_speed_mps': np.array([m.rear_right_speed_mps for m in messages]),
}

# For convenience and consistency with raw measurement messages, we artificially create the following fields
# from MeasurementDetails:
result['measurement_time_source'] = np.full_like(result['p1_time'], SystemTimeSource.P1_TIME)
result['measurement_time'] = result['p1_time'] # No need to copy, reference is fine here.

return result


Expand Down Expand Up @@ -397,6 +409,12 @@ def to_numpy(cls, messages):
'is_signed': np.array([m.is_signed() for m in messages], dtype=bool),
'vehicle_speed_mps': np.array([m.vehicle_speed_mps for m in messages]),
}

# For convenience and consistency with raw measurement messages, we artificially create the following fields
# from MeasurementDetails:
result['measurement_time_source'] = np.full_like(result['p1_time'], SystemTimeSource.P1_TIME)
result['measurement_time'] = result['p1_time'] # No need to copy, reference is fine here.

return result


Expand Down
Loading