Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87022874
OncillaL0.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Oct 10, 01:34
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Oct 12, 01:34 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21521263
Attached To
R6622 liboncilla
OncillaL0.cpp
View Options
#include "OncillaL0.h"
using namespace std;
namespace rci {
namespace oncilla {
OncillaL0::OncillaL0(const std::string &name)
: ResourceNode(name)
, Controlled()
, PositionControlled() {
// \todo add default value as a setting
_lastCommandedPosition = JointAngles::create(1,0.0);
}
bool OncillaL0::isConverged() const {
return false;
}
void OncillaL0::setRawLocalCommand(double value){
this->_lastCommandedPosition->setValue(value);
}
double OncillaL0::getRawLocalCommand() const{
return this->_lastCommandedPosition->asDouble(0,false);
}
bool OncillaL0::setJointPosition(JointAnglesPtr position) {
// Successfull
this->_lastCommandedPosition = position;
return true;
}
JointAnglesPtr OncillaL0::getLastPositionCommand() const {
if (this->_lastCommandedPosition) {
return this->_lastCommandedPosition;
}
throw runtime_error("No position command received yet.");
}
OncillaL0::~OncillaL0() {
}
std::string OncillaL0::print() const {
ostringstream outstream(ostringstream::out);
outstream.precision(3); // Precision when printing double values
outstream << "<Oncilla Hip>" << endl;
return outstream.str();
}
}
}
Event Timeline
Log In to Comment