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

Fixes segmentation fault for empty pointclouds #1641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nulaft
Copy link

@nulaft nulaft commented Jun 6, 2021

See issue #1405
This small change fixes the issue where cartographer_rosbag_validate segfaults if the ros bag contains PointCloud2 messages without any points in them.

See issue cartographer-project#1405
This small change fixes the issue where cartographer_rosbag_validate segfaults if the ros bag contains PointCloud2 messages without any points in them.
@bochen87
Copy link
Contributor

Hi, thank you for your contribution - may I ask you to sign off your commits? Please have a look here for how to fix it: https://github.com/cartographer-project/cartographer_ros/pull/1641/checks?check_run_id=2756820741

*from = *to;
if (point_cloud.size() > 0) {
*from += cartographer::common::FromSeconds(point_cloud[0].time);
}
Copy link
Contributor

@bochen87 bochen87 Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe print an error message to warn the user if the pointcloud size is 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants