The error content is as follows:
[move_base-17] process has died [pid 7691, exit code -11, cmd /home/dxs/catkin_ws/devel/lib/move_base/move_base __name:=move_base __log:=/home/dxs/.ros/log/e7f72b74-5d5e-11f0-9d39-c4837210cf9c/move_base-17.log].
log file: /home/dxs/.ros/log/e7f72b74-5d5e-11f0-9d39-c4837210cf9c/move_base-17*.log
Cause of error:
In the following code:
res3 = findPath(&path3, goal_x, goal_y, start_x, start_y, &voronoi_, 0, 1);
goal_x = std::get<0>(path3[path3.size() - 1]);
goal_y = std::get<1>(path3[path3.size() - 1]);
If findPath() fails and returns an empty path, subsequent direct access to path3.back() will trigger a segmentation error (exit code -11)
Just do an obstacle detection before generating the path:
if (voronoi_.isOccupied(goal_x, goal_y))
{
ROS_WARN("Goal position is occupied!");
return false;
}
res3 = findPath(&path3, goal_x, goal_y, start_x, start_y, &voronoi_, 0, 1);
The error content is as follows:
[move_base-17] process has died [pid 7691, exit code -11, cmd /home/dxs/catkin_ws/devel/lib/move_base/move_base __name:=move_base __log:=/home/dxs/.ros/log/e7f72b74-5d5e-11f0-9d39-c4837210cf9c/move_base-17.log].
log file: /home/dxs/.ros/log/e7f72b74-5d5e-11f0-9d39-c4837210cf9c/move_base-17*.log
Cause of error:
In the following code:
res3 = findPath(&path3, goal_x, goal_y, start_x, start_y, &voronoi_, 0, 1);
If findPath() fails and returns an empty path, subsequent direct access to path3.back() will trigger a segmentation error (exit code -11)
Just do an obstacle detection before generating the path:
if (voronoi_.isOccupied(goal_x, goal_y))
{
ROS_WARN("Goal position is occupied!");
return false;
}