SOFA plugin: Xitact  master
Open source framework for multi-physics simuation
sofa::component::controller::IHPDriver Class Reference

#include <IHPDriver.h>

Inheritance diagram for sofa::component::controller::IHPDriver:

Detailed Description

Public Attributes

Data< double > Scale
 Default scale applied to the Phantom Coordinates. More...
 
Data< double > forceScale
 Default scale applied to the force feedback. More...
 
Data< bool > permanent
 Apply the force feedback permanently. More...
 
Data< int > indexTool
 index of the tool to simulate (if more than 1). Index 0 correspond to first tool. More...
 
Data< double > graspThreshold
 Threshold value under which grasping will launch an event. More...
 
Data< bool > showToolStates
 Display states and forces from the tool. More...
 
Data< bool > testFF
 If true will add force when closing handle. As if tool was entering an elastic body. More...
 
Data< int > RefreshFrequency
 Frequency of the haptic loop. More...
 
Data< bool > xitactVisu
 Visualize the position of the interface in the virtual scene. More...
 
Data< VecCoordpositionBase
 position of the base of the device More...
 
Data< string > locPosBati
 localisation of the restPosition of the bati More...
 
Data< int > deviceIndex
 index of the device More...
 
Data< Vec1d > openTool
 opening of the tool More...
 
Data< double > maxTool
 maxTool value More...
 
Data< double > minTool
 minTool value More...
 
allXiToolDataIHP allData
 
XiToolDataIHP data
 
vector< IHPDriver * > otherXitact
 
bool operation
 
- Public Attributes inherited from sofa::core::objectmodel::BaseObject
Data< bool > f_listening
 
- Public Attributes inherited from sofa::core::objectmodel::Base
std::vector< lifecycle::DeprecatedData * > m_oldAttributes
 
Data< int > d_messageLogCount
 
Data< std::string > name
 
Data< bool > f_printLog
 
Data< sofa::core::objectmodel::TagSetf_tags
 
Data< sofa::type::BoundingBoxf_bbox
 
Data< sofa::core::objectmodel::ComponentStated_componentState
 
std::string m_definitionSourceFileName
 
int m_definitionSourceFilePos
 
std::string m_instanciationSourceFileName
 
int m_instanciationSourceFilePos
 

Public Member Functions

 SOFA_CLASS (IHPDriver, sofa::component::controller::Controller)
 
 IHPDriver ()
 
virtual ~IHPDriver ()
 
virtual void init ()
 
virtual void bwdInit ()
 
virtual void reset ()
 
void reinit ()
 
void cleanup ()
 
void setLCPForceFeedback (LCPForceFeedback< Rigid3dTypes > *ff)
 
void onKeyPressedEvent (core::objectmodel::KeypressedEvent *)
 
void onKeyReleasedEvent (core::objectmodel::KeyreleasedEvent *)
 
void createCallBack ()
 
void deleteCallBack ()
 
void stateCallBack ()
 
void updateForce ()
 
void displayState ()
 
void setDataValue ()
 
void reinitVisual ()
 
double getScale ()
 
void rightButtonPushed ()
 
void leftButtonPushed ()
 
void graspClosed ()
 
- Public Member Functions inherited from sofa::component::controller::Controller
 SOFA_CLASS (Controller, core::behavior::BaseController)
 
virtual void onMouseEvent (core::objectmodel::MouseEvent *)
 
virtual void onHapticDeviceEvent (core::objectmodel::HapticDeviceEvent *)
 
virtual void onJoystickEvent (core::objectmodel::JoystickEvent *)
 
virtual void onBeginAnimationStep (const double)
 
virtual void onEndAnimationStep (const double)
 
virtual void onGUIEvent (core::objectmodel::GUIEvent *)
 
- Public Member Functions inherited from sofa::core::behavior::BaseController
 SOFA_ABSTRACT_CLASS (BaseController, core::objectmodel::BaseObject)
 
- Public Member Functions inherited from sofa::core::objectmodel::BaseObject
 SOFA_CLASS (BaseObject, Base)
 
