planning_context_loader_lin.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 Pilz GmbH & Co. KG
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8 
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13 
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
22 
24 
26 {
27  alg_ = "LIN";
28 }
29 
31 {
32 
33 }
34 
35 bool pilz::PlanningContextLoaderLIN::loadContext(planning_interface::PlanningContextPtr& planning_context,
36  const std::string& name,
37  const std::string& group) const
38 {
39  if(limits_set_ && model_set_) {
40  planning_context.reset(new PlanningContextLIN(name, group, model_, limits_));
41  return true;
42  }
43  else
44  {
45  if(!limits_set_)
46  {
47  ROS_ERROR_STREAM("Limits are not defined. Cannot load planning context. Call setLimits loadContext");
48  }
49  if(!model_set_)
50  {
51  ROS_ERROR_STREAM("Robot model was not set");
52  }
53  return false;
54  }
55 }
56 
bool model_set_
True if model is set.
std::string alg_
Name of the algorithm.
Plugin that can generate instances of PlanningContextLIN. Generates instances of PlanningContextLIN.
virtual bool loadContext(planning_interface::PlanningContextPtr &planning_context, const std::string &name, const std::string &group) const override
return a instance of pilz::PlanningContextLIN
bool limits_set_
True if limits are set.
PLUGINLIB_EXPORT_CLASS(cached_ik_kinematics_plugin::CachedIKKinematicsPlugin< kdl_kinematics_plugin::KDLKinematicsPlugin >, kinematics::KinematicsBase)
Base class for all PlanningContextLoaders. Since planning_interface::PlanningContext has a non empty ...
moveit::core::RobotModelConstPtr model_
The robot model.
#define ROS_ERROR_STREAM(args)
pilz::LimitsContainer limits_
Limits to be used during planning.
PlanningContext for obtaining LIN trajectories.


pilz_trajectory_generation
Author(s):
autogenerated on Mon Apr 6 2020 03:17:33