|
sas
Modularised monitoring, logging, and control of robots.
|
Client wrapper for object pose. More...
#include <sas_object_client.hpp>
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. | |
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.
| sas::ObjectClient::ObjectClient | ( | const std::shared_ptr< Node > & | node, |
| const std::string | topic_prefix = "GET_FROM_NODE" |
||
| ) |
Construct a new ObjectClient.
| 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::ObjectClient::get_pose | ( | ) | const |
Get the last received pose.
| std::string sas::ObjectClient::get_topic_prefix | ( | ) | const |
Get the configured topic prefix.
| bool sas::ObjectClient::is_enabled | ( | ) | const |
Query whether the client is enabled.
| 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.
| pose | The pose to send (DQ representation). |