32 #include <gtest/gtest.h>    52   memcpy( nav->
costarr, cmap, sx*sy );
    59   printf(
"last path entries:\n");
    60   for( 
int i = nav->
npath - 4; i < nav->npath; i++ )
    62     printf(
"%.3f, %.3f\n", nav->
pathx[ i ], nav->
pathy[ i ]);
    64   printf(
"potential field neighborhood of last entry:\n");
    69   for( 
int x = xf - 2; 
x <= xf + 2; 
x++ )
    75   for( 
int y = yf - 2; 
y <= yf + 2; 
y++ )
    78     for( 
int x = xf - 2; 
x <= xf + 2; 
x++ )
    80       printf( 
" %5.1f", nav->
potarr[ 
y * nav->
nx + 
x ] );
    85   printf(
"gradient neighborhood of last entry:\n");
    87   for( 
int x = xf - 2; 
x <= xf + 2; 
x++ )
    93   for( 
int y = yf - 2; 
y <= yf + 2; 
y++ )
    95     printf( 
"%5d x:", 
y );
    96     for( 
int x = xf - 2; 
x <= xf + 2; 
x++ )
    98       printf( 
" %5.1f", nav->
gradx[ 
y * nav->
nx + 
x ] );
   103     for( 
int x = xf - 2; 
x <= xf + 2; 
x++ )
   105       printf( 
" %5.1f", nav->
grady[ 
y * nav->
nx + 
x ] );
   111 TEST(PathCalc, oscillate_in_pinch_point)
   114   ASSERT_TRUE( nav != NULL );
   129   EXPECT_TRUE( plan_success );
   136 TEST(PathCalc, easy_nav_should_always_work)
   139   ASSERT_TRUE( nav != NULL );
   156 int main(
int argc, 
char **argv)
   158   testing::InitGoogleTest(&argc, argv);
   159   return RUN_ALL_TESTS();
 COSTTYPE * readPGM(const char *fname, int *width, int *height, bool raw=false)
navfn::NavFn * make_willow_nav()
TEST(PathCalc, oscillate_in_pinch_point)
void setStart(int *start)
Sets the start position for the planner. Note: the navigation cost field computed gives the cost to g...
bool calcNavFnDijkstra(bool atStart=false)
Caclulates the full navigation function using Dijkstra. 
TFSIMD_FORCE_INLINE const tfScalar & y() const 
void setGoal(int *goal)
Sets the goal position for the planner. Note: the navigation cost field computed gives the cost to ge...
Navigation function class. Holds buffers for costmap, navfn map. Maps are pixel-based. Origin is upper left, x is right, y is down. 
TFSIMD_FORCE_INLINE const tfScalar & x() const 
ROSLIB_DECL std::string getPath(const std::string &package_name)
void print_neighborhood_of_last_path_entry(navfn::NavFn *nav)
int main(int argc, char **argv)