Skip to content

Commit 0a4573e

Browse files
olivier-stasseOlivier Stasse
authored andcommitted
[tools] Add a timestep_ field inside device + getTimeStep command.
Device should be the one prodiving its timestep.
1 parent 54a99fd commit 0a4573e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

include/sot/core/device.hh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ namespace dynamicgraph {
8181
bool withForceSignals[4];
8282
PeriodicCall periodicCallBefore_;
8383
PeriodicCall periodicCallAfter_;
84-
84+
double timestep_;
85+
8586
/// \name Robot bounds used for sanity checks
8687
/// \{
8788
Vector upperPosition_;

src/tools/device.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ Device( const std::string& n )
210210
command::docCommandVoid2 ("Set robot torque bounds", "vector: lower bounds", "vector: upper bounds")
211211
));
212212

213+
addCommand("getTimeStep",
214+
makeDirectGetter (*this, &this->timestep_,
215+
docDirectGetter ("Time step", "double")));
213216
// Handle commands and signals called in a synchronous way.
214217
periodicCallBefore_.addSpecificCommands(*this, commandMap, "before.");
215218
periodicCallAfter_.addSpecificCommands(*this, commandMap, "after.");

0 commit comments

Comments
 (0)