RosGenericTask.h
Go to the documentation of this file.
1 //| This file is a part of the ORCA framework.
2 //|
3 //| Copyright 2018, Fuzzy Logic Robotics
4 //| Copyright 2017, ISIR / Universite Pierre et Marie Curie (UPMC)
5 //|
6 //| Main contributor(s): Antoine Hoarau, Ryan Lober, and
7 //| Fuzzy Logic Robotics <info@fuzzylogicrobotics.com>
8 //|
9 //| ORCA is a whole-body reactive controller framework for robotics.
10 //|
11 //| This software is governed by the CeCILL-C license under French law and
12 //| abiding by the rules of distribution of free software. You can use,
13 //| modify and/ or redistribute the software under the terms of the CeCILL-C
14 //| license as circulated by CEA, CNRS and INRIA at the following URL
15 //| "http://www.cecill.info".
16 //|
17 //| As a counterpart to the access to the source code and rights to copy,
18 //| modify and redistribute granted by the license, users are provided only
19 //| with a limited warranty and the software's author, the holder of the
20 //| economic rights, and the successive licensors have only limited
21 //| liability.
22 //|
23 //| In this respect, the user's attention is drawn to the risks associated
24 //| with loading, using, modifying and/or developing or reproducing the
25 //| software by the user in light of its specific status of free software,
26 //| that may mean that it is complicated to manipulate, and that also
27 //| therefore means that it is reserved for developers and experienced
28 //| professionals having in-depth computer knowledge. Users are therefore
29 //| encouraged to load and test the software's suitability as regards their
30 //| requirements in conditions enabling the security of their systems and/or
31 //| data to be ensured and, more generally, to use and operate it in the
32 //| same conditions as regards security.
33 //|
34 //| The fact that you are presently reading this means that you have had
35 //| knowledge of the CeCILL-C license and that you accept its terms.
36 
37 #pragma once
38 
39 #include <ros/ros.h>
40 #include <orca/task/GenericTask.h>
42 namespace orca_ros
43 {
44 
45 namespace task
46 {
48  {
49  public:
50  RosGenericTask(const std::string& robot_name,
51  const std::string& controller_name,
52  std::shared_ptr<orca::task::GenericTask> gen_task);
53  virtual ~RosGenericTask();
54 
55  public:
56  bool getWeightService( orca_ros::GetDouble::Request& req,
57  orca_ros::GetDouble::Response& res
58  );
59  bool setWeightService( orca_ros::SetDouble::Request& req,
60  orca_ros::SetDouble::Response& res
61  );
62  bool getSizeService( orca_ros::GetSize::Request& req,
63  orca_ros::GetSize::Response& res
64  );
65  bool colsService( orca_ros::GetInt::Request& req,
66  orca_ros::GetInt::Response& res
67  );
68  bool rowsService( orca_ros::GetInt::Request& req,
69  orca_ros::GetInt::Response& res
70  );
71  bool getEService( orca_ros::GetMatrix::Request& req,
72  orca_ros::GetMatrix::Response& res
73  );
74  bool getfService( orca_ros::GetMatrix::Request& req,
75  orca_ros::GetMatrix::Response& res
76  );
77  bool printService( std_srvs::Empty::Request& req,
78  std_srvs::Empty::Response& res
79  );
80  bool setEService( orca_ros::SetMatrix::Request& req,
81  orca_ros::SetMatrix::Response& res
82  );
83  bool setfService( orca_ros::SetMatrix::Request& req,
84  orca_ros::SetMatrix::Response& res
85  );
86 
87 
88 
89 
90  private:
91  std::shared_ptr<orca::task::GenericTask> gt_;
92 
93  ros::ServiceServer ss_getWeightService_;
94  ros::ServiceServer ss_setWeightService_;
95  ros::ServiceServer ss_getSizeService_;
96  ros::ServiceServer ss_colsService_;
97  ros::ServiceServer ss_rowsService_;
98  ros::ServiceServer ss_getEService_;
99  ros::ServiceServer ss_getfService_;
100  ros::ServiceServer ss_printService_;
101  ros::ServiceServer ss_setEService_;
102  ros::ServiceServer ss_setfService_;
103 
104  };
105 
106 } // namespace task
107 } // namespace orca_ros
bool getEService(orca_ros::GetMatrix::Request &req, orca_ros::GetMatrix::Response &res)
Definition: RosGenericTask.cc:55
virtual ~RosGenericTask()
Definition: RosGenericTask.cc:23
Definition: RosTaskBase.h:47
bool setfService(orca_ros::SetMatrix::Request &req, orca_ros::SetMatrix::Response &res)
Definition: RosGenericTask.cc:77
bool getSizeService(orca_ros::GetSize::Request &req, orca_ros::GetSize::Response &res)
Definition: RosGenericTask.cc:38
bool setWeightService(orca_ros::SetDouble::Request &req, orca_ros::SetDouble::Response &res)
Definition: RosGenericTask.cc:33
RosGenericTask(const std::string &robot_name, const std::string &controller_name, std::shared_ptr< orca::task::GenericTask > gen_task)
Definition: RosGenericTask.cc:5
bool getWeightService(orca_ros::GetDouble::Request &req, orca_ros::GetDouble::Response &res)
Definition: RosGenericTask.cc:28
Definition: RosCartesianAccelerationPID.h:42
bool printService(std_srvs::Empty::Request &req, std_srvs::Empty::Response &res)
Definition: RosGenericTask.cc:67
bool getfService(orca_ros::GetMatrix::Request &req, orca_ros::GetMatrix::Response &res)
Definition: RosGenericTask.cc:61
bool setEService(orca_ros::SetMatrix::Request &req, orca_ros::SetMatrix::Response &res)
Definition: RosGenericTask.cc:72
bool colsService(orca_ros::GetInt::Request &req, orca_ros::GetInt::Response &res)
Definition: RosGenericTask.cc:45
Definition: RosGenericTask.h:47
bool rowsService(orca_ros::GetInt::Request &req, orca_ros::GetInt::Response &res)
Definition: RosGenericTask.cc:50