motioncmd.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 MOTIONCMD_H
18 #define MOTIONCMD_H
19 
20 #include <string>
21 #include <memory>
22 
24 
26 {
31 {
32 public:
34  {
35  }
36 
37 public:
38  void setPlanningGroup(const std::string& planning_group);
39  const std::string& getPlanningGroup() const;
40 
41  void setVelocityScale(double velocity_scale);
42  void setAccelerationScale(double acceleration_scale);
43 
44 protected:
45  std::string planning_group_;
47  std::string target_link_;
48  double vel_scale_{ 1.0 };
49  double acc_scale_{ 1.0 };
50 };
51 
52 inline void MotionCmd::setPlanningGroup(const std::string& planning_group)
53 {
54  planning_group_ = planning_group;
55 }
56 
57 inline const std::string& MotionCmd::getPlanningGroup() const
58 {
59  return planning_group_;
60 }
61 
62 inline void MotionCmd::setVelocityScale(double velocity_scale)
63 {
64  vel_scale_ = velocity_scale;
65 }
66 
67 inline void MotionCmd::setAccelerationScale(double acceleration_scale)
68 {
69  acc_scale_ = acceleration_scale;
70 }
71 
72 using MotionCmdUPtr = std::unique_ptr<MotionCmd>;
73 
74 } // namespace pilz_industrial_motion_testutils
75 
76 #endif // MOTIONCMD_H
Base class for commands storing all general information of a command.
Definition: motioncmd.h:30
void setPlanningGroup(const std::string &planning_group)
Definition: motioncmd.h:52
void setAccelerationScale(double acceleration_scale)
Definition: motioncmd.h:67
void setVelocityScale(double velocity_scale)
Definition: motioncmd.h:62
const std::string & getPlanningGroup() const
Definition: motioncmd.h:57
std::unique_ptr< MotionCmd > MotionCmdUPtr
Definition: motioncmd.h:72
Interface class to express that a derived class can be converted into a planning_interface::MotionPla...
std::string target_link_
Link to which all cartesian poses refer to.
Definition: motioncmd.h:47


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