Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024dev file storage path #95

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Input_Output_Format.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| --output | String <br /> output results from the evaluation into a JSON formated file. If no file specified, the default name is 'output.json' |
| --outputScreen | Int (=1) <br /> The level of details in the output file (=1 to show all, = 2 to show problem summary, start and actual path and =3 to show only problem summary). |
| --simulationTime | Int <br /> The maximum number of timesteps allowed for solving the problem, we sometimes refer to this as planning horizon |
| --fileStoragePath | String <br /> the large file storage path |
| --fileStoragePath | String <br /> the large file storage path. If this parameter is not specified, the program will read from environment variable `$LORR_LARGE_FILE_STORAGE_PATH`. If specified, we ignore the environment variable. |
| --planTimeLimit | Int <br /> The amount of time available for planning in each timestep (in millseconds), if this time limit is exceeded by the planner, all robots are issued wait commands at current timestep and the task schedule keeps the same as last time. Note that for 2023 round the planTimeLimit is planning time for each timestep in seconds, so if you are using the planner from 2023 participants, please carefully checkout the timeout settings in the planner. |
| --preprocessTimeLimit | Int <br /> The amount of time in millseconds available for loading and precomputing auxiliary data before the problem-solving process begins |
| --logFile | String <br /> An output file that records all warnings and errors issued by the simulator in the event of invalid or incomplete actions from the planner |
Expand Down
18 changes: 17 additions & 1 deletion src/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,23 @@ int main(int argc, char **argv)
Grid grid(base_folder + map_path);

planner->env->map_name = map_path.substr(map_path.find_last_of("/") + 1);
planner->env->file_storage_path = vm["fileStoragePath"].as<std::string>();


string file_storage_path = vm["fileStoragePath"].as<std::string>();
if (file_storage_path==""){
char const* tmp = getenv("LORR_LARGE_FILE_STORAGE_PATH");
if ( tmp != nullptr ) {
file_storage_path = string(tmp);
}
}

// check if the path exists;
if (file_storage_path!="" &&!std::filesystem::exists(file_storage_path)){
std::ostringstream stringStream;
stringStream << "fileStoragePath (" << file_storage_path << ") is not valid";
logger->log_warning(stringStream.str());
}
planner->env->file_storage_path = file_storage_path;

ActionModelWithRotate *model = new ActionModelWithRotate(grid);
model->set_logger(logger);
Expand Down