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

Client wrapper for object pose. More...

#include <sas_object_client.hpp>

Inheritance diagram for sas::ObjectClient:
sas::Object

Public Member Functions

 ObjectClient (const ObjectClient &)=delete
 
 ObjectClient (const std::shared_ptr< Node > &node, const std::string topic_prefix="GET_FROM_NODE")
 Construct a new ObjectClient.
 
void send_pose (const DQ &pose)
 Publish the provided pose to the configured topic.
 
DQ get_pose () const
 Get the last received pose.
 
bool is_enabled () const
 Query whether the client is enabled.
 
std::string get_topic_prefix () const
 Get the configured topic prefix.
 

Detailed Description

Client wrapper for object pose.

The ObjectClient connects to a ROS node to subscribe and publish geometry_msgs::msg::PoseStamped messages representing an object's pose. Internally the pose is stored using DQ_robotics::DQ. The class exposes simple methods to send and retrieve the pose as well as to query configuration such as the topic prefix and enabled state.

Constructor & Destructor Documentation

◆ ObjectClient()

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

Construct a new ObjectClient.

Parameters
nodeShared pointer to the rclcpp::Node used for ROS communications.
topic_prefixTopic prefix used for publisher/subscriber names. Defaults to "GET_FROM_NODE".

Member Function Documentation

◆ get_pose()

DQ sas::ObjectClient::get_pose ( ) const

Get the last received pose.

Returns
DQ The last pose received via the subscription (or Exception if none received).

◆ get_topic_prefix()

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

Get the configured topic prefix.

Returns
std::string The topic prefix used by this client.

◆ is_enabled()

bool sas::ObjectClient::is_enabled ( ) const

Query whether the client is enabled.

Returns
true if enabled, false otherwise.

◆ send_pose()

void sas::ObjectClient::send_pose ( const DQ &  pose)

Publish the provided pose to the configured topic.

This will publish the given DQ pose using the internal publisher.

Parameters
poseThe pose to send (DQ representation).

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