testdata_loader.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 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 TESTDATA_LOADER_H
18 #define TESTDATA_LOADER_H
19 
20 #include <string>
21 
23 
24 #include "jointconfiguration.h"
25 #include "cartesianconfiguration.h"
26 #include "command_types_typedef.h"
27 #include "sequence.h"
28 #include "gripper.h"
29 
31 {
37 {
38 public:
39  TestdataLoader() = default;
40 
41  TestdataLoader(moveit::core::RobotModelConstPtr robot_model) : robot_model_(robot_model)
42  {
43  }
44 
45  virtual ~TestdataLoader() = default;
46 
47 public:
48  void setRobotModel(moveit::core::RobotModelConstPtr robot_model);
49 
50  virtual JointConfiguration getJoints(const std::string& pos_name, const std::string& group_name) const = 0;
51 
52  virtual CartesianConfiguration getPose(const std::string& pos_name, const std::string& group_name) const = 0;
53 
57  virtual PtpJoint getPtpJoint(const std::string& cmd_name) const = 0;
58  virtual PtpCart getPtpCart(const std::string& cmd_name) const = 0;
59  virtual PtpJointCart getPtpJointCart(const std::string& cmd_name) const = 0;
60 
64  virtual LinJoint getLinJoint(const std::string& cmd_name) const = 0;
65  virtual LinCart getLinCart(const std::string& cmd_name) const = 0;
66  virtual LinJointCart getLinJointCart(const std::string& cmd_name) const = 0;
67 
71  virtual CircCenterCart getCircCartCenterCart(const std::string& cmd_name) const = 0;
72  virtual CircJointCenterCart getCircJointCenterCart(const std::string& cmd_name) const = 0;
73  virtual CircInterimCart getCircCartInterimCart(const std::string& cmd_name) const = 0;
74  virtual CircJointInterimCart getCircJointInterimCart(const std::string& cmd_name) const = 0;
75 
79  virtual Sequence getSequence(const std::string& cmd_name) const = 0;
80 
84  virtual Gripper getGripper(const std::string& cmd_name) const = 0;
85 
86 protected:
87  moveit::core::RobotModelConstPtr robot_model_;
88 };
89 
90 inline void TestdataLoader::setRobotModel(moveit::core::RobotModelConstPtr robot_model)
91 {
92  robot_model_ = robot_model;
93 }
94 
95 using TestdataLoaderUPtr = std::unique_ptr<TestdataLoader>;
96 
97 } // namespace pilz_industrial_motion_testutils
98 
99 #endif // TESTDATA_LOADER_H
virtual CircJointInterimCart getCircJointInterimCart(const std::string &cmd_name) const =0
virtual CircCenterCart getCircCartCenterCart(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
virtual Sequence getSequence(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
virtual LinCart getLinCart(const std::string &cmd_name) const =0
Data class storing all information regarding a Circ command.
Definition: circ.h:31
virtual CartesianConfiguration getPose(const std::string &pos_name, const std::string &group_name) const =0
virtual PtpCart getPtpCart(const std::string &cmd_name) const =0
Data class storing all information regarding a linear command.
Definition: lin.h:30
Class to define a robot configuration in space with the help of joint values.
virtual JointConfiguration getJoints(const std::string &pos_name, const std::string &group_name) const =0
Data class storing all information regarding a Sequence command.
Definition: sequence.h:35
virtual CircJointCenterCart getCircJointCenterCart(const std::string &cmd_name) const =0
virtual PtpJointCart getPtpJointCart(const std::string &cmd_name) const =0
virtual PtpJoint getPtpJoint(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
moveit::core::RobotModelConstPtr robot_model_
Abstract base class describing the interface to access test data like robot poses and robot commands...
std::unique_ptr< TestdataLoader > TestdataLoaderUPtr
void setRobotModel(moveit::core::RobotModelConstPtr robot_model)
Class to define a robot configuration in space with the help of cartesian coordinates.
virtual Gripper getGripper(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
virtual LinJoint getLinJoint(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
TestdataLoader(moveit::core::RobotModelConstPtr robot_model)
virtual CircInterimCart getCircCartInterimCart(const std::string &cmd_name) const =0
virtual LinJointCart getLinJointCart(const std::string &cmd_name) const =0


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