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 {
32 
38 {
39 public:
40  TestdataLoader() = default;
41 
42  TestdataLoader(moveit::core::RobotModelConstPtr robot_model)
43  : robot_model_(robot_model)
44  {}
45 
46  virtual ~TestdataLoader() = default;
47 
48 public:
49  void setRobotModel(moveit::core::RobotModelConstPtr robot_model);
50 
51  virtual JointConfiguration getJoints(const std::string &pos_name,
52  const std::string &group_name) const = 0;
53 
54  virtual CartesianConfiguration getPose(const std::string &pos_name,
55  const std::string &group_name) const = 0;
56 
60  virtual PtpJoint getPtpJoint(const std::string& cmd_name) const = 0;
61  virtual PtpCart getPtpCart(const std::string& cmd_name) const = 0;
62  virtual PtpJointCart getPtpJointCart(const std::string& cmd_name) const = 0;
63 
67  virtual LinJoint getLinJoint(const std::string& cmd_name) const = 0;
68  virtual LinCart getLinCart(const std::string& cmd_name) const = 0;
69  virtual LinJointCart getLinJointCart(const std::string& cmd_name) const = 0;
70 
74  virtual CircCenterCart getCircCartCenterCart(const std::string &cmd_name) const = 0;
75  virtual CircJointCenterCart getCircJointCenterCart(const std::string &cmd_name) const = 0;
76  virtual CircInterimCart getCircCartInterimCart(const std::string &cmd_name) const = 0;
77  virtual CircJointInterimCart getCircJointInterimCart(const std::string &cmd_name) const = 0;
78 
82  virtual Sequence getSequence(const std::string &cmd_name) const = 0;
83 
87  virtual Gripper getGripper(const std::string &cmd_name) const = 0;
88 
89 protected:
90  moveit::core::RobotModelConstPtr robot_model_;
91 };
92 
93 inline void TestdataLoader::setRobotModel(moveit::core::RobotModelConstPtr robot_model)
94 {
95  robot_model_ = robot_model;
96 }
97 
98 using TestdataLoaderUPtr = std::unique_ptr<TestdataLoader>;
99 
100 }
101 
102 #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:32
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:31
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:36
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 Apr 6 2020 03:17:28