-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5c43b2
commit c308c38
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef ROSUNIT_BOOLCLNT | ||
#define ROSUNIT_BOOLCLNT | ||
|
||
#include <ros/ros.h> | ||
#include <std_srvs/SetBool.h> | ||
|
||
namespace HEAR{ | ||
|
||
class ROSUnitBoolClient { | ||
private: | ||
ros::ServiceClient m_client; | ||
public: | ||
ROSUnitBoolClient(ros::NodeHandle&, std::string); | ||
bool process(bool data); | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "HEAR_ROS/ROSUnit_BoolClnt.hpp" | ||
|
||
namespace HEAR{ | ||
|
||
ROSUnitBoolClient::ROSUnitBoolClient(ros::NodeHandle &nh, std::string t_name){ | ||
m_client = nh.serviceClient<std_srvs::SetBool>(t_name); | ||
} | ||
|
||
bool ROSUnitBoolClient::process(bool data){ | ||
std_srvs::SetBool msg; | ||
msg.request.data = data; | ||
return m_client.call(msg); | ||
} | ||
|
||
} |