Open JakeInit opened 3 years ago
This seems to occur when trying to map an area, but sensor measurements are not pushed to Cartographer. Is there any way to prevent the crash in this scenario?
I have the same problem, did you solve it?
maybe caused by building a new trajectory but the former trajectory not be destructed. only one trajectory is allowed.
When running cartographer, I can map and localize without any issues in my 2d environment. The issue happens when trying to delete my pointer to MapBuilderInterface.
std::unique_ptr mapbuilder;
mapbuilder = std::make_unique(map_builderoptions); // options being my configurations from the lua
And for the trajectory builder cartographer::mapping::TrajectoryBuilderInterface *trajectory_builder; trajectory_id = mapbuilder->AddTrajectoryBuilder( {kRangeSensorId, kIMUSensorId, kOdomSensorId}, trajectory_builderoptions, GetLocalSlamResultCallback());
trajectory_builder = mapbuilder->GetTrajectoryBuilder(trajectory_id);
Everything during running is fine as stated above. Later when deconstructing my cartographerInterface class, I do the following:
As soon as I try to reset mapbuilder, I get the following log error and then crash of the application WARNING: Logging before InitGoogleLogging() is written to STDERR F0518 10:16:17.584446 15512 ordered_multi_queue.cc:45] Check failed: entry.second.finished Check failure stack trace: Aborted
This is called in the trajectory collator. I would have assumed since I called finish trajectory, that all trajecories (should only be 1) are labeled as finished. This seems to consistently happen if I stop sending sensor data to cartographer for a period of time and then start sending data again before trying to close my application.
Is there a way to handle this through the MapBuilderInterface and catch it to avoid crashing the application? Or am I missing a step when shutting down cartographer?