16 #ifndef SURGSIM_TESTING_VISUALTESTCOMMON_MOVINGSQUAREFORCE_H 17 #define SURGSIM_TESTING_VISUALTESTCOMMON_MOVINGSQUAREFORCE_H 102 #endif // SURGSIM_TESTING_VISUALTESTCOMMON_MOVINGSQUAREFORCE_H SurgSim::Framework::LockedContainer< SquarePoseVectors > m_square
Points and directions defined by the pose of the square.
Definition: MovingSquareForce.h:94
SurgSim::DataStructures::DataGroup m_outputData
Internally stored output data (force and torque).
Definition: MovingSquareForce.h:84
const std::string m_toolDeviceName
Name of the device used as the tool.
Definition: MovingSquareForce.h:79
SurgSim::Math::Vector3d m_tipPoint
The location of the "tip" (i.e. interacting point) of the tool, in the local frame relative to the to...
Definition: MovingSquareForce.h:99
SurgSim::Math::Vector3d center
The location of the center of the square in world coordinates.
Definition: MovingSquareForce.h:74
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: MovingSquareForce.cpp:65
MovingSquareForce(const std::string &toolDeviceName, const std::string &squareDeviceName)
Constructor.
Definition: MovingSquareForce.cpp:43
double m_forceLimit
The maximum force before the application allows the tool to pop through.
Definition: MovingSquareForce.h:91
SurgSim::Math::Vector3d normal
The unit normal vector of the square.
Definition: MovingSquareForce.h:68
SurgSim::Math::Vector3d edgeDirectionY
The unit direction along the other pair of edges of the square.
Definition: MovingSquareForce.h:72
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
virtual bool requestOutput(const std::string &device, SurgSim::DataStructures::DataGroup *outputData) override
Asks the producer to provide output state to the device.
Definition: MovingSquareForce.cpp:116
A simple listener to calculate collision force against a square area for the example application...
Definition: MovingSquareForce.h:31
A collection of NamedData objects.
Definition: DataGroup.h:66
void updateTool(const SurgSim::DataStructures::DataGroup &toolInputData)
Updates the state of the tool as described by toolInputData.
Definition: MovingSquareForce.cpp:81
SquarePoseVectors()
Constructor.
Definition: MovingSquareForce.cpp:34
SurgSim::Math::Vector3d computeForce(const SurgSim::Math::Vector3d &position)
Calculates the force as a function of device tip position.
Definition: MovingSquareForce.cpp:122
A simple thread-safe data container that can support multiple writers and readers.
Definition: LockedContainer.h:54
double m_squareNormalDirection
The current sign of the direction of the normal vector of the square.
Definition: MovingSquareForce.h:96
virtual void initializeInput(const std::string &device, const SurgSim::DataStructures::DataGroup &inputData) override
Set the initial input data group.
Definition: MovingSquareForce.cpp:61
const std::string m_squareDeviceName
Name of the device used to move the square.
Definition: MovingSquareForce.h:81
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:56
double m_surfaceStiffness
The surface stiffness, in newtons per meter.
Definition: MovingSquareForce.h:89
double m_squareHalfSize
One half of the edge length of the square we're colliding against, in meters.
Definition: MovingSquareForce.h:87
void updateSquare(const SurgSim::DataStructures::DataGroup &squareInputData)
Updates the state of the square as described by squareInputData.
Definition: MovingSquareForce.cpp:98
SurgSim::Math::Vector3d edgeDirectionX
The unit direction along one of the pairs edges of the square.
Definition: MovingSquareForce.h:70
State defined by the pose of the square.
Definition: MovingSquareForce.h:62