ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I think I found the out of memory crash reason.
when costmap do layered_costmap_->resizeMap() in static_layer incomingMap function.
the "master" costmap(which combine all plugin layer) will do resizeMap first.
it will first change size_x_, size_y_...etc .
and then initMaps ( lock costmap -> delete costmap -> new costmap)
so when I use my UpdateWithMax function, I use master_grid.getSizeInCellsX() try to get costmap size_x_.
but at that time, real costmap size is still old one.
and the UpdateWithMax function will cause out of memory problem.
I will keep tracing if there are other possible reasons which may be the root cause.