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
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,9 @@ std::unique_ptr<cuda_blackboard::CudaPointCloud2> CudaPointcloudPreprocessor::pr
transform_struct.m33 = static_cast<float>(rotation_matrix.getRow(2).getZ());

// Twist preprocessing
std::uint64_t pointcloud_stamp_nsec = 1'000'000'000 * input_pointcloud_msg.header.stamp.sec +
input_pointcloud_msg.header.stamp.nanosec;
std::uint64_t pointcloud_stamp_nsec =
static_cast<std::uint64_t>(1'000'000'000) * input_pointcloud_msg.header.stamp.sec +
input_pointcloud_msg.header.stamp.nanosec;

if (undistortion_type_ == UndistortionType::Undistortion3D) {
setupTwist3DStructs(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ void setupTwist2DStructs(
twist.last_stamp_nsec = last_stamp_nsec;
host_twist_2d_structs.push_back(twist);

double dt_seconds = 1e-9 * (twist.stamp_nsec - last_stamp_nsec);
double dt_seconds =
1e-9 * (static_cast<double>(twist.stamp_nsec) - static_cast<double>(last_stamp_nsec));
last_stamp_nsec = twist.stamp_nsec;
cum_theta += v_theta * dt_seconds;
float d = twist.v_x * dt_seconds;
Expand Down Expand Up @@ -330,7 +331,8 @@ void setupTwist3DStructs(
twist.last_stamp_nsec = last_stamp_nsec;
host_twist_3d_structs.push_back(twist);

double dt_seconds = 1e-9 * (twist.stamp_nsec - last_stamp_nsec);
double dt_seconds =
1e-9 * (static_cast<double>(twist.stamp_nsec) - static_cast<double>(last_stamp_nsec));
last_stamp_nsec = twist.stamp_nsec;

auto delta_transform = transformationMatrixFromVelocity(v, w, dt_seconds);
Expand Down
Loading