Skip to content

Commit a91c39b

Browse files
Pass time since last call to method getControl.
1 parent 7d0544f commit a91c39b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/controller.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ void SoTRobotArmController::cleanupSetSensors
131131

132132

133133
void SoTRobotArmController::getControl
134-
(map<string,ControlValues> &controlOut)
134+
(map<string,ControlValues> &controlOut, const double& period)
135135
{
136-
device_->getControl(controlOut);
136+
device_->getControl(controlOut, period);
137137
}
138138

139139
void SoTRobotArmController::

src/controller.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class SoTRobotArmController: public AbstractSotExternalInterface
5757

5858
void cleanupSetSensors(map<string, SensorValues> &sensorsIn);
5959

60-
void getControl(map<string, ControlValues> &anglesOut);
60+
void getControl(map<string, ControlValues> &anglesOut, const double& period);
6161

6262
void setNoIntegration(void);
6363
void setSecondOrderIntegration(void);

src/device.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,13 @@ void SoTRobotArmDevice::cleanupSetSensors(map<string, SensorValues>&
208208
setSensors (SensorsIn);
209209
}
210210

211-
void SoTRobotArmDevice::getControl(map<string,ControlValues> &controlOut)
211+
void SoTRobotArmDevice::getControl(map<string,ControlValues> &controlOut, const double& period)
212212
{
213213
sotDEBUGIN(25) ;
214214
std::vector<double> anglesOut;
215215

216216
// Integrate control
217-
increment(timestep_);
217+
increment(period);
218218
sotDEBUG (25) << "state = " << state_.transpose() << std::endl;
219219
previousState_ = state_;
220220

src/device.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public:
5858

5959
void cleanupSetSensors(std::map<std::string, SensorValues> &sensorsIn);
6060

61-
void getControl(std::map<std::string, ControlValues> &anglesOut);
61+
void getControl(std::map<std::string, ControlValues> &anglesOut, const double& period);
6262

6363
/// \todo this should go into the parent class, in sot-core package
6464
void setTimeStep (double dt)

0 commit comments

Comments
 (0)