Extract test constants
This commit is contained in:
parent
39d2a9e2e7
commit
bf4d589dcb
8 changed files with 48 additions and 20 deletions
|
@ -17,14 +17,17 @@
|
|||
#include "rclcpp/rclcpp.hpp"
|
||||
#include "std_srvs/srv/empty.hpp"
|
||||
|
||||
#define NODE_NAME "test_service"
|
||||
#define SERVICE_NAME "the_service"
|
||||
|
||||
class ServiceNode : public rclcpp::Node
|
||||
{
|
||||
public:
|
||||
explicit ServiceNode(rclcpp::NodeOptions options)
|
||||
: Node("test_service", options)
|
||||
: Node(NODE_NAME, options)
|
||||
{
|
||||
srv_ = this->create_service<std_srvs::srv::Empty>(
|
||||
"the_service",
|
||||
SERVICE_NAME,
|
||||
std::bind(
|
||||
&ServiceNode::service_callback,
|
||||
this,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue