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

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

#include <sas_force_sensor_server.hpp>

Inheritance diagram for sas::ForceSensorServer:
sas::Object

Public Member Functions

 ForceSensorServer (const ForceSensorServer &)=delete
 ForceSensorServer (const std::shared_ptr< Node > &node, const std::string &topic_prefix="GET_FROM_NODE")
 Construct a new ForceSensorServer.
void send_force_torque (const DQ &force, const DQ &torque) const
 Publish the current force/torque reading.
std::string get_topic_prefix () const
 Get the configured topic prefix.

Detailed Description

Server for force/torque sensor readings.

ForceSensorServer publishes force/torque readings, obtained from a physical (or simulated) force sensor, as a geometry_msgs/msg/WrenchStamped message. Any number of sas::ForceSensorClient instances can subscribe to that topic to retrieve the latest reading.

Constructor & Destructor Documentation

◆ ForceSensorServer()

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

Construct a new ForceSensorServer.

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_topic_prefix()

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

Get the configured topic prefix.

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

◆ send_force_torque()

void sas::ForceSensorServer::send_force_torque ( const DQ & force,
const DQ & torque ) const

Publish the current force/torque reading.

Parameters
forceDQ (pure quaternion) representing the sensed force vector.
torqueDQ (pure quaternion) representing the sensed torque vector.

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