Skip to content
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
47 changes: 0 additions & 47 deletions include/librealsense2/h/rs_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,53 +280,6 @@ const char* rs2_get_failed_args (const rs2_error* error);
const char* rs2_get_error_message (const rs2_error* error);
void rs2_free_error (rs2_error* error);

#pragma pack(push, 1)
/* rs2_calibration_roi - Array of four corners in Deph Frame Coordinate system that define a closed simple quadrangle (non-intersecting)*/
typedef struct rs2_calibration_roi
{
uint16_t mask_pixel[4][2];
}rs2_calibration_roi;

typedef struct float3_row_major { float x, y, z; } float3_row_major;
typedef struct float3x3_row_major { float3_row_major x, y, z; } float3x3_row_major;

typedef struct rs2_extrinsics_row_major
{
float3x3_row_major rotation; // Rotation matrix
float3_row_major translation; // Metric units
} rs2_extrinsics_row_major;

typedef struct rs2_calibration_config
{
uint8_t calib_roi_num_of_segments; // Within 0-4 range: 0 - Default.No limitations.Full FOV can be used in TC
// 1 - 4: Segments defined.The segment must be sequential
rs2_calibration_roi roi[4]; // Segment 0 = convex tetragon - The vertices of the tetragon are ordered clockwise
// Vertex = [x, y] = pixel coordinates in the reference depth map
// 0 - based coordinates : [0, 0] = center of the top - left pixel
// Segments 1-3 - structured identical to segment_#0 (reserved)
// The ROI segments can intersect, but each must be convex(angles <= 180 degrees).
uint8_t reserved1[12];
rs2_extrinsics_row_major camera_position;
uint8_t reserved2[300];
uint8_t crypto_signature[32];
uint8_t reserved3[39];
} rs2_calibration_config;

typedef struct rs2_calibration_config_header
{
uint16_t version; // major.minor. Big-endian
uint16_t table_type; // type
uint32_t table_size; // full size including: header footer
uint32_t calib_version; // major.minor.index
uint32_t crc32; // crc of all the data in table excluding this header/CRC
} rs2_calibration_config_header;

typedef struct rs2_calibration_config_with_header
{
rs2_calibration_config_header header;
rs2_calibration_config payload;
} rs2_calibration_config_with_header;
#pragma pack(pop)

#ifdef __cplusplus
}
Expand Down
5 changes: 0 additions & 5 deletions include/librealsense2/hpp/rs_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,4 @@ namespace rs2
inline std::ostream & operator << (std::ostream & o, rs2_vector v) { return o << v.x << ", " << v.y << ", " << v.z; }
inline std::ostream & operator << (std::ostream & o, rs2_quaternion q) { return o << q.x << ", " << q.y << ", " << q.z << ", " << q.w; }

inline bool operator==(rs2_calibration_config const& self, rs2_calibration_config const& other)
{
return !std::memcmp(&self, &other, sizeof(rs2_calibration_config));
}

#endif // LIBREALSENSE_RS2_TYPES_HPP
17 changes: 0 additions & 17 deletions src/ds/d500/d500-debug-protocol-calibration-engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,6 @@ std::vector<uint8_t> d500_debug_protocol_calibration_engine::run_triggered_calib
return _dev->send_receive_raw_data(cmd);
}

static std::vector<uint8_t> add_header_to_calib_config(const rs2_calibration_config& calib_config)
{
// calculate CRC
uint32_t computed_crc32 = rsutils::number::calc_crc32(reinterpret_cast<const uint8_t*>(&calib_config),
sizeof(rs2_calibration_config));

// prepare vector of data to be sent (header + sp)
rs2_calibration_config_with_header calib_config_with_header;
uint16_t version = ((uint16_t)0x01 << 8) | 0x01; // major=0x01, minor=0x01 --> ver = major.minor
uint32_t calib_version = 0; // ignoring this field, as requested by sw architect
calib_config_with_header.header = { version, static_cast<uint16_t>(ds::d500_calibration_table_id::calib_cfg_id),
sizeof(rs2_calibration_config), calib_version, computed_crc32 };
calib_config_with_header.payload = calib_config;
auto data_as_ptr = reinterpret_cast<uint8_t*>(&calib_config_with_header);
return std::vector<uint8_t>(data_as_ptr, data_as_ptr + sizeof(rs2_calibration_config_with_header));
}

calibration_state d500_debug_protocol_calibration_engine::get_triggered_calibration_state() const
{
return _calib_ans.state;
Expand Down
Loading