Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90983079
OncillaL2.h
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
Wed, Nov 6, 15:45
Size
2 KB
Mime Type
text/x-c++
Expires
Fri, Nov 8, 15:45 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22170644
Attached To
R6622 liboncilla
OncillaL2.h
View Options
#pragma once
#include <iostream>
#include <tr1/memory>
#include <rci/ResourceNode.h>
#include <rci/Controlled.h>
#include <rci/Configurable.h>
#include <rci/Sensing.h>
#include <rci/dto/JointAngles.h>
#include "OncillaSynchronizer.h"
namespace rci {
namespace oncilla {
class OncillaL2;
typedef std::tr1::shared_ptr<OncillaL2> OncillaL2Ptr;
/**
* Node class, representing the knee node of the quadruped robot.
* @todo In case of simulation, this node can also sense the power consumption.
*/
class OncillaL2: public rci::ResourceNode,
public rci::Controlled,
public rci::Sensing,
public rci::PositionControlled,
public rci::PositionSensing,
public rci::VelocityControlled,
public rci::TorqueControlled,
public rci::ImpedanceControlled {
public:
const static unsigned int MotorAxisIndex = 0;
const static unsigned int MagneticEncoderIndex = 1;
OncillaL2(OncillaSynchronizer &s, const std::string &name = "Oncilla Knee");
virtual ~OncillaL2();
/**
* Returns, if controller is converged.
* @return True, if controller is converged after last command.
*/
bool isConverged() const;
/**
* Commanding a joint position.
* @param position Position command
* @return Return, if successfull. (e.g. not exceeding joint limits)
* @todo Check for correct control mode
*/
bool setJointPosition(JointAnglesPtr position);
void setRawLocalCommand(double value);
double getRawLocalCommand() const ;
/**
* Returns current joint position.
* @return Current joint position
*/
virtual JointAnglesPtr getJointPosition() const;
double getRawLocalMotorAxisPosition() const;
double getRawLocalMagneticEncoderPosition() const;
void updateRawLocalMotorAxisPosition(double value);
void updateRawLocalMagneticEncoderPosition(double value);
/**
* Commanding a joint velocity.
* @param position Velocity command
* @return Return, if successfull. (e.g. not exceeding joint limits)
* @todo Check for correct control mode
*/
bool setJointVelocity(JointVelocitiesPtr vel);
/**
* Commanding a joint velocity.
* @param position Velocity command
* @return Return, if successfull. (e.g. not exceeding joint limits)
* @todo Check for correct control mode
*/
bool setJointImpedance(JointImpedancePtr imped);
/**
* Commanding a joint torque.
* @param position Torque command
* @return Return, if successfull. (e.g. not exceeding joint limits)
* @todo Check for correct control mode
*/
virtual bool setJointTorque(rci::JointTorquesPtr torques);
/**
* Returns latest position command. Note, that this is the latest valid
* commanded position. If the position command exceeds limits and is
* therefore rejected, it ..
*/
virtual JointAnglesPtr getLastPositionCommand() const;
/**
* Print
*/
std::string print() const;
private:
OncillaSynchronizer &synchronizer;
};
}
}
Event Timeline
Log In to Comment