Skip to content

Commit

Permalink
Fix outdated Livox callback code
Browse files Browse the repository at this point in the history
Co-authored-by: Zhihuan Hu <[email protected]>
  • Loading branch information
victorreijgwart and YoungCapta1n committed Aug 29, 2024
1 parent 3f3f0cd commit ec57176
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ bool PointcloudTopicInput::registerCallback(PointcloudTopicType type,
case PointcloudTopicType::kLivox:
#ifdef LIVOX_AVAILABLE
// clang-format off
registrar(static_cast<void(PointcloudInput::*)(
registrar(static_cast<void(PointcloudTopicInput::*)(
const livox_ros_driver2::CustomMsg&)>(
&PointcloudInput::callback));
&PointcloudTopicInput::callback));
// clang-format on
return true;
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void PointcloudTopicInput::callback(
}

#ifdef LIVOX_AVAILABLE
void PointcloudInput::callback(
void PointcloudTopicInput::callback(
const livox_ros_driver2::CustomMsg& pointcloud_msg) {
ProfilerZoneScoped;
// Skip empty clouds
Expand All @@ -165,8 +165,8 @@ void PointcloudInput::callback(
std::string sensor_frame_id = config_.sensor_frame_id.empty()
? pointcloud_msg.header.frame_id
: config_.sensor_frame_id;
StampedPointcloud stamped_pointcloud{stamp_nsec, std::move(sensor_frame_id),
pointcloud_msg.points.size()};
undistortion::StampedPointcloud stamped_pointcloud{
stamp_nsec, std::move(sensor_frame_id), pointcloud_msg.points.size()};
for (const auto& point : pointcloud_msg.points) {
stamped_pointcloud.emplace(point.x, point.y, point.z, point.offset_time);
}
Expand Down

0 comments on commit ec57176

Please sign in to comment.