-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Somehow, for the radar return type you can have a very elegant way of selecting the Radar object among the result tuple. See https://github.com/ethz-asl/mav_sensors/blob/master/src/impl/radar/xwr18xx_mmw_demo.cpp#L96-L99
std::get<Radar>(measurement).cfar_detections.resize(num_detected_obj);
std::get<Radar>(measurement).unix_stamp_ns =
std::chrono::duration_cast<std::chrono::nanoseconds>(now.time_since_epoch()).count();
std::get<Radar>(measurement).hardware_stamp = time_cpu_cycles;
However, the same does not seem to work for Temperature and Pressure. Would be nice to do for example
auto measurements = bmp390.read();
LOG(I, std::get<FluidPressure>(measurements).has_value(),
"Pressure: " << std::get<FluidPressure>(measurements).value() << " Pa");
instead of selecting by index, as this can lead to wrong indexing, see https://github.com/ethz-asl/mav_sensors/blob/master/src/main.cpp#L24C1-L35
Metadata
Metadata
Assignees
Labels
No labels