19#include "sensorring/platform/SensorringExport.hpp"
86 void updateResolution(
double fov_x_deg,
double fov_y_deg,
unsigned int res_x,
unsigned int res_y);
107 std::vector<double> _lut_x;
108 std::vector<double> _lut_y;
109 std::vector<double> _lut_z;
Pure data structure for depth sensor measurements.
Configuration options for depth-sensing devices (ToF, structured light, etc.).
Parameter structure for the DepthSensor.
Thread-safe, deadlock-free publish/subscribe template.
Base class for all sensor devices, adding measurement synchronisation to Device.
RAII wrapper pairing a SubscriberToken with its cancel function.
void updateResolution(double fov_x_deg, double fov_y_deg, unsigned int res_x, unsigned int res_y)
Update the sensor's FOV and resolution, and recalculate the lookup tables.
virtual void publishMeasurement()
Build a DepthMeasurement from internal state and publish to all subscribers.
const measurement::DepthMeasurement & getLatestMeasurement() const
Get the most recent measurement.
virtual void createLookupTable(DepthSensorConfig config, std::vector< double > &lut_x, std::vector< double > &lut_y, std::vector< double > &lut_z)
Create lookup tables for x and y angles based on FOV and resolution.
virtual const DepthSensorParams & getParams() const =0
Get the current DepthSensor parameters.
measurement::DepthMeasurement MeasurementType
Measurement type produced by this sensor category.
Definition DepthSensor.hpp:41
DepthSensor(DeviceID id, com::ComInterface *interface, com::ComEndpoint target, DepthSensorConfig config)
Construct a DepthSensor with Device params, field-of-view and pixel resolution.
void processRawMeasurement(measurement::PointCloud &pcl)
Calculate the x,y,z coordinates from the raw distance measurements.
subscription::Subscription subscribe(std::function< void(const measurement::DepthMeasurement &)> callback)
Subscribe to depth measurements from this sensor.
Definition DepthSensor.hpp:69
Sensor(DeviceID id, com::ComInterface *interface, com::ComEndpoint target)
Construct the sensor with identity and communication link.
Generic thread-safe publisher that manages callback subscriptions.
Definition Publisher.hpp:37
Move-only RAII wrapper that pairs a SubscriberToken with an unsubscribe callable. Destroying a Subscr...
Definition Subscription.hpp:32
Uniquely identifies a communication endpoint as a (Direction, BoardAddress, DeviceId) tuple.
Definition ComEndpoint.hpp:37
Configuration structure for 3D depth sensors.
Definition DepthSensorConfig.hpp:24
Parameter structure of the DepthSensor.
Definition DepthSensorParams.hpp:25
Identifier for a device: type, human-readable name, and index.
Definition DeviceID.hpp:27
Pure data structure holding a measurement from a depth sensor.
Definition DepthMeasurement.hpp:32
Stores a vector of points in 3D space.
Definition PointCloud.hpp:45