opt flow: fix msg naming

optical_flow got replaced by sensor_optical_flow and vehicle_optical_flow
This commit is contained in:
bresch 2023-09-11 11:47:49 +02:00 committed by Daniel Agar
parent f2bb548b27
commit 78eb0cdb72
2 changed files with 7 additions and 7 deletions

View File

@ -22,14 +22,14 @@ def getVioData(ulog: ULog) -> pd.DataFrame:
def getOpticalFlowData(ulog: ULog) -> pd.DataFrame:
optical_flow = ulog.get_dataset("optical_flow").data
optical_flow = ulog.get_dataset("vehicle_optical_flow").data
flow = pd.DataFrame({'timestamp': optical_flow['timestamp'],
'sensor' : 'flow',
'pixel_flow_x_integral': optical_flow["pixel_flow_x_integral"],
'pixel_flow_y_integral': optical_flow["pixel_flow_y_integral"],
'gyro_x_rate_integral': optical_flow["gyro_x_rate_integral"],
'gyro_y_rate_integral': optical_flow["gyro_y_rate_integral"],
'gyro_z_rate_integral': optical_flow["gyro_z_rate_integral"],
'pixel_flow_x': optical_flow["pixel_flow[0]"],
'pixel_flow_y': optical_flow["pixel_flow[1]"],
'delta_angle_x': optical_flow["delta_angle[0]"],
'delta_angle_y': optical_flow["delta_angle[1]"],
'delta_angle_z': optical_flow["delta_angle[2]"],
'quality': optical_flow["quality"]
})
return flow

View File

@ -330,7 +330,7 @@ void LoggedTopics::add_estimator_replay_topics()
// current EKF2 subscriptions
add_topic("airspeed");
add_topic("optical_flow");
add_topic("vehicle_optical_flow");
add_topic("sensor_combined");
add_topic("sensor_selection");
add_topic("vehicle_air_data");