Tesseract 0.28.4
Loading...
Searching...
No Matches
kinematic_limits.h File Reference

Common Tesseract Kinematic Limits and Related Utility Functions. More...

#include <tesseract/common/macros.h>
#include <Eigen/Core>
#include <Eigen/Geometry>

Classes

struct  tesseract::common::KinematicLimits
 Store kinematic limits. More...
 

Functions

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.
 

Detailed Description

Common Tesseract Kinematic Limits and Related Utility Functions.

Author
Levi Armstrong
Date
March 25, 2021
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.

Function Documentation

◆ 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_positionsThe values to check
position_limitsThe 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
valuesThe values to check
limitsThe limits to perform check
max_diffThe max diff when comparing value to limit value max(abs(value - limit)) <= max_diff, if true they are considered equal
max_rel_diffThe 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
valuesThe values to check
limitsThe limits to perform check
max_diffThe max diff when comparing value to limit value max(abs(value - limit)) <= max_diff, if true they are considered equal
max_rel_diffThe 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
valuesThe values to enforce bounds on
limitsThe limits to perform check