virtual void draw (const core::visual::VisualParams *)
 
virtual void computeBBox (const core::ExecParams *, bool=false)
 
void setSrc (const std::string &v, std::vector< std::string > *attributeList=nullptr)
 
void setSrc (const std::string &v, const BaseObject *loader, std::vector< std::string > *attributeList=nullptr)
 
BasefindLinkDestClass (const BaseClass *destType, const std::string &path, const BaseLink *link) override
 
virtual std::string getPathName () const override
 
virtual bool insertInNode (BaseNode *)
 
virtual bool removeInNode (BaseNode *)
 
SReal getTime () const
 
const BaseContextgetContext () const
 
BaseContextgetContext ()
 
const BaseObjectgetMaster () const
 
BaseObjectgetMaster ()
 
const VecSlavesgetSlaves () const
 
BaseObjectgetSlave (const std::string &name) const
 
virtual void addSlave (BaseObject::SPtr s)
 
virtual void removeSlave (BaseObject::SPtr s)
 
virtual void handleTopologyChange ()
 
virtual void handleTopologyChange (core::topology::Topology *t)
 
void parse (BaseObjectDescription *arg) override
 
void updateInternal ()
 
virtual void storeResetState ()
 
SReal getTime () const
 
- Public Member Functions inherited from sofa::core::objectmodel::Base
virtual const BaseClassgetClass () const
 
void addDeprecatedAttribute (lifecycle::DeprecatedData *attribute)
 
void addUpdateCallback (const std::string &name, std::initializer_list< BaseData * > inputs, std::function< sofa::core::objectmodel::ComponentState(const DataTracker &)> function, std::initializer_list< BaseData * > outputs)
 
void addOutputsToCallback (const std::string &name, std::initializer_list< BaseData * > outputs)
 
const std::string & getName () const
 
void setName (const std::string &n)
 
void setName (const std::string &n, int counter)
 
std::string getTypeName () const
 
virtual std::string getClassName () const
 
virtual std::string getTemplateName () const final
 
std::string getNameSpaceName () const
 
void setDefinitionSourceFileName (const std::string &sourceFileName)
 
const std::string & getDefinitionSourceFileName () const
 
void setDefinitionSourceFilePos (const int)
 
int getDefinitionSourceFilePos () const
 
void setInstanciationSourceFileName (const std::string &sourceFileName)
 
const std::string & getInstanciationSourceFileName () const
 
void setInstanciationSourceFilePos (const int)
 
int getInstanciationSourceFilePos () const
 
void addMessage (const sofa::helper::logging::Message &m) const
 
size_t countLoggedMessages (sofa::helper::logging::Message::TypeSet t=sofa::helper::logging::Message::AnyTypes) const
 
const std::deque< sofa::helper::logging::Message > & getLoggedMessages () const
 
const std::string getLoggedMessagesAsString (sofa::helper::logging::Message::TypeSet t=sofa::helper::logging::Message::AnyTypes) const
 
void clearLoggedMessages () const
 
bool notMuted () const
 
const sofa::core::objectmodel::TagSetgetTags () const
 
bool hasTag (Tag t) const
 
void addTag (Tag t)
 
void removeTag (Tag t)
 
ComponentState getComponentState () const
 
bool isComponentStateValid () const
 
virtual bool parseField (const std::string &attribute, const std::string &value)
 
virtual bool hasField (const std::string &attribute) const
 
void parseFields (const std::list< std::string > &str)
 
virtual void parseFields (const std::map< std::string, std::string * > &str)
 
void writeDatas (std::map< std::string, std::string * > &str)
 
void writeDatas (std::ostream &out, const std::string &separator=" ")
 
BaseDatafindData (const std::string &name) const
 
std::vector< BaseData * > findGlobalField (const std::string &name) const
 
BaseLinkfindLink (const std::string &name) const
 
std::vector< BaseLink * > findLinks (const std::string &name) const
 
virtual void updateLinks (bool logErrors=true)
 
BaseData::BaseInitData initData (::sofa::core::objectmodel::Data< T > *field, const char *name, const char *help, ::sofa::core::objectmodel::BaseData::DataFlags dataflags)
 
