RobWorkProject
Classes | Public Types | Public Member Functions | List of all members
AssemblyControlStrategy Class Referenceabstract

The interface for control strategies for assembly. More...

#include <AssemblyControlStrategy.hpp>

Inherited by CircularPiHControlStrategy, PiHStrategy, and SpiralStrategy.

Classes

class  ControlState
 Derive from the ControlState class to implement state that is specific to a AssemblyControlStrategy. More...
 

Public Types

typedef rw::common::Ptr< AssemblyControlStrategyPtr
 smart pointer type to this class
 

Public Member Functions

 AssemblyControlStrategy ()
 Create new control strategy.
 
virtual ~AssemblyControlStrategy ()
 Destructor.
 
virtual ControlState::Ptr createState () const
 Create a new ControlState. This is usually done before calling update() the first time. More...
 
virtual rw::common::Ptr< AssemblyControlResponseupdate (rw::common::Ptr< AssemblyParameterization > parameters, rw::common::Ptr< AssemblyState > real, rw::common::Ptr< AssemblyState > assumed, ControlState::Ptr controlState, rw::kinematics::State &state, rw::sensor::FTSensor *ftSensor, double time) const =0
 The main control loop. More...
 
virtual rw::math::Transform3D getApproach (rw::common::Ptr< AssemblyParameterization > parameters)=0
 Get the initial relative configuration between female and male objects (uses object TCP frames as given in the AssemblyTask). More...
 
virtual std::string getID ()=0
 All implementations should provide a unique id, which will be used for serialization and in the factory. More...
 
virtual std::string getDescription ()=0
 A textual description of the control strategy. More...
 
virtual rw::common::Ptr< AssemblyParameterizationcreateParameterization (const rw::common::Ptr< rw::common::PropertyMap > map)=0
 Construct a parameterization from a PropertyMap - this is required for deserialization and loading of a Assemblyassembly. More...
 

Detailed Description

The interface for control strategies for assembly.

The control strategy must implement the getApproach(), update(), createParameterization(), getID() and getDescription() methods.

The createState() can be overriden if the user wants to save specific strategy state between calls to update().

Member Function Documentation

◆ createParameterization()

virtual rw::common::Ptr<AssemblyParameterization> createParameterization ( const rw::common::Ptr< rw::common::PropertyMap map)
pure virtual

Construct a parameterization from a PropertyMap - this is required for deserialization and loading of a Assemblyassembly.

Parameters
map[in] the PropertyMap to construct a parameterization from.
Returns
a new AssemblyParameterization.

Implemented in PiHStrategy, SpiralStrategy, and CircularPiHControlStrategy.

◆ createState()

virtual ControlState::Ptr createState ( ) const
virtual

Create a new ControlState. This is usually done before calling update() the first time.

Returns
a new ControlState.

Reimplemented in PiHStrategy, SpiralStrategy, and CircularPiHControlStrategy.

◆ getApproach()

virtual rw::math::Transform3D getApproach ( rw::common::Ptr< AssemblyParameterization parameters)
pure virtual

Get the initial relative configuration between female and male objects (uses object TCP frames as given in the AssemblyTask).

First when approach is reached, the update() control loop will start running.

Parameters
parameters[in] the parameters used for the current task.
Returns
relative configuration between female and male objects.

Implemented in PiHStrategy, SpiralStrategy, and CircularPiHControlStrategy.

◆ getDescription()

virtual std::string getDescription ( )
pure virtual

A textual description of the control strategy.

Returns
a string with a description of the control strategy.

Implemented in PiHStrategy, SpiralStrategy, and CircularPiHControlStrategy.

◆ getID()

virtual std::string getID ( )
pure virtual

All implementations should provide a unique id, which will be used for serialization and in the factory.

Returns
a string with the unique id of the control strategy.

Implemented in PiHStrategy, SpiralStrategy, and CircularPiHControlStrategy.

◆ update()

virtual rw::common::Ptr<AssemblyControlResponse> update ( rw::common::Ptr< AssemblyParameterization parameters,
rw::common::Ptr< AssemblyState real,
rw::common::Ptr< AssemblyState assumed,
ControlState::Ptr  controlState,
rw::kinematics::State state,
rw::sensor::FTSensor ftSensor,
double  time 
) const
pure virtual

The main control loop.

Parameters
parameters[in] the parameters used for the current task.
real[in] the real AssemblyState (can be NULL if not known).
assumed[in] the assumed AssemblyState (should be set by the AssemblyControlStrategy).
controlState[in] a ControlState previously created by the createState() function.
state[in] the real state of the system.
ftSensor[in] a pointer to the male force/torque sensor.
time[in] the current time.
Returns
a AssemblyControlResponse with a new target for the male controller (or NULL if nothing should be done).

The documentation for this class was generated from the following file: