Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow cartographer fix for raytracing #1682

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Follow cartographer fix for raytracing
Now the RangePoint on cartographer is composed not only by a position of
the point but also from the origin of the ray, and here we update to
support this new interface.
ValerioMagnago committed Aug 12, 2021
commit ec09bc59a24256cccc88d758a894c7dccc387a24
4 changes: 2 additions & 2 deletions cartographer_ros/cartographer_ros/assets_writer.cc
Original file line number Diff line number Diff line change
@@ -122,8 +122,8 @@ std::unique_ptr<carto::io::PointsBatch> HandleMessage(
const carto::transform::Rigid3f sensor_to_map =
(tracking_to_map * sensor_to_tracking).cast<float>();
points_batch->points.push_back(
sensor_to_map *
carto::sensor::ToRangefinderPoint(point_cloud.points[i]));
sensor_to_map * carto::sensor::ToRangefinderPoint(
point_cloud.points[i], Eigen::Vector3f::Zero()));
points_batch->intensities.push_back(point_cloud.intensities[i]);
// We use the last transform for the origin, which is approximately correct.
points_batch->origin = sensor_to_map * Eigen::Vector3f::Zero();