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 
18 
19 #include <stdexcept>
20 
22 {
23 
27 {}
28 
29 RobotConfiguration::RobotConfiguration(const std::string& group_name)
32  , group_name_(group_name)
33 {}
34 
35 RobotConfiguration::RobotConfiguration(const std::string& group_name,
36  const moveit::core::RobotModelConstPtr& robot_model)
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
Interface class to express that a derived class can be converted into a moveit_msgs::RobotState.
Interface class to express that a derived class can be converted into a moveit_msgs::Constaints.


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