Skip to content

Commit 8295690

Browse files
author
mbryan
committed
Ensure costmap_2d_cloud does not seg fault on SIGINT.
One of several clean shutdown issues being address via Issue ros-navigation#3271. Signed-off-by: mbryan <matthew.bryan@dell.com>
1 parent 62805a3 commit 8295690

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nav2_costmap_2d/src/costmap_2d_cloud.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ int main(int argc, char ** argv)
225225
"voxel_grid", rclcpp::SystemDefaultsQoS(), voxelCallback);
226226

227227
rclcpp::spin(g_node->get_node_base_interface());
228+
229+
g_node.reset();
230+
pub_marked.reset();
231+
pub_unknown.reset();
232+
228233
rclcpp::shutdown();
229234

230235
return 0;

0 commit comments

Comments
 (0)