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

Server wrapper for object pose. More...

#include <sas_object_server.hpp>

Inheritance diagram for sas::ObjectServer:
sas::Object

Public Member Functions

 ObjectServer (const ObjectServer &)=delete
 
 ObjectServer (const std::shared_ptr< Node > &node, const std::string topic_prefix="GET_FROM_NODE")
 Construct a new ObjectServer.
 
void send_pose (const DQ &pose)
 Publish the provided pose to the configured topic.
 
DQ get_target_pose () const
 Get the currently stored target pose.
 
bool is_enabled () const
 Query whether the server is enabled.
 
std::string get_topic_prefix () const
 Get the configured topic prefix.
 

Detailed Description

Server wrapper for object pose.

The ObjectServer exposes a simple interface to receive and publish geometry_msgs::msg::PoseStamped messages representing target and current poses of an object. Internally the target pose is stored using DQ_robotics::DQ. The class provides methods to send the current pose, retrieve the target pose and query configuration such as the topic prefix and enabled state.

Constructor & Destructor Documentation

◆ ObjectServer()

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

Construct a new ObjectServer.

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

DQ sas::ObjectServer::get_target_pose ( ) const

Get the currently stored target pose.

Returns
DQ The target pose stored by the server.

◆ get_topic_prefix()

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

Get the configured topic prefix.

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

◆ is_enabled()

bool sas::ObjectServer::is_enabled ( ) const

Query whether the server is enabled.

Returns
true if enabled, false otherwise.

◆ send_pose()

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

Publish the provided pose to the configured topic.

Parameters
poseThe pose to publish as a target (DQ representation).

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