34template <
typename Po
intCloudPtr,
typename Fields>
38 std::vector<PointCloudPtr> motion_msgs = msgs;
39 for (
auto& motion_msg : motion_msgs) {
40 if (motion_msg && (motion_msg->point_step !=
point_step || motion_msg->fields !=
fields)) {
57 float& transformed_z) {
59 ? std::min(1.0F,
static_cast<float>(time_offset) /
static_cast<float>(transform.
max_time_offset))
61 const float inverse_alpha = 1.0F - alpha;
67 const float inverse_norm = 1.0F / std::sqrt(qx * qx + qy * qy + qz * qz + qw * qw);
74 const float tx = 2.0F * (qy * z - qz * y);
75 const float ty = 2.0F * (qz * x - qx * z);
76 const float tz = 2.0F * (qx * y - qy * x);
std::vector< PointCloudPtr > selectMotionCompatibleClouds(const std::vector< PointCloudPtr > &msgs, std::size_t point_step, const Fields &fields)
Keep batch indices while excluding clouds with incompatible layouts.
void transformPointInterpolated(const MotionTransform &transform, uint32_t time_offset, float x, float y, float z, float &transformed_x, float &transformed_y, float &transformed_z)
Transform a point using normalized quaternion interpolation.
void retainDeskewedPose(MotionTransform &transform)
std::vector< int > fields