How to read a configuration file. This example is designed to read a file like the following (property/config.txt):
#include <stdio.h>
#include <stdlib.h>
int main(
int argc,
char *argv[]) {
if (!cmdLine.
check(
"file")) {
printf("Please call with: --file config.txt\n");
exit(1);
}
printf("Working with config file %s\n", fname.c_str());
if (!robot.
check(
"GENERAL")) {
printf("Cannot understand config file\n");
exit(1);
}
printf("Robot has %d joints\n", joints);
printf("Robot has limits: ");
for (
int i=1; i<maxes.
size(); i++) {
}
printf("\n");
return 0;
}