sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
sas::ForceSensorClient Class Reference

Client for force/torque sensor readings. More...

#include <sas_force_sensor_client.hpp>

Inheritance diagram for sas::ForceSensorClient:
sas::Object

Public Member Functions

 ForceSensorClient (const ForceSensorClient &)=delete
 ForceSensorClient (const std::shared_ptr< Node > &node, const std::string &topic_prefix="GET_FROM_NODE")
 Construct a new ForceSensorClient.
bool is_enabled () const
 Check whether the client has received at least one force/torque reading.
DQ get_force () const
 Get the last received force reading.
DQ get_torque () const
 Get the last received torque reading.
std::string get_topic_prefix () const
 Get the configured topic prefix.

Detailed Description

Client for force/torque sensor readings.

ForceSensorClient subscribes to the geometry_msgs/msg/WrenchStamped topic published by a sas::ForceSensorServer and exposes the latest force and torque readings as dqrobotics DQ (pure quaternion) objects.

Constructor & Destructor Documentation

◆ ForceSensorClient()

sas::ForceSensorClient::ForceSensorClient ( const std::shared_ptr< Node > & node,
const std::string & topic_prefix = "GET_FROM_NODE" )

Construct a new ForceSensorClient.

Parameters
nodeShared pointer to the rclcpp::Node used for communication.
topic_prefixPrefix used to compose the ROS topic name (defaults to "GET_FROM_NODE", in which case the node name is used).

Member Function Documentation

◆ get_force()

DQ sas::ForceSensorClient::get_force ( ) const

Get the last received force reading.

Returns
DQ (pure quaternion) representing the sensed force vector.
Exceptions
std::runtime_errorif the client is not enabled yet.

◆ get_topic_prefix()

std::string sas::ForceSensorClient::get_topic_prefix ( ) const

Get the configured topic prefix.

Returns
std::string Topic prefix used by this client.

◆ get_torque()

DQ sas::ForceSensorClient::get_torque ( ) const

Get the last received torque reading.

Returns
DQ (pure quaternion) representing the sensed torque vector.
Exceptions
std::runtime_errorif the client is not enabled yet.

◆ is_enabled()

bool sas::ForceSensorClient::is_enabled ( ) const

Check whether the client has received at least one force/torque reading.

Returns
true if enabled, false otherwise.

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