Main Page
Namespaces
Classes
Files
File List
src
robotconfiguration.cpp
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
#include "
pilz_industrial_motion_testutils/robotconfiguration.h
"
18
19
#include <stdexcept>
20
21
namespace
pilz_industrial_motion_testutils
22
{
23
24
RobotConfiguration::RobotConfiguration
()
25
:
RobotStateMsgConvertible
()
26
,
GoalConstraintMsgConvertible
()
27
{}
28
29
RobotConfiguration::RobotConfiguration
(
const
std::string& group_name)
30
:
RobotStateMsgConvertible
()
31
,
GoalConstraintMsgConvertible
()
32
,
group_name_
(group_name)
33
{}
34
35
RobotConfiguration::RobotConfiguration
(
const
std::string& group_name,
36
const
moveit::core::RobotModelConstPtr& robot_model)
37
:
RobotStateMsgConvertible
()
38
,
GoalConstraintMsgConvertible
()
39
,
group_name_
(group_name)
40
,
robot_model_
(robot_model)
41
{
42
if
(robot_model && (!
robot_model_
->hasJointModelGroup(
group_name_
)))
43
{
44
std::string msg {
"Specified robot model does not contain specified group \""
};
45
msg.append(group_name).append(
"\""
);
46
throw
std::invalid_argument(msg);
47
}
48
}
49
50
}
// namespace pilz_industrial_motion_testutils
pilz_industrial_motion_testutils
Definition:
basecmd.h:24
pilz_industrial_motion_testutils::RobotStateMsgConvertible
Interface class to express that a derived class can be converted into a moveit_msgs::RobotState.
Definition:
robotstatemsgconvertible.h:30
pilz_industrial_motion_testutils::RobotConfiguration::robot_model_
moveit::core::RobotModelConstPtr robot_model_
Definition:
robotconfiguration.h:51
pilz_industrial_motion_testutils::RobotConfiguration::RobotConfiguration
RobotConfiguration()
Definition:
robotconfiguration.cpp:24
pilz_industrial_motion_testutils::RobotConfiguration::group_name_
std::string group_name_
Definition:
robotconfiguration.h:50
pilz_industrial_motion_testutils::GoalConstraintMsgConvertible
Interface class to express that a derived class can be converted into a moveit_msgs::Constaints.
Definition:
goalconstraintsmsgconvertible.h:32
robotconfiguration.h
pilz_industrial_motion_testutils
Author(s):
autogenerated on Mon Apr 6 2020 03:17:28