Public Member Functions | Protected Attributes | Static Private Member Functions | List of all members
pilz::JointLimitsContainer Class Reference

Container for JointLimits, essentially a map with convenience functions. Adds the ability to as for limits and get a common limit that unifies all given limits. More...

#include <joint_limits_container.h>

Public Member Functions

bool addLimit (const std::string &joint_name, pilz_extensions::JointLimit joint_limit)
 Add a limit. More...
 
std::map< std::string, pilz_extensions::JointLimit >::const_iterator begin () const
 ConstIterator to the underlying data structure. More...
 
bool empty () const
 Returns wether the container is empty. More...
 
std::map< std::string, pilz_extensions::JointLimit >::const_iterator end () const
 ConstIterator to the underlying data structure. More...
 
pilz_extensions::JointLimit getCommonLimit () const
 Returns joint limit fusion of all(position, velocity, acceleration, deceleration) limits for all joint. There are cases where the most strict limit of all limits is needed. If there are no matching limits, the flag has_[position|velocity|...]_limits is set to false. More...
 
pilz_extensions::JointLimit getCommonLimit (const std::vector< std::string > &joint_names) const
 Returns joint limit fusion of all(position, velocity, acceleration, deceleration) limits for given joints. There are cases where the most strict limit of all limits is needed. If there are no matching limits, the flag has_[position|velocity|...]_limits is set to false. More...
 
size_t getCount () const
 Get Number of limits in the container. More...
 
pilz_extensions::JointLimit getLimit (const std::string &joint_name) const
 getLimit get the limit for the given joint name More...
 
bool hasLimit (const std::string &joint_name) const
 Check if there is a limit for a joint with the given name in this container. More...
 
bool verifyPositionLimit (const std::string &joint_name, const double &joint_position) const
 verify position limit of single joint More...
 
bool verifyPositionLimits (const std::vector< std::string > &joint_names, const std::vector< double > &joint_positions) const
 verify position limits of multiple joints More...
 
bool verifyVelocityLimit (const std::string &joint_name, const double &joint_velocity) const
 verify position limit of single joint More...
 

Protected Attributes

std::map< std::string, pilz_extensions::JointLimitcontainer_
 Actual container object containing the data. More...
 

Static Private Member Functions

static void updateCommonLimit (const pilz_extensions::JointLimit &joint_limit, pilz_extensions::JointLimit &common_limit)
 update the most strict limit with given joint limit More...
 

Detailed Description

Container for JointLimits, essentially a map with convenience functions. Adds the ability to as for limits and get a common limit that unifies all given limits.

Definition at line 32 of file joint_limits_container.h.

Member Function Documentation

bool pilz::JointLimitsContainer::addLimit ( const std::string &  joint_name,
pilz_extensions::JointLimit  joint_limit 
)

Add a limit.

Parameters
joint_nameName if the joint this limit belongs to
joint_limitLimit of the joint
Returns
true if the limit was added, false if joint_limit.has_deceleration_limit && joint_limit.max_deceleration >= 0

Definition at line 26 of file joint_limits_container.cpp.

std::map< std::string, pilz_extensions::JointLimit >::const_iterator pilz::JointLimitsContainer::begin ( ) const

ConstIterator to the underlying data structure.

Returns

Definition at line 83 of file joint_limits_container.cpp.

bool pilz::JointLimitsContainer::empty ( ) const

Returns wether the container is empty.

Returns
true if empty, false otherwise

Definition at line 53 of file joint_limits_container.cpp.

std::map< std::string, pilz_extensions::JointLimit >::const_iterator pilz::JointLimitsContainer::end ( ) const

ConstIterator to the underlying data structure.

Returns

Definition at line 88 of file joint_limits_container.cpp.

pilz_extensions::JointLimit pilz::JointLimitsContainer::getCommonLimit ( ) const

Returns joint limit fusion of all(position, velocity, acceleration, deceleration) limits for all joint. There are cases where the most strict limit of all limits is needed. If there are no matching limits, the flag has_[position|velocity|...]_limits is set to false.

Returns
joint limit

Definition at line 58 of file joint_limits_container.cpp.

pilz_extensions::JointLimit pilz::JointLimitsContainer::getCommonLimit ( const std::vector< std::string > &  joint_names) const

Returns joint limit fusion of all(position, velocity, acceleration, deceleration) limits for given joints. There are cases where the most strict limit of all limits is needed. If there are no matching limits, the flag has_[position|velocity|...]_limits is set to false.

Parameters
joint_names
Returns
joint limit
Exceptions
std::out_of_rangeif a joint limit with this name does not exist

Definition at line 68 of file joint_limits_container.cpp.

size_t pilz::JointLimitsContainer::getCount ( ) const

Get Number of limits in the container.

Returns
Number of limits in the container

Definition at line 48 of file joint_limits_container.cpp.

pilz_extensions::JointLimit pilz::JointLimitsContainer::getLimit ( const std::string &  joint_name) const

getLimit get the limit for the given joint name

Parameters
joint_name
Returns
joint limit
Exceptions
std::out_of_rangeif a joint limit with this name does not exist

Definition at line 78 of file joint_limits_container.cpp.

bool pilz::JointLimitsContainer::hasLimit ( const std::string &  joint_name) const

Check if there is a limit for a joint with the given name in this container.

Parameters
joint_nameName of the joint

Definition at line 43 of file joint_limits_container.cpp.

void pilz::JointLimitsContainer::updateCommonLimit ( const pilz_extensions::JointLimit joint_limit,
pilz_extensions::JointLimit common_limit 
)
staticprivate

update the most strict limit with given joint limit

Parameters
joint_limit
common_limitthe current most strict limit

Definition at line 131 of file joint_limits_container.cpp.

bool pilz::JointLimitsContainer::verifyPositionLimit ( const std::string &  joint_name,
const double &  joint_position 
) const

verify position limit of single joint

Parameters
joint_name
joint_position
Returns

Definition at line 102 of file joint_limits_container.cpp.

bool pilz::JointLimitsContainer::verifyPositionLimits ( const std::vector< std::string > &  joint_names,
const std::vector< double > &  joint_positions 
) const

verify position limits of multiple joints

Parameters
joint_names
joint_positions
Returns

Definition at line 112 of file joint_limits_container.cpp.

bool pilz::JointLimitsContainer::verifyVelocityLimit ( const std::string &  joint_name,
const double &  joint_velocity 
) const

verify position limit of single joint

Parameters
joint_name
joint_position
Returns

Definition at line 93 of file joint_limits_container.cpp.

Member Data Documentation

std::map<std::string, pilz_extensions::JointLimit> pilz::JointLimitsContainer::container_
protected

Actual container object containing the data.

Definition at line 141 of file joint_limits_container.h.


The documentation for this class was generated from the following files:


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