Class ForceTorqueSensor
Defined in File force_torque_sensor.hpp
Inheritance Relationships
Base Type
public semantic_components::SemanticComponentInterface< geometry_msgs::msg::Wrench >
(Template Class SemanticComponentInterface)
Class Documentation
-
class ForceTorqueSensor : public semantic_components::SemanticComponentInterface<geometry_msgs::msg::Wrench>
Public Functions
-
inline explicit ForceTorqueSensor(const std::string &name)
Constructor for “standard” 6D FTS.
-
inline ForceTorqueSensor(const std::string &interface_force_x, const std::string &interface_force_y, const std::string &interface_force_z, const std::string &interface_torque_x, const std::string &interface_torque_y, const std::string &interface_torque_z)
Constructor for 6D FTS with custom interface names.
Constructor for 6D FTS with custom interface names or FTS with less then six measurement axes, e.g., 1D and 2D force load cells. For non existing axes interface is empty string, i.e., (“”);
The name should be in the following order: force X, force Y, force Z, torque X, torque Y, torque Z.
-
inline std::array<double, 3> get_forces() const
Return forces.
Return forces of a FTS.
- Returns:
array of size 3 with force values (x, y, z).
-
inline std::array<double, 3> get_torques() const
Return torque.
Return torques of a FTS.
- Returns:
array of size 3 with torque values (x, y, z).
-
inline bool get_values_as_message(geometry_msgs::msg::Wrench &message) const
Return Wrench message with forces and torques.
Constructs and return a wrench message from the current values. The method assumes that the interface names on the construction are in the following order: force X, force Y, force Z, torque X, torque Y, torque Z.
- Returns:
wrench message from values;
Protected Functions
-
inline void update_data_from_interfaces() const
Update the data from the state interfaces.
Note
The method is thread-safe and non-blocking.
Note
This method might return stale data if the data is not updated. This is to ensure that the data from the sensor is not discontinuous.
-
inline explicit ForceTorqueSensor(const std::string &name)