Skip to content
Snippets Groups Projects
Commit b2e45173 authored by Markus Swarowsky's avatar Markus Swarowsky
Browse files

Level 1 Controller interface for the platfrom velocity controler

parent c05391ed
No related branches found
No related tags found
No related merge requests found
......@@ -302,6 +302,12 @@ namespace armarx
controlDataTripleBuffer {initialCommands}
{
}
virtual void rtSwapBufferAndRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override
{
rtUpdateControlStruct();
rtRun(sensorValuesTimestamp, timeSinceLastIteration);
}
protected:
const ControlDataStruct& rtGetControlStruct() const
{
......@@ -311,11 +317,6 @@ namespace armarx
{
return controlDataTripleBuffer.updateReadBuffer();
}
virtual void rtSwapBufferAndRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration) override
{
rtUpdateControlStruct();
rtRun(sensorValuesTimestamp, timeSinceLastIteration);
}
void writeControlStruct()
{
......@@ -336,5 +337,26 @@ namespace armarx
};
template <typename ControlDataStruct>
using LVL1ControllerTemplatePtr = IceInternal::Handle<LVL1ControllerWithTripleBuffer<ControlDataStruct>>;
struct PlatformCartesianVelocity
{
float vx;
float vy;
float vAngle;
PlatformCartesianVelocity() : vx(0), vy(0), vAngle(0)
{ }
};
class AbstractLvl1PlatformVelocityController : public virtual LVL1ControllerWithTripleBuffer<PlatformCartesianVelocity> {
public:
virtual void setTarget(float vx, float vy, float vAngle) = 0;
};
typedef boost::shared_ptr <AbstractLvl1PlatformVelocityController> AbstractLvl1PlatformVelocityControllerPtr;
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment