Skip to content

Commit

Permalink
Updated the data logger tutorial to include a sampling time.
Browse files Browse the repository at this point in the history
  • Loading branch information
apsabelhaus committed Apr 6, 2017
1 parent 8969381 commit e94b7ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/source/data-management-and-logging.rst
Expand Up @@ -36,14 +36,15 @@ First, include the following header files: ::


#include "sensors/tgDataLogger2.h" #include "sensors/tgDataLogger2.h"
#include "sensors/tgRodSensorInfo.h" #include "sensors/tgRodSensorInfo.h"
#include "sensors/tgSpringCableActuatorSensorInfo.h" #include "sensors/tgSpringCableActuatorInfo.h"


Then, **after** you create your tgModel and add it to the simulation, perform the following steps: Then, **after** you create your tgModel and add it to the simulation, perform the following steps:


#. Create a tgDataLogger2, passing in the name of the log file that you would like to create. :: #. Create a tgDataLogger2, passing in the name of the log file that you would like to create. Include a time interval for logging. If you don't include this, you will get a sample at each timestep, and your logfile will be extremely large. A suggested sampling time interval is 0.1 sec. ::
std::string log_filename = "~/path_to_my_logs/example_logfile"; std::string log_filename = "~/path_to_my_logs/example_logfile";
tgDataLogger2* myDataLogger = new tgDataLogger2(log_filename); double samplingTimeInterval = 0.1;
tgDataLogger2* myDataLogger = new tgDataLogger2(log_filename, samplingTimeInterval);


#. Add the model to the data logger. If your pointer to your tgModel was myModel, :: #. Add the model to the data logger. If your pointer to your tgModel was myModel, ::


Expand Down

0 comments on commit e94b7ab

Please sign in to comment.