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

When I use the function projectorLaser(), the core dumped. #69

Open
Oyssster opened this issue Oct 14, 2020 · 1 comment
Open

When I use the function projectorLaser(), the core dumped. #69

Oyssster opened this issue Oct 14, 2020 · 1 comment

Comments

@Oyssster
Copy link

I wirte a laserscanSub callback function which is used to process the laser scan.But when I try to projectroLaser the sensor_msgs::LaserScan to sensor_msgs::PointCloud, I get the result: Segmentation fault(core dumped).The code is as below:

void Scanprocess::laserscanSubCallback(const sensor_msgs::LaserScanConstPtr &msg)
{
    if (msg == NULL)
    {
        ROS_INFO("msg is a nullptr.");
        return;
    }
    std::cout << msg << std::endl;
    projector_->projectLaser(*msg, cloud_in_scan_);
}

I find the reason is :aborting core dump writing, size exceeds current limit 1048576.The address of msg is bigger than the limit.Could someone give me some suggestions?

@jonbinney
Copy link
Contributor

@Oyssster hard to tell. I'd suggest catching this in gdb and poking at the fields and addresses of msg and cloud_in_scan_ not see if anything looks suspicious. It looks like cloud_in_scan_ is a member variable of Scanprocess; is it possible that this callback gets called after the instance of Scanprocess is destroyed?

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

No branches or pull requests

2 participants