|
sas
Modularised monitoring, logging, and control of robots.
|
Client for controlling a simulator via ROS services. More...
#include <sas_simulator_client.hpp>
Public Member Functions | |
| SimulatorClient (const SimulatorClient &)=delete | |
| SimulatorClient (const std::shared_ptr< Node > &node, const std::string topic_prefix="GET_FROM_NODE") | |
| Construct a new SimulatorClient. | |
| bool | start_simulation () |
| Call the start simulation service. | |
| bool | stop_simulation () |
| Call the stop simulation service. | |
| bool | is_enabled () const |
| Query whether the client is enabled. | |
| std::string | get_topic_prefix () const |
| Get the configured topic/service prefix. | |
Client for controlling a simulator via ROS services.
The SimulatorClient provides a lightweight interface to call start/stop simulation services (std_srvs::srv::Trigger) and to query configuration such as whether the client is enabled and the topic/service prefix.
| sas::SimulatorClient::SimulatorClient | ( | const std::shared_ptr< Node > & | node, |
| const std::string | topic_prefix = "GET_FROM_NODE" |
||
| ) |
Construct a new SimulatorClient.
| node | Shared pointer to the rclcpp::Node used for ROS communications. |
| topic_prefix | Topic/service prefix used to build service names. Defaults to "GET_FROM_NODE". |
| std::string sas::SimulatorClient::get_topic_prefix | ( | ) | const |
Get the configured topic/service prefix.
| bool sas::SimulatorClient::is_enabled | ( | ) | const |
Query whether the client is enabled.
| bool sas::SimulatorClient::start_simulation | ( | ) |
Call the start simulation service.
Invokes the configured start service and returns true if the call succeeded and the service responded positively.
| bool sas::SimulatorClient::stop_simulation | ( | ) |
Call the stop simulation service.
Invokes the configured stop service and returns true if the call succeeded and the service responded positively.