![]() |
NDEVR
API Documentation
|
3D scanner implementation for Intel RealSense depth cameras. More...
Public Member Functions | |
| RealSenseScanner (Model &model, RealSenseScannerConnection *connection, DesignObjectLookup *manager, QObject *parent=nullptr) | |
| Constructs a scanner from an existing model and connection. | |
| RealSenseScanner (RealSenseScannerConnection *connection, DesignObjectLookup *manager, QObject *parent=nullptr) | |
| Constructs a scanner from a connection (creates its own model). | |
| RealSenseScanner (UUID id, DesignObjectLookup *manager, QObject *parent=nullptr) | |
| Constructs a remote scanner by UUID. | |
| virtual | ~RealSenseScanner () |
| Destroys the scanner and releases all resources. | |
| virtual Connection * | connection () const override |
| Returns the connection for this scanner. | |
| Vector< 3, Angle< fltp08 > > | headAngle () const override |
| Returns the current head angle from the motor manager. | |
| virtual Motor * | headMotor (uint01 axis) const override |
| Returns the motor for a given head axis. | |
| virtual bool | isOrientationValid () const override |
| Returns whether the orientation sensor data is valid. | |
| uint04 | meshBlendFactor () const override |
| Returns the mesh blend factor for point cloud meshing. | |
| virtual void | orientHead (const Vector< 3, Angle< fltp08 > > &head_orientation) override |
| Moves the scanner head to the specified orientation. | |
| void | setDeviceType (RealSenseDeviceType device) |
| Sets the device type for this scanner. | |
| void | setupCameraModel () override |
| Sets up the 3D camera model for visualization. | |
| void | setupRSStream (const RealSenseIOSettings &settings) |
| Configures the RealSense streams without starting them. | |
| void | startRSStream (RealSenseIOSettings settings) |
| Starts RealSense streaming with the given settings. | |
| void | updateFW (const Buffer< uint01 > &fw_data) |
| Updates the device firmware from a data buffer. | |
| void | updateFW (File fw_file) |
| Updates the device firmware from a file. | |
Static Public Attributes | |
| static constexpr const char *const | fw_version = "Firmware/D4XX_FW_Image-5.16.0.1.bin" |
| Expected firmware version path. | |
Protected Member Functions | |
| bool | attemptConnection () override |
| Attempts to establish a connection to the RealSense device. | |
| bool | collectPoints () override |
| Collects points from the current depth frame. | |
| bool | finishActiveFrame () |
| Finalizes the active frame and publishes the point cloud. | |
| void | initDevice () |
| Initializes the RealSense device and queries capabilities. | |
| bool | processFrame (const rs2::frame &frame) |
| Processes a single RealSense frame (depth, color, IMU, etc.). | |
| virtual FileRequest | scanModelFile () const override |
| Returns the file request for the scanner 3D model. | |
| virtual Matrix< fltp08 > | scanModelFileTransform () const override |
| Returns the transformation matrix for the scanner 3D model. | |
| void | setupSLAM (const rs2::sensor &sensor, const rs2::video_stream_profile &video_profile, const rs2::video_stream_profile &depth, rs2::stream_profile gyro) |
| Sets up the SLAM engine for visual-inertial tracking. | |
| virtual void | update (Time time) override |
| Performs a periodic update tick. | |
| void | updateIOState () override |
| Updates the IO state (stream settings) if changes are pending. | |
Protected Attributes | |
| RealSenseIOSettings | m_active_io_settings |
| The currently active IO settings. | |
| bool | m_align_to_depth_frame = false |
| Whether to align color to depth frame. | |
| RealSenseScannerConnection * | m_connection = nullptr |
| The device connection. | |
| RealSenseDeviceType | m_device_type = RealSenseDeviceType::e_unknown |
| The detected device type. | |
| File | m_firmware_file |
| Path to firmware file for updates. | |
| rs2::frameset | m_frame_set |
| The current synced frameset. | |
| bool | m_has_imu = false |
| Whether the device has an IMU. | |
| fltp08 | m_last_collect_time = Constant<fltp08>::Invalid |
| Timestamp of last point collection. | |
| RealSenseMotorManager * | m_motor_manager = nullptr |
| The motor manager for head control. | |
| RealSenseIOSettings | m_requested_io_settings |
| The IO settings requested by the user. | |
| rs2::device | m_rs_device |
| The underlying RealSense device handle. | |
| rs2::frameset | m_rs_frame |
| The most recent raw RealSense frameset. | |
| bool | m_rs_streaming_active = false |
| Whether RealSense streaming is active. | |
| uint01 * | m_swap_buffer = nullptr |
| Temporary buffer for data swapping. | |
| rs2::syncer * | m_syncer = nullptr |
| Frame synchronizer for multi-stream alignment. | |
| fltp04 | m_usb_version = Constant<fltp04>::Invalid |
| The USB version of the connection. | |
3D scanner implementation for Intel RealSense depth cameras.
Manages RealSense device streaming, point cloud collection, SLAM integration, firmware updates, and optional motorized head control.
Definition at line 59 of file RealSenseScanner.h.
| RealSenseScanner::RealSenseScanner | ( | Model & | model, |
| RealSenseScannerConnection * | connection, | ||
| DesignObjectLookup * | manager, | ||
| QObject * | parent = nullptr ) |
Constructs a scanner from an existing model and connection.
| [in] | model | The design model for this scanner. |
| [in] | connection | The RealSense device connection. |
| [in] | manager | The design object lookup. |
| [in] | parent | Optional parent QObject. |
References connection().
| RealSenseScanner::RealSenseScanner | ( | RealSenseScannerConnection * | connection, |
| DesignObjectLookup * | manager, | ||
| QObject * | parent = nullptr ) |
Constructs a scanner from a connection (creates its own model).
| [in] | connection | The RealSense device connection. |
| [in] | manager | The design object lookup. |
| [in] | parent | Optional parent QObject. |
References connection().
| RealSenseScanner::RealSenseScanner | ( | UUID | id, |
| DesignObjectLookup * | manager, | ||
| QObject * | parent = nullptr ) |
|
overrideprotected |
Attempts to establish a connection to the RealSense device.
|
overrideprotected |
Collects points from the current depth frame.
|
nodiscardoverridevirtual |
Returns the connection for this scanner.
Referenced by RealSenseScanner(), and RealSenseScanner().
|
protected |
Finalizes the active frame and publishes the point cloud.
Returns the current head angle from the motor manager.
Returns the motor for a given head axis.
| [in] | axis | The axis index. |
|
overridevirtual |
Returns whether the orientation sensor data is valid.
|
inlinenodiscardoverride |
Returns the mesh blend factor for point cloud meshing.
Definition at line 92 of file RealSenseScanner.h.
|
overridevirtual |
Moves the scanner head to the specified orientation.
| [in] | head_orientation | The target orientation angles. |
|
protected |
Processes a single RealSense frame (depth, color, IMU, etc.).
| [in] | frame | The RealSense frame to process. |
|
overrideprotectedvirtual |
Returns the file request for the scanner 3D model.
|
overrideprotectedvirtual |
Returns the transformation matrix for the scanner 3D model.
| void RealSenseScanner::setDeviceType | ( | RealSenseDeviceType | device | ) |
Sets the device type for this scanner.
| [in] | device | The RealSense device type. |
| void RealSenseScanner::setupRSStream | ( | const RealSenseIOSettings & | settings | ) |
Configures the RealSense streams without starting them.
| [in] | settings | The stream settings to configure. |
|
protected |
Sets up the SLAM engine for visual-inertial tracking.
| [in] | sensor | The RealSense sensor providing video data. |
| [in] | video_profile | The video stream profile for SLAM input. |
| [in] | depth | The depth stream profile. |
| [in] | gyro | The gyroscope stream profile. |
| void RealSenseScanner::startRSStream | ( | RealSenseIOSettings | settings | ) |
Starts RealSense streaming with the given settings.
| [in] | settings | The stream settings to start with. |
|
overrideprotectedvirtual |
Performs a periodic update tick.
| [in] | time | The current system time. |
Updates the device firmware from a data buffer.
| [in] | fw_data | The firmware binary data. |
| void RealSenseScanner::updateFW | ( | File | fw_file | ) |
Updates the device firmware from a file.
| [in] | fw_file | The firmware file to flash. |