testdata_loader.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2018 Pilz GmbH & Co. KG
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Pilz GmbH & Co. KG nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 #ifndef TESTDATA_LOADER_H
36 #define TESTDATA_LOADER_H
37 
38 #include <string>
39 #include <utility>
40 
42 
43 #include "jointconfiguration.h"
44 #include "cartesianconfiguration.h"
45 #include "command_types_typedef.h"
46 #include "sequence.h"
47 #include "gripper.h"
48 
50 {
55 class TestdataLoader
56 {
57 public:
58  TestdataLoader() = default;
59 
60  TestdataLoader(moveit::core::RobotModelConstPtr robot_model) : robot_model_(std::move(robot_model))
61  {
62  }
63 
64  virtual ~TestdataLoader() = default;
65 
66 public:
67  void setRobotModel(moveit::core::RobotModelConstPtr robot_model);
68 
69  virtual JointConfiguration getJoints(const std::string& pos_name, const std::string& group_name) const = 0;
70 
71  virtual CartesianConfiguration getPose(const std::string& pos_name, const std::string& group_name) const = 0;
72 
76  virtual PtpJoint getPtpJoint(const std::string& cmd_name) const = 0;
77  virtual PtpCart getPtpCart(const std::string& cmd_name) const = 0;
78  virtual PtpJointCart getPtpJointCart(const std::string& cmd_name) const = 0;
79 
83  virtual LinJoint getLinJoint(const std::string& cmd_name) const = 0;
84  virtual LinCart getLinCart(const std::string& cmd_name) const = 0;
85  virtual LinJointCart getLinJointCart(const std::string& cmd_name) const = 0;
86 
90  virtual CircCenterCart getCircCartCenterCart(const std::string& cmd_name) const = 0;
91  virtual CircJointCenterCart getCircJointCenterCart(const std::string& cmd_name) const = 0;
92  virtual CircInterimCart getCircCartInterimCart(const std::string& cmd_name) const = 0;
93  virtual CircJointInterimCart getCircJointInterimCart(const std::string& cmd_name) const = 0;
94 
98  virtual Sequence getSequence(const std::string& cmd_name) const = 0;
99 
103  virtual Gripper getGripper(const std::string& cmd_name) const = 0;
104 
105 protected:
106  moveit::core::RobotModelConstPtr robot_model_;
107 };
108 
109 inline void TestdataLoader::setRobotModel(moveit::core::RobotModelConstPtr robot_model)
110 {
111  robot_model_ = std::move(robot_model);
112 }
113 
114 using TestdataLoaderUPtr = std::unique_ptr<TestdataLoader>;
115 } // namespace pilz_industrial_motion_planner_testutils
116 
117 #endif // TESTDATA_LOADER_H
robot_model.h
pilz_industrial_motion_planner_testutils::CircCenterCart
Circ< CartesianConfiguration, CartesianCenter, CartesianConfiguration > CircCenterCart
Definition: command_types_typedef.h:90
pilz_industrial_motion_planner_testutils::TestdataLoader::getLinCart
virtual LinCart getLinCart(const std::string &cmd_name) const =0
pilz_industrial_motion_planner_testutils::TestdataLoader::~TestdataLoader
virtual ~TestdataLoader()=default
pilz_industrial_motion_planner_testutils::CircJointInterimCart
Circ< JointConfiguration, CartesianInterim, JointConfiguration > CircJointInterimCart
Definition: command_types_typedef.h:94
pilz_industrial_motion_planner_testutils::TestdataLoader::getCircCartInterimCart
virtual CircInterimCart getCircCartInterimCart(const std::string &cmd_name) const =0
pilz_industrial_motion_planner_testutils::PtpJoint
Ptp< JointConfiguration, JointConfiguration > PtpJoint
Definition: command_types_typedef.h:82
pilz_industrial_motion_planner_testutils::TestdataLoader::getLinJoint
virtual LinJoint getLinJoint(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
pilz_industrial_motion_planner_testutils::TestdataLoader::getJoints
virtual JointConfiguration getJoints(const std::string &pos_name, const std::string &group_name) const =0
jointconfiguration.h
cartesianconfiguration.h
sequence.h
pilz_industrial_motion_planner_testutils::TestdataLoaderUPtr
std::unique_ptr< TestdataLoader > TestdataLoaderUPtr
Definition: testdata_loader.h:146
pilz_industrial_motion_planner_testutils::LinCart
Lin< CartesianConfiguration, CartesianConfiguration > LinCart
Definition: command_types_typedef.h:88
pilz_industrial_motion_planner_testutils::TestdataLoader::getPtpCart
virtual PtpCart getPtpCart(const std::string &cmd_name) const =0
pilz_industrial_motion_planner_testutils::TestdataLoader::getPtpJointCart
virtual PtpJointCart getPtpJointCart(const std::string &cmd_name) const =0
pilz_industrial_motion_planner_testutils::TestdataLoader::robot_model_
moveit::core::RobotModelConstPtr robot_model_
Definition: testdata_loader.h:170
pilz_industrial_motion_planner_testutils::TestdataLoader::getCircJointCenterCart
virtual CircJointCenterCart getCircJointCenterCart(const std::string &cmd_name) const =0
pilz_industrial_motion_planner_testutils
Definition: basecmd.h:42
pilz_industrial_motion_planner_testutils::TestdataLoader::getSequence
virtual Sequence getSequence(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
pilz_industrial_motion_planner_testutils::LinJoint
Lin< JointConfiguration, JointConfiguration > LinJoint
Definition: command_types_typedef.h:86
pilz_industrial_motion_planner_testutils::PtpJointCart
Ptp< JointConfiguration, CartesianConfiguration > PtpJointCart
Definition: command_types_typedef.h:83
pilz_industrial_motion_planner_testutils::TestdataLoader::TestdataLoader
TestdataLoader()=default
pilz_industrial_motion_planner_testutils::TestdataLoader::getPtpJoint
virtual PtpJoint getPtpJoint(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
gripper.h
std
command_types_typedef.h
pilz_industrial_motion_planner_testutils::CircJointCenterCart
Circ< JointConfiguration, CartesianCenter, JointConfiguration > CircJointCenterCart
Definition: command_types_typedef.h:93
pilz_industrial_motion_planner_testutils::TestdataLoader::getCircJointInterimCart
virtual CircJointInterimCart getCircJointInterimCart(const std::string &cmd_name) const =0
pilz_industrial_motion_planner_testutils::TestdataLoader::getCircCartCenterCart
virtual CircCenterCart getCircCartCenterCart(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
pilz_industrial_motion_planner_testutils::TestdataLoader::getGripper
virtual Gripper getGripper(const std::string &cmd_name) const =0
Returns the command with the specified name from the test data.
pilz_industrial_motion_planner_testutils::CircInterimCart
Circ< CartesianConfiguration, CartesianInterim, CartesianConfiguration > CircInterimCart
Definition: command_types_typedef.h:91
pilz_industrial_motion_planner_testutils::PtpCart
Ptp< CartesianConfiguration, CartesianConfiguration > PtpCart
Definition: command_types_typedef.h:84
pilz_industrial_motion_planner_testutils::LinJointCart
Lin< JointConfiguration, CartesianConfiguration > LinJointCart
Definition: command_types_typedef.h:87
pilz_industrial_motion_planner_testutils::TestdataLoader::setRobotModel
void setRobotModel(moveit::core::RobotModelConstPtr robot_model)
Definition: testdata_loader.h:141
pilz_industrial_motion_planner_testutils::TestdataLoader::getPose
virtual CartesianConfiguration getPose(const std::string &pos_name, const std::string &group_name) const =0
pilz_industrial_motion_planner_testutils::TestdataLoader::getLinJointCart
virtual LinJointCart getLinJointCart(const std::string &cmd_name) const =0


pilz_industrial_motion_planner_testutils
Author(s):
autogenerated on Sat May 3 2025 02:28:27