4040#include " mjpc/threadpool.h"
4141#include " mjpc/utilities.h"
4242
43- ABSL_FLAG (std::string, task, " " , " Which model to load on startup." );
43+ ABSL_FLAG (std::string, task, " Quadruped Flat" ,
44+ " Which model to load on startup." );
4445ABSL_FLAG (bool , planner_enabled, false ,
4546 " If true, the planner will run on startup" );
4647ABSL_FLAG (float , sim_percent_realtime, 100 ,
@@ -392,7 +393,7 @@ void PhysicsLoop(mj::Simulate& sim) {
392393
393394namespace mjpc {
394395
395- MjpcApp::MjpcApp (std::vector<std::shared_ptr<mjpc::Task>> tasks, int task_id ) {
396+ MjpcApp::MjpcApp (std::vector<std::shared_ptr<mjpc::Task>> tasks) {
396397 // MJPC
397398 printf (" MuJoCo MPC (MJPC)\n " );
398399
@@ -415,8 +416,8 @@ MjpcApp::MjpcApp(std::vector<std::shared_ptr<mjpc::Task>> tasks, int task_id) {
415416
416417 sim->agent ->SetTaskList (std::move (tasks));
417418 std::string task_name = absl::GetFlag (FLAGS_task);
418- if (task_name.empty ()) {
419- sim->agent ->gui_task_id = task_id ;
419+ if (task_name.empty ()) { // shouldn't happen, flag has a default value
420+ sim->agent ->gui_task_id = 0 ;
420421 } else {
421422 sim->agent ->gui_task_id = sim->agent ->GetTaskIdByName (task_name);
422423 if (sim->agent ->gui_task_id == -1 ) {
@@ -519,8 +520,8 @@ mj::Simulate* MjpcApp::Sim() {
519520 return sim.get ();
520521}
521522
522- void StartApp (std::vector<std::shared_ptr<mjpc::Task>> tasks, int task_id ) {
523- MjpcApp app (std::move (tasks), task_id );
523+ void StartApp (std::vector<std::shared_ptr<mjpc::Task>> tasks) {
524+ MjpcApp app (std::move (tasks));
524525 app.Start ();
525526}
526527
0 commit comments