| 428 | } |
| 429 | |
| 430 | void command() |
| 431 | { |
| 432 | if (!LOOP_CLOSURE) |
| 433 | return; |
| 434 | while(1) |
| 435 | { |
| 436 | char c = getchar(); |
| 437 | if (c == 's') |
| 438 | { |
| 439 | m_process.lock(); |
| 440 | posegraph.savePoseGraph(); |
| 441 | m_process.unlock(); |
| 442 | printf("save pose graph finish\nyou can set 'load_previous_pose_graph' to 1 in the config file to reuse it next time\n"); |
| 443 | // printf("program shutting down...\n"); |
| 444 | // ros::shutdown(); |
| 445 | } |
| 446 | if (c == 'n') |
| 447 | new_sequence(); |
| 448 | |
| 449 | std::chrono::milliseconds dura(5); |
| 450 | std::this_thread::sleep_for(dura); |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | int main(int argc, char **argv) |
| 455 | { |
nothing calls this directly
no test coverage detected