Index: src/safe_trajectory_planner.cpp
===================================================================
--- src/safe_trajectory_planner.cpp	(revision 1677)
+++ src/safe_trajectory_planner.cpp	(working copy)
@@ -250,7 +250,7 @@
   Trajectory* swap = NULL;
 
   //any cell with a cost greater than the size of the map is impossible
-  double impossible_cost = map_.map_.size();
+  double impossible_cost = map_.obstacleCosts();
 
   // first sample the user suggested trajectory
   generateTrajectory(x, y, theta, vx, vy, vtheta, dx, dy, dtheta, acc_x, acc_y, acc_theta, impossible_cost, dx, dy, dtheta, *comp_traj);
@@ -438,7 +438,7 @@
   }
 
   Trajectory traj;
-  double impossible_cost = map_.map_.size();
+  double impossible_cost = map_.obstacleCosts();
   generateTrajectory(x, y, theta, vx, vy, vtheta, dx, dy, dtheta,
       acc_lim_x_, acc_lim_y_, acc_lim_theta_, impossible_cost, dx, dy, dtheta, traj);
 
