RobWorkProject  24.12.4-
Public Member Functions | List of all members
PiHStrategy Class Reference

Control strategy for a Peg in Hole operation. More...

#include <PiHStrategy.hpp>

Inherits AssemblyControlStrategy.

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from AssemblyControlStrategy
typedef rw::core::Ptr< AssemblyControlStrategyPtr
 smart pointer type to this class
 

Detailed Description

Control strategy for a Peg in Hole operation.

The insertion strategy with parameters shown. Left

image shows the initial approach pose, second image shows the linear approach motion, third image shows the angular motion, and the right image shows the final linear insertion."

See the PiHParameterization for more information about the parameters.

The strategy is described in [1].

[1]: Lars Carøe Sørensen, Jacob Pørksen Buch, Henrik Gordon Petersen and Dirk Kraft, Online Action Learning using Kernel Density Estimation for Quick Discovery of Good Parameters for Peg-in-Hole Insertion, In Proceedings of the 13th International Conference on Informatics in Control, Automation and Robotics (ICINCO 2016), Volume 2, pages 166-177

Constructor & Destructor Documentation

◆ PiHStrategy()

PiHStrategy ( const rw::math::Transform3D<> &  worldTfemale,
const rw::math::Transform3D<> &  femaleTfemaleTcp = rw::math::Transform3D<>::identity(),
const rw::math::Transform3D<> &  maleTmaleTcp = rw::math::Transform3D<>::identity() 
)

Constructor.

This strategy generates trajectories in world coordinates, assuming the hole body is stationary. Hence it must be given the transform of the hole body.

Parameters
worldTfemale[in] the transform of the hole body.
femaleTfemaleTcp[in] (optional) if the hole body frame does is not at the top of the hole, the transform from the body frame to the top of the hole should be given here.
maleTmaleTcp[in] (optional) if the peg body frame does is not at the end of the peg towards the hole, the transform from the body frame to the end of the peg should be given here.

Member Function Documentation

◆ createParameterization()

virtual rw::core::Ptr<AssemblyParameterization> createParameterization ( const rw::core::Ptr< rw::core::PropertyMap map)
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.

Implements AssemblyControlStrategy.

◆ createState()

ControlState::Ptr createState ( ) const
virtual

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

Returns
a new ControlState.

Reimplemented from AssemblyControlStrategy.

◆ getApproach()

virtual rw::math::Transform3D getApproach ( rw::core::Ptr< AssemblyParameterization parameters)
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.

Implements AssemblyControlStrategy.

◆ getDescription()

virtual std::string getDescription ( )
virtual

A textual description of the control strategy.

Returns
a string with a description of the control strategy.

Implements AssemblyControlStrategy.

◆ getID()

virtual std::string getID ( )
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.

Implements AssemblyControlStrategy.

◆ update()

virtual rw::core::Ptr<AssemblyControlResponse> update ( rw::core::Ptr< AssemblyParameterization parameters,
rw::core::Ptr< AssemblyState real,
rw::core::Ptr< AssemblyState assumed,
ControlState::Ptr  controlState,
rw::kinematics::State state,
rw::sensor::FTSensor ftSensor,
double  time 
) const
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: