Update of /cvsroot/playerstage/code/player/utils/pmap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1387/utils/pmap
Modified Files:
pmap_test.cpp
Log Message:
applied patch
[ 1327235 ] show help in pmap_test
Index: pmap_test.cpp
===================================================================
RCS file: /cvsroot/playerstage/code/player/utils/pmap/pmap_test.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pmap_test.cpp 15 Feb 2008 09:06:18 -0000 1.4
--- pmap_test.cpp 15 Feb 2008 09:14:18 -0000 1.5
***************
*** 233,236 ****
--- 233,279 ----
static void save_fine();
+ // Shows help
+ void show_help ()
+ {
+ fprintf (stdout,
+ "The pmap_test utility demonstrates the basic functionality of\n"
+ "the pmap library and serves a handy mapping utility in its own\n"
+ "right. Given a Player logfile containing odometry and laser\n"
+ "data, pmap_test will produce an occupancy grid map of the\n"
+ "environment.\n\n"
+ "Basic usage is as follows:\n"
+ "\t$ pmap_test [options] <logfilename>\n\n"
+ "where the supported options are:\n"
+ " -g disable the GUI (run in console mode\n"
+ " only).\n"
+ " --range_max maximum effective range for the
laser\n"
+ " (m).\n"
+ " --position_index index of odometry device in logfile.\n"
+ " --laser_index index of laser device in logfile.\n"
+ " --num_samples number of samples in particle
filter.\n"
+ " --resample_interval number of scans between resampling\n"
+ " steps.\n"
+ " --resample_sigma width of resampling gaussian.\n"
+ " --num_cycles number of optimization cycles in the\n"
+ " fine phase.\n"
+ " --robot_x, --robot_y, --robot_rot initial robot pose.\n"
+ " --grid_width, --grid_height grid dimensions (m).\n"
+ " --grid_scale grid scale (m/cell).\n"
+ " --laser_x, --laser_rot laser position offset.\n"
+ " --robot_hostname the name of the robot to verify in\n"
+ " the log.\n"
+ " --skip amount of time to skip between log\n"
+ " entries.\n"
+ " --range_res Resolution of the laser (only used
in\n"
+ " lodo, not lodo2 which is currently\n"
+ " used.\n"
+ " --action_model_xx,\n"
+ " --action_model_rx,\n"
+ " --action_model_rr believe factors in the change of the\n"
+ " robot's pose.\n"
+ );
+
+ exit (EXIT_SUCCESS);
+ }
// Key callback
***************
*** 753,757 ****
struct timeval tv_a, tv_b;
int opt;
! const char *opts = "g";
const struct option lopts[] =
{
--- 796,800 ----
struct timeval tv_a, tv_b;
int opt;
! const char *opts = "gh";
const struct option lopts[] =
{
***************
*** 775,778 ****
--- 818,822 ----
{"resample_sigma", 1, 0, 121},
{"num_cycles", 1, 0, 122},
+ {"help", 0, 0, 'h'},
{0, 0, 0, 0}
};
***************
*** 783,786 ****
--- 827,832 ----
if (opt == 'g')
opt_gui = 0;
+ else if (opt == 'h')
+ show_help();
else if (opt == 1)
opt_max_scans = atoi(optarg);
***************
*** 824,828 ****
if (optind < 0 || optind >= argc)
{
! fprintf(stderr, "usage: pmap_test [options] <logfile>\n");
exit(-1);
}
--- 870,875 ----
if (optind < 0 || optind >= argc)
{
! //fprintf(stderr, "usage: pmap_test [options] <logfile>\n");
! show_help ();
exit(-1);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit