circauxiliary.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Pilz GmbH & Co. KG
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CIRCAUXILIARY_H
18 #define CIRCAUXILIARY_H
19 
20 #include <string>
21 
22 #include <moveit_msgs/Constraints.h>
23 
25 {
26 
31 template<class ConfigType, class BuilderType>
33 {
34 public:
35  void setConfiguration(const ConfigType& auxiliary_config);
36  ConfigType& getConfiguration();
37  const ConfigType& getConfiguration() const;
38 
39 public:
40  moveit_msgs::Constraints toPathConstraints() const;
41 
42 private:
43  virtual std::string getConstraintName() const = 0;
44 
45 protected:
46  ConfigType auxiliary_config_;
47 
48 };
49 
50 template<class ConfigType, class BuilderType>
51 void CircAuxiliary<ConfigType, BuilderType>::setConfiguration(const ConfigType& auxiliary_config)
52 {
53  auxiliary_config_ = auxiliary_config;
54 }
55 
56 template<class ConfigType, class BuilderType>
58 {
59  return auxiliary_config_;
60 }
61 
62 template<class ConfigType, class BuilderType>
64 {
65  return auxiliary_config_;
66 }
67 
68 template<class ConfigType, class BuilderType>
69 inline moveit_msgs::Constraints CircAuxiliary<ConfigType, BuilderType>::toPathConstraints() const
70 {
71  return BuilderType().setConstraintName(getConstraintName())
72  .setConfiguration(getConfiguration())
73  .toPathConstraints();
74 }
75 
76 }
77 
78 #endif // CIRCAUXILIARY_H
Base class to define an auxiliary point needed to specify circ commands.
Definition: circauxiliary.h:32
moveit_msgs::Constraints toPathConstraints() const
Definition: circauxiliary.h:69
void setConfiguration(const ConfigType &auxiliary_config)
Definition: circauxiliary.h:51
virtual std::string getConstraintName() const =0


pilz_industrial_motion_testutils
Author(s):
autogenerated on Mon Apr 6 2020 03:17:28