HEBI C++ API  3.9.0
hebi::experimental::arm::plugin::Plugin Class Referenceabstract

#include <arm.hpp>

Public Member Functions

 Plugin (const std::string &name)
 
virtual ~Plugin ()=default
 
std::string name () const
 
bool enabled () const
 
void setEnabled (bool enabled)
 
float enabledRatio ()
 
bool setRampTime (float ramp_time)
 
float rampTime ()
 
bool update (Arm &, double dt)
 
virtual bool send ()
 
virtual bool onAssociated (const Arm &)
 

Protected Member Functions

bool applyParameters (const PluginConfig &config, std::set< std::string > required_parameters)
 
virtual bool applyParameterImpl (const std::string &name, bool value)
 
virtual bool applyParameterImpl (const std::string &name, const std::vector< bool > &value)
 
virtual bool applyParameterImpl (const std::string &name, float value)
 
virtual bool applyParameterImpl (const std::string &name, const std::vector< float > &value)
 
virtual bool applyParameterImpl (const std::string &name, const std::string &value)
 
virtual bool applyParameterImpl (const std::string &name, const std::vector< std::string > &value)
 
virtual bool updateImpl (Arm &, double dt)=0
 

Detailed Description

Abstract base class representing a plugin to be used for an Arm object. Each implementation should also implement two static functions, and be included in the ArmPluginMap list below:

  • static std::unique_ptr<T> create(const PluginConfig&);
  • static std::string pluginTypeName(); // For matching robot config file entries

Plugins allow extending an arm object with custom functionality not supported in the base class

The PluginConfig structure can have the following optional parameters used by this base Plugin class, in addition to those defined for classes that inherit from Plugin. optional:

  • enabled: (bool) Represents the starting state of the plugin, either enabled (true) or disabled.
  • ramp_time: (float) A value in seconds that indicates how long it takes to transition between enabled and disabled states. Different plugins may scale their effects based on this ramped enable/disable effect. Must be positive.

Constructor & Destructor Documentation

◆ Plugin()

hebi::experimental::arm::plugin::Plugin::Plugin ( const std::string &  name)
inline

◆ ~Plugin()

virtual hebi::experimental::arm::plugin::Plugin::~Plugin ( )
virtualdefault

Member Function Documentation

◆ name()

std::string hebi::experimental::arm::plugin::Plugin::name ( ) const
inline

◆ enabled()

bool hebi::experimental::arm::plugin::Plugin::enabled ( ) const
inline

◆ setEnabled()

void hebi::experimental::arm::plugin::Plugin::setEnabled ( bool  enabled)
inline

◆ enabledRatio()

float hebi::experimental::arm::plugin::Plugin::enabledRatio ( )
inline

◆ setRampTime()

bool hebi::experimental::arm::plugin::Plugin::setRampTime ( float  ramp_time)

◆ rampTime()

float hebi::experimental::arm::plugin::Plugin::rampTime ( )
inline

◆ update()

bool hebi::experimental::arm::plugin::Plugin::update ( Arm arm,
double  dt 
)

◆ send()

virtual bool hebi::experimental::arm::plugin::Plugin::send ( )
inlinevirtual

◆ onAssociated()

virtual bool hebi::experimental::arm::plugin::Plugin::onAssociated ( const Arm )
inlinevirtual

◆ applyParameters()

bool hebi::experimental::arm::plugin::Plugin::applyParameters ( const PluginConfig config,
std::set< std::string >  required_parameters 
)
protected

◆ applyParameterImpl() [1/6]

virtual bool hebi::experimental::arm::plugin::Plugin::applyParameterImpl ( const std::string &  name,
bool  value 
)
inlineprotectedvirtual

◆ applyParameterImpl() [2/6]

virtual bool hebi::experimental::arm::plugin::Plugin::applyParameterImpl ( const std::string &  name,
const std::vector< bool > &  value 
)
inlineprotectedvirtual

◆ applyParameterImpl() [3/6]

virtual bool hebi::experimental::arm::plugin::Plugin::applyParameterImpl ( const std::string &  name,
float  value 
)
inlineprotectedvirtual

◆ applyParameterImpl() [4/6]

virtual bool hebi::experimental::arm::plugin::Plugin::applyParameterImpl ( const std::string &  name,
const std::vector< float > &  value 
)
inlineprotectedvirtual

◆ applyParameterImpl() [5/6]

virtual bool hebi::experimental::arm::plugin::Plugin::applyParameterImpl ( const std::string &  name,
const std::string &  value 
)
inlineprotectedvirtual

◆ applyParameterImpl() [6/6]

virtual bool hebi::experimental::arm::plugin::Plugin::applyParameterImpl ( const std::string &  name,
const std::vector< std::string > &  value 
)
inlineprotectedvirtual

◆ updateImpl()

virtual bool hebi::experimental::arm::plugin::Plugin::updateImpl ( Arm ,
double  dt 
)
protectedpure virtual

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