SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
scl::CHapticsBase Class Referenceabstract

#include <CHapticsBase.hpp>

Inheritance diagram for scl::CHapticsBase:
Inheritance graph
[legend]
Collaboration diagram for scl::CHapticsBase:
Collaboration graph
[legend]

Public Member Functions

 CHapticsBase ()
 
virtual ~CHapticsBase ()
 
virtual scl::sInt connectToDevices ()=0
 
virtual scl::sBool getHapticDevicePosition (const sUInt arg_id, Eigen::VectorXd &ret_pos_vec) const =0
 
virtual scl::sBool getAllHapticDevicePositions (std::vector< Eigen::VectorXd > &ret_pos_vec) const =0
 
virtual scl::sBool setHapticDeviceActuator (const sUInt arg_id, const Eigen::VectorXd &arg_cmd_vec)=0
 
virtual scl::sBool setAllHapticDeviceActuators (const std::vector< Eigen::VectorXd > &arg_cmd_vec)=0
 
virtual scl::sBool closeConnectionToDevices ()=0
 
virtual scl::sUInt getNumDevicesConnected ()=0
 
virtual const std::string & getType () const
 
virtual const std::string & getName () const
 
virtual bool hasBeenInit () const
 

Public Attributes

std::string name_
 
sBool has_been_init_
 

Protected Attributes

std::string type_
 

Detailed Description

This class is a simple API to access a haptics subsystem. It is designed to abstract the actual device initialization and operation. Provides a high level interface to get device positions for multiple haptic devices and specify their control torques.

Constructor & Destructor Documentation

scl::CHapticsBase::CHapticsBase ( )
inline

Default constructor. Does nothing.

virtual scl::CHapticsBase::~CHapticsBase ( )
inlinevirtual

Default destructor. Closes haptic connections.

Member Function Documentation

virtual scl::sInt scl::CHapticsBase::connectToDevices ( )
pure virtual

Connects to the haptic devices. Returns: success : The number of devices it found. failure : -1

Implemented in scl::CHapticsChai.

virtual scl::sBool scl::CHapticsBase::getAllHapticDevicePositions ( std::vector< Eigen::VectorXd > &  ret_pos_vec) const
pure virtual

Get the present state of all the haptic devices. This is typically the position, but can also include the orientation and/or a push button.

Implemented in scl::CHapticsChai.

virtual scl::sBool scl::CHapticsBase::getHapticDevicePosition ( const sUInt  arg_id,
Eigen::VectorXd &  ret_pos_vec 
) const
pure virtual

Get the present state of a single haptic devices. This is typically the position, but can also include the orientation and/or a push button.

Implemented in scl::CHapticsChai.

virtual const std::string& scl::SObject::getName ( ) const
inlinevirtualinherited

Get the object's type

virtual scl::sUInt scl::CHapticsBase::getNumDevicesConnected ( )
pure virtual

Returns the number of currently connected devices

Implemented in scl::CHapticsChai.

virtual const std::string& scl::SObject::getType ( ) const
inlinevirtualinherited

Get the object's type

virtual bool scl::SObject::hasBeenInit ( ) const
inlinevirtualinherited

Get the object's type

virtual scl::sBool scl::CHapticsBase::setAllHapticDeviceActuators ( const std::vector< Eigen::VectorXd > &  arg_cmd_vec)
pure virtual

Sets the actuators on the haptic devices.

Implemented in scl::CHapticsChai.

virtual scl::sBool scl::CHapticsBase::setHapticDeviceActuator ( const sUInt  arg_id,
const Eigen::VectorXd &  arg_cmd_vec 
)
pure virtual

Sets the actuators on the haptic devices.

Implemented in scl::CHapticsChai.

Member Data Documentation

sBool scl::SObject::has_been_init_
inherited

Whether the object is ready for use

std::string scl::SObject::name_
inherited

The object's name

std::string scl::SObject::type_
protectedinherited

The object's type. Should only be set by the constructor


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