@@ -131,8 +131,8 @@ NavFn::NavFn(int xs, int ys)
131131 start[0 ] = start[1 ] = 0 ;
132132
133133 // display function
134- displayFn = NULL ;
135- displayInt = 0 ;
134+ // displayFn = NULL;
135+ // displayInt = 0;
136136
137137 // path buffers
138138 npathbuf = npath = 0 ;
@@ -607,9 +607,9 @@ NavFn::propNavFnDijkstra(int cycles, bool atStart)
607607 updateCell (*pb++);
608608 }
609609
610- if (displayInt > 0 && (cycle % displayInt) == 0 ) {
611- displayFn (this );
612- }
610+ // if (displayInt > 0 && (cycle % displayInt) == 0) {
611+ // displayFn(this);
612+ // }
613613
614614 // swap priority blocks curP <=> nextP
615615 curPe = nextPe;
@@ -693,9 +693,9 @@ NavFn::propNavFnAstar(int cycles)
693693 updateCellAstar (*pb++);
694694 }
695695
696- if (displayInt > 0 && (cycle % displayInt) == 0 ) {
697- displayFn (this );
698- }
696+ // if (displayInt > 0 && (cycle % displayInt) == 0) {
697+ // displayFn(this);
698+ // }
699699
700700 // swap priority blocks curP <=> nextP
701701 curPe = nextPe;
@@ -985,48 +985,48 @@ NavFn::gradCell(int n)
985985// <n> is the number of cycles to wait before displaying,
986986// use 0 to turn it off
987987
988- void
989- NavFn::display (void fn (NavFn * nav), int n)
990- {
991- displayFn = fn;
992- displayInt = n;
993- }
988+ // void
989+ // NavFn::display(void fn(NavFn * nav), int n)
990+ // {
991+ // displayFn = fn;
992+ // displayInt = n;
993+ // }
994994
995995
996996//
997997// debug writes
998998// saves costmap and start/goal
999999//
10001000
1001- void
1002- NavFn::savemap (const char * fname)
1003- {
1004- char fn[4096 ];
1005-
1006- RCLCPP_DEBUG (rclcpp::get_logger (" rclcpp" ), " [NavFn] Saving costmap and start/goal points" );
1007- // write start and goal points
1008- snprintf (fn, sizeof (fn), " %s.txt" , fname);
1009- FILE * fp = fopen (fn, " w" );
1010- if (!fp) {
1011- RCLCPP_WARN (rclcpp::get_logger (" rclcpp" ), " Can't open file %s" , fn);
1012- return ;
1013- }
1014- fprintf (fp, " Goal: %d %d\n Start: %d %d\n " , goal[0 ], goal[1 ], start[0 ], start[1 ]);
1015- fclose (fp);
1016-
1017- // write cost array
1018- if (!costarr) {
1019- return ;
1020- }
1021- snprintf (fn, sizeof (fn), " %s.pgm" , fname);
1022- fp = fopen (fn, " wb" );
1023- if (!fp) {
1024- RCLCPP_WARN (rclcpp::get_logger (" rclcpp" ), " Can't open file %s" , fn);
1025- return ;
1026- }
1027- fprintf (fp, " P5\n %d\n %d\n %d\n " , nx, ny, 0xff );
1028- fwrite (costarr, 1 , nx * ny, fp);
1029- fclose (fp);
1030- }
1001+ // void
1002+ // NavFn::savemap(const char * fname)
1003+ // {
1004+ // char fn[4096];
1005+
1006+ // RCLCPP_DEBUG(rclcpp::get_logger("rclcpp"), "[NavFn] Saving costmap and start/goal points");
1007+ // // write start and goal points
1008+ // snprintf(fn, sizeof(fn), "%s.txt", fname);
1009+ // FILE * fp = fopen(fn, "w");
1010+ // if (!fp) {
1011+ // RCLCPP_WARN(rclcpp::get_logger("rclcpp"), "Can't open file %s", fn);
1012+ // return;
1013+ // }
1014+ // fprintf(fp, "Goal: %d %d\nStart: %d %d\n", goal[0], goal[1], start[0], start[1]);
1015+ // fclose(fp);
1016+
1017+ // // write cost array
1018+ // if (!costarr) {
1019+ // return;
1020+ // }
1021+ // snprintf(fn, sizeof(fn), "%s.pgm", fname);
1022+ // fp = fopen(fn, "wb");
1023+ // if (!fp) {
1024+ // RCLCPP_WARN(rclcpp::get_logger("rclcpp"), "Can't open file %s", fn);
1025+ // return;
1026+ // }
1027+ // fprintf(fp, "P5\n%d\n%d\n%d\n", nx, ny, 0xff);
1028+ // fwrite(costarr, 1, nx * ny, fp);
1029+ // fclose(fp);
1030+ // }
10311031
10321032} // namespace nav2_navfn_planner
0 commit comments