Skip to content

Commit

Permalink
quadrotor sim now takes simulation time as an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
psiorx committed Mar 1, 2016
1 parent 9012b74 commit d15e6d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drake/examples/Quadrotor/runDynamics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ using namespace Drake;
using namespace Eigen;

int main(int argc, char* argv[]) {

double final_time = argc >= 2 ? atof(argv[1]) : std::numeric_limits<double>::infinity();
cout << "Running simulation for " << final_time << " seconds." << endl;
shared_ptr<lcm::LCM> lcm = make_shared<lcm::LCM>();
if(!lcm->good())
return 1;
Expand Down Expand Up @@ -50,6 +53,6 @@ int main(int argc, char* argv[]) {

x0(2) = 1;

runLCM(lcmio_with_vis, lcm,0,std::numeric_limits<double>::infinity(),x0,options);
runLCM(lcmio_with_vis, lcm, 0, final_time, x0, options);

}

0 comments on commit d15e6d2

Please sign in to comment.