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 {
27 
32 {
33 public:
36  {
37  }
38 
39 public:
40  void setPlanningGroup(const std::string &planning_group);
41  const std::string& getPlanningGroup() const;
42 
43  void setVelocityScale(double velocity_scale);
44  void setAccelerationScale(double acceleration_scale);
45 
46 protected:
47  std::string planning_group_;
49  std::string target_link_;
50  double vel_scale_ {1.0};
51  double acc_scale_ {1.0};
52 };
53 
54 inline void MotionCmd::setPlanningGroup(const std::string &planning_group)
55 {
56  planning_group_ = planning_group;
57 }
58 
59 inline const std::string& MotionCmd::getPlanningGroup() const
60 {
61  return planning_group_;
62 }
63 
64 inline void MotionCmd::setVelocityScale(double velocity_scale)
65 {
66  vel_scale_ = velocity_scale;
67 }
68 
69 inline void MotionCmd::setAccelerationScale(double acceleration_scale)
70 {
71  acc_scale_ = acceleration_scale;
72 }
73 
74 using MotionCmdUPtr = std::unique_ptr<MotionCmd>;
75 
76 }
77 
78 #endif // MOTIONCMD_H
Base class for commands storing all general information of a command.
Definition: motioncmd.h:31
planning_group
void setPlanningGroup(const std::string &planning_group)
Definition: motioncmd.h:54
void setAccelerationScale(double acceleration_scale)
Definition: motioncmd.h:69
void setVelocityScale(double velocity_scale)
Definition: motioncmd.h:64
std::unique_ptr< MotionCmd > MotionCmdUPtr
Definition: motioncmd.h:74
const std::string & getPlanningGroup() const
Definition: motioncmd.h:59
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:49


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