BaseData::BaseInitData initData (Data< T > *field, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 
Data< T >::InitData initData (Data< T > *field, const T &value, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 
void addData (BaseData *f, const std::string &name)
 
void addData (BaseData *f)
 
void removeData (BaseData *f)
 
void addAlias (BaseData *field, const char *alias)
 
void addLink (BaseLink *l)
 
void addAlias (BaseLink *link, const char *alias)
 
const VecDatagetDataFields () const
 
const MapDatagetDataAliases () const
 
const VecLinkgetLinks () const
 
const MapLinkgetLinkAliases () const
 
virtual bool findDataLinkDest (BaseData *&ptr, const std::string &path, const BaseLink *link)
 
bool findLinkDest (T *&ptr, const std::string &path, const BaseLink *link)
 
const sofa::core::objectmodel::TagSetgetTags () const
 
bool hasTag (Tag t) const
 
void addTag (Tag t)
 
void removeTag (Tag t)
 
ComponentState getComponentState () const
 
bool isComponentStateValid () const
 

Additional Inherited Members

- Protected Attributes inherited from sofa::component::controller::Controller
Data< bool > handleEventTriggersUpdate
 
Data< bool > d_handleEventTriggersUpdate
 
- Protected Attributes inherited from sofa::core::objectmodel::BaseObject
SingleLink< BaseObject, BaseContext, BaseLink::FLAG_DOUBLELINK > l_context
 
LinkSlaves l_slaves
 
SingleLink< BaseObject, BaseObject, BaseLink::FLAG_DOUBLELINK > l_master
 
- Protected Attributes inherited from sofa::core::objectmodel::Base
std::map< std::string, sofa::core::DataTrackerCallbackm_internalEngine
 
VecData m_vecData
 
MapData m_aliasData
 
VecLink m_vecLink
 
MapLink m_aliasLink
 
- Static Public Member Functions inherited from sofa::core::objectmodel::BaseObject
static bool canCreate (T *, BaseContext *, BaseObjectDescription *)
 
static T::SPtr create (T *, BaseContext *context, BaseObjectDescription *arg)
 
- Static Public Member Functions inherited from sofa::core::objectmodel::Base
static const BaseClassGetClass ()
 
static std::string shortName (const T *ptr=nullptr, BaseObjectDescription *=nullptr)
 
- Protected Member Functions inherited from sofa::component::controller::Controller
 Controller ()
 
 ~Controller () override
 
- Protected Member Functions inherited from sofa::core::objectmodel::BaseObject
 BaseObject ()
 
 ~BaseObject () override
 
virtual void doUpdateInternal ()
 
void changeContextLink (BaseContext *before, BaseContext *&after)
 
void changeSlavesLink (BaseObject::SPtr ptr, std::size_t, bool add)
 
void trackInternalData (const BaseData &data)
 
void cleanTracker ()
 
bool hasDataChanged (const BaseData &data)
 
- Protected Member Functions inherited from sofa::core::objectmodel::Base
 Base ()
 
virtual ~Base ()
 
void initData0 (BaseData *field, BaseData::BaseInitData &res, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 
void initData0 (BaseData *field, BaseData::BaseInitData &res, const char *name, const char *help, BaseData::DataFlags dataFlags)
 
void initData0 (Data< T > *field, typename Data< T >::InitData &res, const T &value, const char *name, const char *help, bool isDisplayed=true, bool isReadOnly=false)
 

Attribute details

◆ allData

allXiToolDataIHP sofa::component::controller::IHPDriver::allData

◆ data

XiToolDataIHP sofa::component::controller::IHPDriver::data

◆ deviceIndex

Data<int> sofa::component::controller::IHPDriver::deviceIndex

index of the device

◆ forceScale

Data<double> sofa::component::controller::IHPDriver::forceScale

Default scale applied to the force feedback.

◆ graspThreshold

Data<double> sofa::component::controller::IHPDriver::graspThreshold

Threshold value under which grasping will launch an event.

◆ indexTool

Data<int> sofa::component::controller::IHPDriver::indexTool

index of the tool to simulate (if more than 1). Index 0 correspond to first tool.

◆ locPosBati

Data<string> sofa::component::controller::IHPDriver::locPosBati

localisation of the restPosition of the bati

◆ maxTool

Data<double> sofa::component::controller::IHPDriver::maxTool

maxTool value

◆ minTool

Data<double> sofa::component::controller::IHPDriver::minTool

minTool value

◆ openTool

Data<Vec1d> sofa::component::controller::IHPDriver::openTool

opening of the tool

◆ operation

bool sofa::component::controller::IHPDriver::operation

◆ otherXitact

vector<IHPDriver*> sofa::component::controller::IHPDriver::otherXitact

◆ permanent

Data<bool> sofa::component::controller::IHPDriver::permanent

Apply the force feedback permanently.

◆ positionBase

Data< VecCoord > sofa::component::controller::IHPDriver::positionBase

position of the base of the device

◆ RefreshFrequency

Data<int> sofa::component::controller::IHPDriver::RefreshFrequency

Frequency of the haptic loop.

◆ Scale

Data<double> sofa::component::controller::IHPDriver::Scale

Default scale applied to the Phantom Coordinates.

◆ showToolStates

Data<bool> sofa::component::controller::IHPDriver::showToolStates

Display states and forces from the tool.

◆ testFF

Data<bool> sofa::component::controller::IHPDriver::testFF

If true will add force when closing handle. As if tool was entering an elastic body.

◆ xitactVisu

Data<bool> sofa::component::controller::IHPDriver::xitactVisu

Visualize the position of the interface in the virtual scene.

Constructor details

◆ IHPDriver()

sofa::component::controller::IHPDriver::IHPDriver ( )

◆ ~IHPDriver()

sofa::component::controller::IHPDriver::~IHPDriver ( )
virtual

Function details

◆ bwdInit()

void sofa::component::controller::IHPDriver::bwdInit ( )
virtual

◆ cleanup()

void sofa::component::controller::IHPDriver::cleanup ( )
virtual

◆ createCallBack()

void sofa::component::controller::IHPDriver::createCallBack ( )

◆ deleteCallBack()

void sofa::component::controller::IHPDriver::deleteCallBack ( )

◆ displayState()

void sofa::component::controller::IHPDriver::displayState ( )

◆ getScale()

double sofa::component::controller::IHPDriver::getScale ( )
inline

◆ graspClosed()

void sofa::component::controller::IHPDriver::graspClosed ( )

◆ init()

void sofa::component::controller::IHPDriver::init ( void  )
virtual

◆ leftButtonPushed()

void sofa::component::controller::IHPDriver::leftButtonPushed ( )

◆ onKeyPressedEvent()

void sofa::component::controller::IHPDriver::onKeyPressedEvent ( core::objectmodel::KeypressedEvent kpe)
virtual

◆ onKeyReleasedEvent()

void sofa::component::controller::IHPDriver::onKeyReleasedEvent ( core::objectmodel::KeyreleasedEvent kre)
virtual

◆ reinit()

void sofa::component::controller::IHPDriver::reinit ( )
virtual

◆ reinitVisual()

void sofa::component::controller::IHPDriver::reinitVisual ( )

◆ reset()

void sofa::component::controller::IHPDriver::reset ( )
virtual

◆ rightButtonPushed()

void sofa::component::controller::IHPDriver::rightButtonPushed ( )

◆ setDataValue()

void sofa::component::controller::IHPDriver::setDataValue ( )

◆ setLCPForceFeedback()

void sofa::component::controller::IHPDriver::setLCPForceFeedback ( LCPForceFeedback< Rigid3dTypes > *  ff)

◆ SOFA_CLASS()

sofa::component::controller::IHPDriver::SOFA_CLASS ( IHPDriver  ,
sofa::component::controller::Controller   
)

◆ stateCallBack()

void sofa::component::controller::IHPDriver::stateCallBack ( )

◆ updateForce()

void sofa::component::controller::IHPDriver::updateForce ( )