16 #ifndef SURGSIM_DEVICES_DEVICEFILTERS_FORCESCALE_H
17 #define SURGSIM_DEVICES_DEVICEFILTERS_FORCESCALE_H
19 #include <boost/thread/mutex.hpp>
122 #endif // SURGSIM_DEVICES_DEVICEFILTERS_FORCESCALE_H
void setForceScale(double forceScale)
Set the force scale factor so that each direction has the same scale.
Definition: ForceScale.cpp:128
ForceScale(const std::string &name)
Constructor.
Definition: ForceScale.cpp:30
void setTorqueScale(double torqueScale)
Set the torque scale factor so that each direction has the same scale.
Definition: ForceScale.cpp:134
Definition: DriveElementFromInputBehavior.cpp:27
virtual ~ForceScale()
Destructor.
Definition: ForceScale.cpp:42
int m_forceIndex
Definition: ForceScale.h:109
virtual bool finalize() override
Finalize (de-initialize) the device.
Definition: ForceScale.cpp:52
int m_torqueIndex
Definition: ForceScale.h:110
int m_springJacobianIndex
Definition: ForceScale.h:111
int m_damperJacobianIndex
Definition: ForceScale.h:112
virtual void handleInput(const std::string &device, const SurgSim::DataStructures::DataGroup &inputData) override
Notifies the consumer that the application input coming from the device has been updated.
Definition: ForceScale.cpp:62
An output device filter that scales forces and/or torques.
Definition: ForceScale.h:37
A collection of NamedData objects.
Definition: DataGroup.h:66
bool m_cachedOutputIndices
True if the output DataGroup indices have been cached.
Definition: ForceScale.h:116
double m_forceScale
The scaling factor applied to each direction of the force.
Definition: ForceScale.h:102
boost::mutex m_mutex
The mutex that protects the scaling factors.
Definition: ForceScale.h:99
virtual void initializeInput(const std::string &device, const SurgSim::DataStructures::DataGroup &inputData) override
Set the initial input data.
Definition: ForceScale.cpp:57
virtual bool initialize() override
Fully initialize the device.
Definition: ForceScale.cpp:47
double m_torqueScale
The scaling factor applied to each direction of the torque.
Definition: ForceScale.h:105
void outputFilter(const SurgSim::DataStructures::DataGroup &dataToFilter, SurgSim::DataStructures::DataGroup *result)
Filter the output data, scaling the forces and torques.
Definition: ForceScale.cpp:89
virtual bool requestOutput(const std::string &device, SurgSim::DataStructures::DataGroup *outputData) override
Asks the producer to provide output state to the device.
Definition: ForceScale.cpp:68