fastcat 0.13.15
C++ EtherCAT Device Command & Control Library
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
fastcat::Fts Class Reference

Class implementing force-torque sensor through fastcat. More...

#include "fts.h"

Inheritance diagram for fastcat::Fts:
Inheritance graph
[legend]
Collaboration diagram for fastcat::Fts:
Collaboration graph
[legend]

Public Member Functions

 Fts ()
 Fts constructor.
 
bool ConfigFromYaml (const YAML::Node &node) override
 Parses input yaml file to set sensor parameters.
 
bool Read () override
 Calculates wrench (forces and torques) from input signals.
 
FaultType Process () override
 Checks if forces and torques have exceeded acceptable maxima.
 
bool Write (DeviceCmd &cmd) override
 Commands device. Only FtsTareCmd is accepted currently.
 
- Public Member Functions inherited from fastcat::DeviceBase
virtual ~DeviceBase ()
 
virtual void Fault ()
 
virtual void Reset ()
 
virtual void SetInitializationTime (double time_sec, double monotonic_time_sec)
 
void RegisterCmdQueue (std::shared_ptr< ThreadSafeQueue< DeviceCmd > > cmd_queue)
 
std::string GetName ()
 
std::shared_ptr< DeviceState > GetState ()
 
void SetTime (double time, double monotonic_time)
 
void SetLoopPeriod (double loop_period)
 

Protected Attributes

std::vector< std::vector< double > > calibration_
 Calibration matrix of doubles for wrench calculation.
 
double wrench_ [FC_FTS_N_DIMS]
 Array where wrench values are stored.
 
double sig_offset_ [FC_FTS_N_DIMS]
 Double array for storing tare offsets.
 
bool enable_fts_guard_fault_ = true
 
double max_force_ [3]
 these values, the entire fastcat system will fault.
 
double max_torque_ [3]
 
- Protected Attributes inherited from fastcat::DeviceBase
std::string name_
 unique device name
 
double last_monotonic_time_ = 0.0
 
double loop_period_ = 0.0
 only some devices need
 
double initialization_time_sec_ = -1
 only some devices need
 
double monotonic_initialization_time_sec_ = -1
 only some devices need
 
bool device_fault_active_ = false
 device-level fault, manager also has fault status flag
 
std::shared_ptr< DeviceState > state_
 Fastcat state data.
 
std::shared_ptr< ThreadSafeQueue< DeviceCmd > > cmd_queue_
 for intra-device commands
 

Additional Inherited Members

- Public Attributes inherited from fastcat::DeviceBase
std::vector< Signal > signals_
 

Detailed Description

Class implementing force-torque sensor through fastcat.

Constructor & Destructor Documentation

◆ Fts()

fastcat::Fts::Fts ( )

Fts constructor.

Member Function Documentation

◆ ConfigFromYaml()

bool fastcat::Fts::ConfigFromYaml ( const YAML::Node &  node)
overridevirtual

Parses input yaml file to set sensor parameters.

Parameters
nodeThe portion of the yaml file corresponding to this FTS device.
Returns
True if configuration completes without error; false otherwise.

Implements fastcat::DeviceBase.

Reimplemented in fastcat::VirtualFts.

Here is the call graph for this function:

◆ Process()

fastcat::FaultType fastcat::Fts::Process ( )
overridevirtual

Checks if forces and torques have exceeded acceptable maxima.

Returns
FaultType enum value corresponding to appropriate fault state.

Reimplemented from fastcat::DeviceBase.

◆ Read()

bool fastcat::Fts::Read ( )
overridevirtual

Calculates wrench (forces and torques) from input signals.

Returns
True if device state is read without error; false otherwise.

Implements fastcat::DeviceBase.

Reimplemented in fastcat::VirtualFts.

Here is the call graph for this function:

◆ Write()

bool fastcat::Fts::Write ( DeviceCmd &  cmd)
overridevirtual

Commands device. Only FtsTareCmd is accepted currently.

Parameters
cmdCommand provided to FTS device, of a type that is a subclass of DeviceCmd.
Returns
True if command is accepted; false otherwise.

Reimplemented from fastcat::DeviceBase.

Member Data Documentation

◆ calibration_

std::vector<std::vector<double> > fastcat::Fts::calibration_
protected

Calibration matrix of doubles for wrench calculation.

◆ enable_fts_guard_fault_

bool fastcat::Fts::enable_fts_guard_fault_ = true
protected

◆ max_force_

double fastcat::Fts::max_force_[3]
protected
Initial value:
= {
0, 0, 0}

these values, the entire fastcat system will fault.

If x,y,z axis of force components exceeds

◆ max_torque_

double fastcat::Fts::max_torque_[3]
protected
Initial value:
= {
0, 0, 0}

If x,y,z axis of torque components exceeds these values, the entire fastcat system will fault.

◆ sig_offset_

double fastcat::Fts::sig_offset_[FC_FTS_N_DIMS]
protected
Initial value:
= {
0}

Double array for storing tare offsets.

◆ wrench_

double fastcat::Fts::wrench_[FC_FTS_N_DIMS]
protected
Initial value:
= {
0}

Array where wrench values are stored.


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