trigger.cpp
Go to the documentation of this file.
1 #include <string>
2 
4 #include <ros/init.h>
5 #include <ros/node_handle.h>
6 #include <ros/param.h>
7 
8 #include <boost/regex.hpp>
9 
10 int main(int argc, char *argv[]) {
11  ros::init(argc, argv, "remote_rosbag_trigger");
12  ros::NodeHandle nh;
13 
14  // load regular expression services should match
15  boost::regex regex;
16  {
17  std::string regex_str;
18  if (!ros::param::get("~regex", regex_str)) {
19  ROS_ERROR("param '~regex' is required");
20  return 0;
21  }
22  regex = regex_str;
23  }
24 
25  // call all services which match the regex
26  remote_rosbag_record::call(regex, ros::param::param("~verbose", true));
27 
28  return 0;
29 }
bool param(const std::string &param_name, T &param_val, const T &default_val)
int main(int argc, char *argv[])
Definition: trigger.cpp:10
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
static std::size_t call(const boost::regex &expression, const bool verbose=true)
Definition: call.hpp:20
ROSCPP_DECL bool get(const std::string &key, std::string &s)
#define ROS_ERROR(...)


remote_rosbag_record
Author(s):
autogenerated on Wed Jan 27 2021 03:18:31