joint_limits_aggregator.h
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 
18 #ifndef JOINT_LIMITS_UNIFIER_H
19 #define JOINT_LIMITS_UNIFIER_H
20 
23 
24 #include <ros/ros.h>
25 
29 
30 #include <map>
31 
32 namespace pilz {
33 
40 {
41  public:
42 
58  const std::vector<const moveit::core::JointModel*>& joint_models);
59 
60  protected:
69  static void updatePositionLimitFromJointModel(const moveit::core::JointModel* joint_model,
70  pilz_extensions::JointLimit& joint_limit);
71 
80  static void updateVelocityLimitFromJointModel(const moveit::core::JointModel* joint_model,
81  pilz_extensions::JointLimit& joint_limit);
82 
89  static void checkPositionBoundsThrowing(const moveit::core::JointModel* joint_model,
90  const pilz_extensions::JointLimit& joint_limit);
91 
92 
99  static void checkVelocityBoundsThrowing(const moveit::core::JointModel* joint_model,
100  const pilz_extensions::JointLimit& joint_limit);
101 
102 
103 };
104 
109 class AggregationException : public std::runtime_error
110 {
111  public:
112  AggregationException(const std::string error_desc) : std::runtime_error(error_desc) {}
113 };
114 
121 {
122  public:
123  AggregationBoundsViolationException(const std::string error_desc) : AggregationException(error_desc) {}
124 };
125 
126 }
127 
128 #endif // JOINT_LIMITS_UNIFIER_H
Unifies the joint limits from the given joint models with joint limits from the parameter server...
AggregationBoundsViolationException(const std::string error_desc)
AggregationException(const std::string error_desc)
static void checkPositionBoundsThrowing(const moveit::core::JointModel *joint_model, const pilz_extensions::JointLimit &joint_limit)
Checks if the position limits from the given joint_limit are stricter than the limits of the joint_mo...
static JointLimitsContainer getAggregatedLimits(const ros::NodeHandle &nh, const std::vector< const moveit::core::JointModel * > &joint_models)
Aggregates(combines) the joint limits from joint model and parameter server. The rules for the combin...
static void checkVelocityBoundsThrowing(const moveit::core::JointModel *joint_model, const pilz_extensions::JointLimit &joint_limit)
Checks if the velocity limit from the given joint_limit are stricter than the limit of the joint_mode...
static void updateVelocityLimitFromJointModel(const moveit::core::JointModel *joint_model, pilz_extensions::JointLimit &joint_limit)
Update the velocity limit with the one from the joint_model.
Container for JointLimits, essentially a map with convenience functions. Adds the ability to as for l...
A base class for all aggregation exceptions inheriting from std::runtime_exception.
static void updatePositionLimitFromJointModel(const moveit::core::JointModel *joint_model, pilz_extensions::JointLimit &joint_limit)
Update the position limits with the ones from the joint_model.


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