Common Tesseract Kinematic Limits and Related Utility Functions.
More...
#include <tesseract/common/macros.h>
#include <Eigen/Core>
#include <Eigen/Geometry>
|
| template<typename FloatType > |
| bool | tesseract::common::isWithinLimits (const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &limits) |
| | Check if within limits.
|
| |
| template<typename FloatType > |
| bool | tesseract::common::satisfiesLimits (const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &limits, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &max_diff, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &max_rel_diff) |
| | Check if values are within bounds or relatively equal to a limit.
|
| |
| template<typename FloatType > |
| bool | tesseract::common::satisfiesLimits (const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &limits, FloatType max_diff=static_cast< FloatType >(1e-6), FloatType max_rel_diff=std::numeric_limits< FloatType >::epsilon()) |
| | Check if values is within bounds or relatively equal to a limit.
|
| |
| template<typename FloatType > |
| void | tesseract::common::enforceLimits (Eigen::Ref< Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > values, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &limits) |
| | Enforce values to be within the provided limits.
|
| |
Common Tesseract Kinematic Limits and Related Utility Functions.
- Author
- Levi Armstrong
- Date
- March 25, 2021
- Copyright
- Copyright (c) 2021, Southwest Research Institute
- License
- Software License Agreement (Apache License)
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
◆ isWithinLimits()
template<typename FloatType >
| bool tesseract::common::isWithinLimits |
( |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & |
values, |
|
|
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & |
limits |
|
) |
| |
Check if within limits.
- Parameters
-
| joint_positions | The values to check |
| position_limits | The limits to perform check |
- Returns
◆ satisfiesLimits() [1/2]
template<typename FloatType >
| bool tesseract::common::satisfiesLimits |
( |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & |
values, |
|
|
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & |
limits, |
|
|
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & |
max_diff, |
|
|
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & |
max_rel_diff |
|
) |
| |
Check if values are within bounds or relatively equal to a limit.
- Parameters
-
| values | The values to check |
| limits | The limits to perform check |
| max_diff | The max diff when comparing value to limit value max(abs(value - limit)) <= max_diff, if true they are considered equal |
| max_rel_diff | The max relative diff between value and limit abs(value - limit) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of value and limit. |
- Returns
- True if the all values are within the limits or relatively equal to the limit, otherwise false.
◆ satisfiesLimits() [2/2]
template<typename FloatType >
| bool tesseract::common::satisfiesLimits |
( |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & |
values, |
|
|
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & |
limits, |
|
|
FloatType |
max_diff = static_cast<FloatType>(1e-6), |
|
|
FloatType |
max_rel_diff = std::numeric_limits<FloatType>::epsilon() |
|
) |
| |
Check if values is within bounds or relatively equal to a limit.
- Parameters
-
| values | The values to check |
| limits | The limits to perform check |
| max_diff | The max diff when comparing value to limit value max(abs(value - limit)) <= max_diff, if true they are considered equal |
| max_rel_diff | The max relative diff between value and limit abs(value - limit) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of value and limit. |
- Returns
- True if the all values are within the limits or relatively equal to the limit, otherwise false.
◆ enforceLimits()
template<typename FloatType >
| void tesseract::common::enforceLimits |
( |
Eigen::Ref< Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > |
values, |
|
|
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & |
limits |
|
) |
| |
Enforce values to be within the provided limits.
- Parameters
-
| values | The values to enforce bounds on |
| limits | The limits to perform check |