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 {
30 template <class ConfigType, class BuilderType>
32 {
33 public:
34  void setConfiguration(const ConfigType& auxiliary_config);
35  ConfigType& getConfiguration();
36  const ConfigType& getConfiguration() const;
37 
38 public:
39  moveit_msgs::Constraints toPathConstraints() const;
40 
41 private:
42  virtual std::string getConstraintName() const = 0;
43 
44 protected:
45  ConfigType auxiliary_config_;
46 };
47 
48 template <class ConfigType, class BuilderType>
49 void CircAuxiliary<ConfigType, BuilderType>::setConfiguration(const ConfigType& auxiliary_config)
50 {
51  auxiliary_config_ = auxiliary_config;
52 }
53 
54 template <class ConfigType, class BuilderType>
56 {
57  return auxiliary_config_;
58 }
59 
60 template <class ConfigType, class BuilderType>
62 {
63  return auxiliary_config_;
64 }
65 
66 template <class ConfigType, class BuilderType>
67 inline moveit_msgs::Constraints CircAuxiliary<ConfigType, BuilderType>::toPathConstraints() const
68 {
69  return BuilderType().setConstraintName(getConstraintName()).setConfiguration(getConfiguration()).toPathConstraints();
70 }
71 
72 } // namespace pilz_industrial_motion_testutils
73 
74 #endif // CIRCAUXILIARY_H
Base class to define an auxiliary point needed to specify circ commands.
Definition: circauxiliary.h:31
void setConfiguration(const ConfigType &auxiliary_config)
Definition: circauxiliary.h:49
moveit_msgs::Constraints toPathConstraints() const
Definition: circauxiliary.h:67
virtual std::string getConstraintName() const =0


pilz_industrial_motion_testutils
Author(s):
autogenerated on Mon Feb 28 2022 23:13:36