hebiros_services.h
Go to the documentation of this file.
1 #ifndef HEBIROS_SERVICES_H
2 #define HEBIROS_SERVICES_H
3 
4 #include "ros/ros.h"
5 #include "urdf/model.h"
6 
7 #include "hebiros/EntryListSrv.h"
8 #include "hebiros/AddGroupFromNamesSrv.h"
9 #include "hebiros/AddGroupFromURDFSrv.h"
10 #include "hebiros/AddModelFromURDFSrv.h"
11 #include "hebiros/ModelFkSrv.h"
12 #include "hebiros/SizeSrv.h"
13 #include "hebiros/SetFeedbackFrequencySrv.h"
14 #include "hebiros/SetCommandLifetimeSrv.h"
15 #include "hebiros/SendCommandWithAcknowledgementSrv.h"
16 
17 #include "hebiros_group.h"
18 
19 using namespace hebiros;
20 
22 
23  public:
24 
25  static std::map<std::string, ros::ServiceServer> services;
26 
27  virtual void registerNodeServices() {}
28 
29  virtual void registerGroupServices(std::string group_name) {}
30 
31  void registerModelServices(const std::string& model_name);
32 
33  bool entryList(
34  EntryListSrv::Request &req, EntryListSrv::Response &res);
35 
36  bool addGroup(
37  AddGroupFromNamesSrv::Request &req, AddGroupFromNamesSrv::Response &res,
38  const std::map<std::string, std::string>& joint_full_names,
39  std::unique_ptr<HebirosGroup> group_tmp);
40 
41  bool addGroupFromNames(
42  AddGroupFromNamesSrv::Request &req, AddGroupFromNamesSrv::Response &res);
43 
44  bool addGroupFromURDF(
45  AddGroupFromURDFSrv::Request &req, AddGroupFromURDFSrv::Response &res);
46 
47  bool addModelFromURDF(
48  AddModelFromURDFSrv::Request &req, AddModelFromURDFSrv::Response &res);
49 
50  bool size(
51  SizeSrv::Request &req, SizeSrv::Response &res, std::string group_name);
52 
53  bool setFeedbackFrequency(
54  SetFeedbackFrequencySrv::Request &req, SetFeedbackFrequencySrv::Response &res,
55  std::string group_name);
56 
57  bool setCommandLifetime(
58  SetCommandLifetimeSrv::Request &req, SetCommandLifetimeSrv::Response &res,
59  std::string group_name);
60 
61  bool sendCommandWithAcknowledgement(
62  SendCommandWithAcknowledgementSrv::Request &req,
63  SendCommandWithAcknowledgementSrv::Response &res, std::string group_name);
64 
65  bool split(const std::string &orig, std::string &name, std::string &family);
66 
67  void addJointChildren(std::set<std::string>& names, std::set<std::string>& families,
68  std::map<std::string, std::string>& full_names, const urdf::Link* link);
69 
70  bool fk(ModelFkSrv::Request& req, ModelFkSrv::Response& res, const std::string& model_name);
71 };
72 
73 #endif
virtual void registerGroupServices(std::string group_name)
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
virtual void registerNodeServices()
static std::map< std::string, ros::ServiceServer > services


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:08:14