Skip to content

Commit f7a8ce6

Browse files
[Device] Remove method integrate.
1 parent d4699e9 commit f7a8ce6

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

src/device.cc

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,6 @@ SoTRobotArmDevice::SoTRobotArmDevice(std::string RobotName):
8181
timestep_ = TIMESTEP_DEFAULT;
8282
sotDEBUGIN(25) ;
8383
signalRegistration (p_gainsSOUT_ << d_gainsSOUT_);
84-
dynamicgraph::Vector data (3); data.setZero ();
85-
using namespace dynamicgraph::command;
86-
std::string docstring;
87-
docstring =
88-
" Set the integration in closed loop\n"
89-
"\n"
90-
" - Input: boolean\n"
91-
"\n";
92-
addCommand("setClosedLoop",
93-
makeCommandVoid1(*this,
94-
&SoTRobotArmDevice::setClosedLoop,
95-
docstring));
96-
sotDEBUGOUT(25);
9784
}
9885

9986
SoTRobotArmDevice::~SoTRobotArmDevice()
@@ -197,47 +184,4 @@ void SoTRobotArmDevice::cleanupSetSensors(map<string, SensorValues>&
197184
setSensors (SensorsIn);
198185
}
199186

200-
void SoTRobotArmDevice::integrate(const double &dt)
201-
{
202-
using dynamicgraph::Vector;
203-
const Vector &controlIN = controlSIN.accessCopy();
204-
205-
if (sanityCheck_ && controlIN.hasNaN()) {
206-
dgRTLOG() << "Device::integrate: Control has NaN values: " << '\n'
207-
<< controlIN.transpose() << '\n';
208-
return;
209-
}
210-
211-
if (controlInputType_ == dynamicgraph::sot::CONTROL_INPUT_NO_INTEGRATION) {
212-
state_ = controlIN;
213-
return;
214-
}
215-
216-
if (vel_control_.size() == 0)
217-
vel_control_ = Vector::Zero(controlIN.size());
218-
219-
if (controlInputType_ == dynamicgraph::sot::CONTROL_INPUT_TWO_INTEGRATION) {
220-
// TODO check acceleration
221-
// Position increment
222-
vel_control_ = velocity_ + (0.5 * dt) * controlIN;
223-
// Velocity integration.
224-
velocity_ += controlIN * dt;
225-
} else {
226-
vel_control_ = controlIN;
227-
}
228-
229-
// Velocity bounds check
230-
if (sanityCheck_) {
231-
CHECK_BOUNDS(velocity_, lowerVelocity_, upperVelocity_, "velocity");
232-
}
233-
234-
// Position integration
235-
state_ += vel_control_ * dt;
236-
237-
// Position bounds check
238-
if (sanityCheck_) {
239-
CHECK_BOUNDS(state_, lowerPosition_, upperPosition_, "position");
240-
}
241-
}
242-
243187
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(DeviceToDynamic, "DeviceToDynamic");

src/device.hh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ protected:
7171
closedLoop_ = closedLoop;
7272
};
7373

74-
/// Integrate control signal to update internal state.
75-
virtual void integrate(const double &dt);
76-
7774
/// \brief Whether the control of the base should be expressed in odometry
7875
/// frame of base frame.
7976
bool closedLoop_;

0 commit comments

Comments
 (0)