Skip to content

Commit

Permalink
Add timing information to iLQG planner terminal printing.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 694043785
Change-Id: I6914e47b7cde38ef9e9c9b072ed50954b14e7242
  • Loading branch information
thowell authored and copybara-github committed Nov 7, 2024
1 parent 8dcb9d2 commit c08d406
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mjpc/planners/ilqg/planner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,19 @@ void iLQGPlanner::Iteration(int horizon, ThreadPool& pool) {
std::cout << " dV: " << expected << '\n';
std::cout << " dV[0]: " << backward_pass.dV[0] << '\n';
std::cout << " dV[1]: " << backward_pass.dV[1] << '\n';
std::cout << std::endl;

std::cout << "\niLQG Timing (ms)\n" << '\n';
std::cout << " nominal: " << nominal_compute_time * 1.0e-3 << '\n';
std::cout << " model derivative: "
<< model_derivative_compute_time * 1.0e-3 << '\n';
std::cout << " cost derivative: " << cost_derivative_compute_time * 1.0e-3
<< '\n';
std::cout << " backward pass: " << backward_pass_compute_time * 1.0e-3
<< '\n';
std::cout << " rollouts: " << rollouts_compute_time * 1.0e-3 << '\n';
std::cout << " policy update: " << policy_update_compute_time * 1.0e-3
<< '\n';
std::cout << "\n\n";
}

// stop timer
Expand Down

0 comments on commit c08d406

Please sign in to comment.