Skip to content

Commit 302d772

Browse files
committed
removing unused calibration data types
1 parent 05777c5 commit 302d772

File tree

3 files changed

+0
-69
lines changed

3 files changed

+0
-69
lines changed

include/librealsense2/h/rs_types.h

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -280,53 +280,6 @@ const char* rs2_get_failed_args (const rs2_error* error);
280280
const char* rs2_get_error_message (const rs2_error* error);
281281
void rs2_free_error (rs2_error* error);
282282

283-
#pragma pack(push, 1)
284-
/* rs2_calibration_roi - Array of four corners in Deph Frame Coordinate system that define a closed simple quadrangle (non-intersecting)*/
285-
typedef struct rs2_calibration_roi
286-
{
287-
uint16_t mask_pixel[4][2];
288-
}rs2_calibration_roi;
289-
290-
typedef struct float3_row_major { float x, y, z; } float3_row_major;
291-
typedef struct float3x3_row_major { float3_row_major x, y, z; } float3x3_row_major;
292-
293-
typedef struct rs2_extrinsics_row_major
294-
{
295-
float3x3_row_major rotation; // Rotation matrix
296-
float3_row_major translation; // Metric units
297-
} rs2_extrinsics_row_major;
298-
299-
typedef struct rs2_calibration_config
300-
{
301-
uint8_t calib_roi_num_of_segments; // Within 0-4 range: 0 - Default.No limitations.Full FOV can be used in TC
302-
// 1 - 4: Segments defined.The segment must be sequential
303-
rs2_calibration_roi roi[4]; // Segment 0 = convex tetragon - The vertices of the tetragon are ordered clockwise
304-
// Vertex = [x, y] = pixel coordinates in the reference depth map
305-
// 0 - based coordinates : [0, 0] = center of the top - left pixel
306-
// Segments 1-3 - structured identical to segment_#0 (reserved)
307-
// The ROI segments can intersect, but each must be convex(angles <= 180 degrees).
308-
uint8_t reserved1[12];
309-
rs2_extrinsics_row_major camera_position;
310-
uint8_t reserved2[300];
311-
uint8_t crypto_signature[32];
312-
uint8_t reserved3[39];
313-
} rs2_calibration_config;
314-
315-
typedef struct rs2_calibration_config_header
316-
{
317-
uint16_t version; // major.minor. Big-endian
318-
uint16_t table_type; // type
319-
uint32_t table_size; // full size including: header footer
320-
uint32_t calib_version; // major.minor.index
321-
uint32_t crc32; // crc of all the data in table excluding this header/CRC
322-
} rs2_calibration_config_header;
323-
324-
typedef struct rs2_calibration_config_with_header
325-
{
326-
rs2_calibration_config_header header;
327-
rs2_calibration_config payload;
328-
} rs2_calibration_config_with_header;
329-
#pragma pack(pop)
330283

331284
#ifdef __cplusplus
332285
}

include/librealsense2/hpp/rs_types.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,4 @@ namespace rs2
211211
inline std::ostream & operator << (std::ostream & o, rs2_vector v) { return o << v.x << ", " << v.y << ", " << v.z; }
212212
inline std::ostream & operator << (std::ostream & o, rs2_quaternion q) { return o << q.x << ", " << q.y << ", " << q.z << ", " << q.w; }
213213

214-
inline bool operator==(rs2_calibration_config const& self, rs2_calibration_config const& other)
215-
{
216-
return !std::memcmp(&self, &other, sizeof(rs2_calibration_config));
217-
}
218-
219214
#endif // LIBREALSENSE_RS2_TYPES_HPP

src/ds/d500/d500-debug-protocol-calibration-engine.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,6 @@ std::vector<uint8_t> d500_debug_protocol_calibration_engine::run_triggered_calib
6060
return _dev->send_receive_raw_data(cmd);
6161
}
6262

63-
static std::vector<uint8_t> add_header_to_calib_config(const rs2_calibration_config& calib_config)
64-
{
65-
// calculate CRC
66-
uint32_t computed_crc32 = rsutils::number::calc_crc32(reinterpret_cast<const uint8_t*>(&calib_config),
67-
sizeof(rs2_calibration_config));
68-
69-
// prepare vector of data to be sent (header + sp)
70-
rs2_calibration_config_with_header calib_config_with_header;
71-
uint16_t version = ((uint16_t)0x01 << 8) | 0x01; // major=0x01, minor=0x01 --> ver = major.minor
72-
uint32_t calib_version = 0; // ignoring this field, as requested by sw architect
73-
calib_config_with_header.header = { version, static_cast<uint16_t>(ds::d500_calibration_table_id::calib_cfg_id),
74-
sizeof(rs2_calibration_config), calib_version, computed_crc32 };
75-
calib_config_with_header.payload = calib_config;
76-
auto data_as_ptr = reinterpret_cast<uint8_t*>(&calib_config_with_header);
77-
return std::vector<uint8_t>(data_as_ptr, data_as_ptr + sizeof(rs2_calibration_config_with_header));
78-
}
79-
8063
calibration_state d500_debug_protocol_calibration_engine::get_triggered_calibration_state() const
8164
{
8265
return _calib_ans.state;

0 commit comments

Comments
 (0)