|
sas
Modularised monitoring, logging, and control of robots.
|
Server wrapper for object pose. More...
#include <sas_object_server.hpp>
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. | |
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.
| sas::ObjectServer::ObjectServer | ( | const std::shared_ptr< Node > & | node, |
| const std::string | topic_prefix = "GET_FROM_NODE" |
||
| ) |
Construct a new ObjectServer.
| node | Shared pointer to the rclcpp::Node used for ROS communications. |
| topic_prefix | Topic prefix used for publisher/subscriber names. Defaults to "GET_FROM_NODE". |
| DQ sas::ObjectServer::get_target_pose | ( | ) | const |
Get the currently stored target pose.
| std::string sas::ObjectServer::get_topic_prefix | ( | ) | const |
Get the configured topic prefix.
| bool sas::ObjectServer::is_enabled | ( | ) | const |
Query whether the server is enabled.
| void sas::ObjectServer::send_pose | ( | const DQ & | pose | ) |
Publish the provided pose to the configured topic.
| pose | The pose to publish as a target (DQ representation). |