Tesseract
Motion Planning Environment
|
Namespaces | |
namespace | detail_any |
namespace | serialization |
Classes | |
class | AllowedCollisionMatrix |
struct | ambiguate |
struct | AnyPoly |
class | BytesResource |
struct | CalibrationInfo |
The CalibrationInfo struct. More... | |
struct | ClassLoader |
This is a wrapper around Boost DLL for loading plugins within Tesseract. More... | |
class | CloneCache |
Used to create a cache of objects. More... | |
class | CollisionMarginData |
Stores information about how the margins allowed between collision objects. More... | |
struct | ContactManagersPluginInfo |
The contact managers plugin information structure. More... | |
class | GeneralResourceLocator |
A general resource loaders using environment variable. More... | |
struct | got_type |
struct | got_type< A > |
struct | has_member |
class | JointState |
class | JointTrajectory |
Represents a joint trajectory. More... | |
struct | KinematicLimits |
Store kinematic limits. More... | |
struct | KinematicsPluginInfo |
The kinematics plugin information structure. More... | |
struct | ManipulatorInfo |
Contains information about a robot manipulator. More... | |
struct | PairHash |
struct | PluginInfo |
The Plugin Information struct. More... | |
struct | PluginInfoContainer |
class | PluginLoader |
This is a utility class for loading plugins within Tesseract. More... | |
class | Resource |
Represents resource data available from a file or url. More... | |
class | ResourceLocator |
Abstract class for resource loaders. More... | |
struct | Serialization |
struct | sig_check |
class | SimpleLocatedResource |
Resource implementation for a local file. More... | |
struct | TaskComposerPluginInfo |
The task composer plugin information structure. More... | |
class | TesseractSupportResourceLocator |
Abstract class for resource loaders. More... | |
class | TestPluginBase |
class | TestPluginMultiply |
class | Timer |
A simple timer class leveraging chrono high resolution clock. More... | |
struct | TypeErasureBase |
struct | TypeErasureInstance |
struct | TypeErasureInstanceWrapper |
struct | TypeErasureInterface |
This is the interface that all type erasures interfaces must inherit from. More... | |
Typedefs | |
using | AllowedCollisionEntries = std::unordered_map< tesseract_common::LinkNamesPair, std::string, tesseract_common::PairHash > |
using | AnyPolyBase = tesseract_common::TypeErasureBase< TypeErasureInterface, detail_any::AnyInstance > |
using | PairsCollisionMarginData = std::unordered_map< tesseract_common::LinkNamesPair, double, tesseract_common::PairHash > |
using | SimpleResourceLocatorFn = std::function< std::string(const std::string &)> |
template<typename T > | |
using | AlignedVector = std::vector< T, Eigen::aligned_allocator< T > > |
Enable easy switching to std::filesystem when available. More... | |
template<typename Key , typename Value > | |
using | AlignedMap = std::map< Key, Value, std::less< Key >, Eigen::aligned_allocator< std::pair< const Key, Value > > > |
template<typename Key , typename Value > | |
using | AlignedUnorderedMap = std::unordered_map< Key, Value, std::hash< Key >, std::equal_to< Key >, Eigen::aligned_allocator< std::pair< const Key, Value > > > |
using | VectorIsometry3d = AlignedVector< Eigen::Isometry3d > |
using | VectorVector4d = AlignedVector< Eigen::Vector4d > |
using | VectorVector3d = std::vector< Eigen::Vector3d > |
using | VectorVector2d = AlignedVector< Eigen::Vector2d > |
using | TransformMap = AlignedMap< std::string, Eigen::Isometry3d > |
using | Toolpath = AlignedVector< VectorIsometry3d > |
using | TrajArray = Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > |
using | LinkNamesPair = std::pair< std::string, std::string > |
using | PluginInfoMap = std::map< std::string, PluginInfo > |
A map of PluginInfo to user defined name. More... | |
Enumerations | |
enum class | CollisionMarginOverrideType { NONE , REPLACE , MODIFY , OVERRIDE_DEFAULT_MARGIN , OVERRIDE_PAIR_MARGIN , MODIFY_PAIR_MARGIN } |
Identifies how the provided contact margin data should be applied. More... | |
Functions | |
bool | operator== (const AllowedCollisionEntries &entries_1, const AllowedCollisionEntries &entries_2) |
template<typename FloatType > | |
bool | isWithinPositionLimits (const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &position_limits) |
Check if within position limits. More... | |
template<typename FloatType > | |
bool | satisfiesPositionLimits (const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &position_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 joint position is within bounds or relatively equal to a limit. More... | |
template<typename FloatType > | |
bool | satisfiesPositionLimits (const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &position_limits, FloatType max_diff=static_cast< FloatType >(1e-6), FloatType max_rel_diff=std::numeric_limits< FloatType >::epsilon()) |
Check if joint position is within bounds or relatively equal to a limit. More... | |
template<typename FloatType > | |
void | enforcePositionLimits (Eigen::Ref< Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > joint_positions, const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > &position_limits) |
Enforce position to be within the provided limits. More... | |
std::set< std::string > | parseEnvironmentVariableList (const std::string &env_variable) |
std::set< std::string > | getAllSearchPaths (const std::string &search_paths_env, const std::set< std::string > &existing_search_paths) |
std::set< std::string > | getAllSearchLibraries (const std::string &search_libraries_env, const std::set< std::string > &existing_search_libraries) |
std::set< std::string > | extractLibrariesWithFullPath (std::set< std::string > &library_names) |
This will remove libraries with full path in the provided library_names and return them. More... | |
LinkNamesPair | makeOrderedLinkPair (const std::string &link_name1, const std::string &link_name2) |
Create a pair of strings, where the pair.first is always <= pair.second. More... | |
void | makeOrderedLinkPair (LinkNamesPair &pair, const std::string &link_name1, const std::string &link_name2) |
Populate a pair of strings, where the pair.first is always <= pair.second. More... | |
template<typename SerializableType > | |
void | testSerialization (const SerializableType &object, const std::string &typename_string) |
Tests Boost serialization for a serializable type. More... | |
template<typename SerializableType > | |
void | testSerializationPtr (const std::shared_ptr< SerializableType > &object, const std::string &typename_string) |
Tests Boost serialization of shared pointer for a serializable type. More... | |
template<typename SerializableTypeBase , typename SerializableTypeDerived > | |
void | testSerializationDerivedClass (const std::shared_ptr< SerializableTypeBase > &object, const std::string &typename_string) |
Tests Boost serialization for a serializable derived type. More... | |
template<typename... Args> | |
std::string | strFormat (const std::string &format, Args... args) |
std::string | fileToString (const tesseract_common::fs::path &filepath) |
Read in the contents of the file into a string. More... | |
void | twistChangeRefPoint (Eigen::Ref< Eigen::VectorXd > twist, const Eigen::Ref< const Eigen::Vector3d > &ref_point) |
Change the reference point of the provided Twist. More... | |
void | twistChangeBase (Eigen::Ref< Eigen::VectorXd > twist, const Eigen::Isometry3d &change_base) |
Change the base coordinate system of the Twist. More... | |
void | jacobianChangeBase (Eigen::Ref< Eigen::MatrixXd > jacobian, const Eigen::Isometry3d &change_base) |
Change the base coordinate system of the jacobian. More... | |
void | jacobianChangeRefPoint (Eigen::Ref< Eigen::MatrixXd > jacobian, const Eigen::Ref< const Eigen::Vector3d > &ref_point) |
Change the reference point of the jacobian. More... | |
Eigen::VectorXd | concat (const Eigen::VectorXd &a, const Eigen::VectorXd &b) |
Concatenate two vector. More... | |
Eigen::Vector3d | calcRotationalError (const Eigen::Ref< const Eigen::Matrix3d > &R) |
Calculate the rotation error vector given a rotation error matrix where the angle is between [-pi, pi]. More... | |
Eigen::Vector3d | calcRotationalError2 (const Eigen::Ref< const Eigen::Matrix3d > &R) |
Calculate the rotation error vector given a rotation error matrix where the angle is between [0, 2 * pi]. More... | |
Eigen::VectorXd | calcTransformError (const Eigen::Isometry3d &t1, const Eigen::Isometry3d &t2) |
Calculate error between two transforms expressed in t1 coordinate system. More... | |
Eigen::Vector4d | computeRandomColor () |
This computes a random color RGBA [0, 1] with alpha set to 1. More... | |
void | printNestedException (const std::exception &e, int level=0) |
Print a nested exception. More... | |
std::string | getTempPath () |
Get the host temp directory path. More... | |
bool | isNumeric (const std::string &s) |
Determine if a string is a number. More... | |
bool | isNumeric (const std::vector< std::string > &sv) |
Determine if each string in vector is a number. More... | |
Eigen::VectorXd | generateRandomNumber (const Eigen::Ref< const Eigen::MatrixX2d > &limits) |
Given a set of limits it will generate a vector of random numbers between the limit. More... | |
void | ltrim (std::string &s) |
Left trim string. More... | |
void | rtrim (std::string &s) |
Right trim string. More... | |
void | trim (std::string &s) |
Trim left and right of string. More... | |
template<typename T > | |
bool | isIdentical (const std::vector< T > &vec1, const std::vector< T > &vec2, bool ordered=true, const std::function< bool(const T &, const T &)> &equal_pred=[](const T &v1, const T &v2) { return v1==v2;}, const std::function< bool(const T &, const T &)> &comp=[](const T &v1, const T &v2) { return v1< v2;}) |
Check if two vector of strings are identical. More... | |
template<typename KeyValueContainerType , typename ValueType > | |
bool | isIdenticalMap (const KeyValueContainerType &map_1, const KeyValueContainerType &map_2, const std::function< bool(const ValueType &, const ValueType &)> &value_eq=[](const ValueType &v1, const ValueType &v2) { return v1==v2;}) |
Checks if 2 maps are identical. More... | |
template<typename ValueType > | |
bool | isIdenticalSet (const std::set< ValueType > &set_1, const std::set< ValueType > &set_2, const std::function< bool(const ValueType &, const ValueType &)> &value_eq=[](const ValueType &v1, const ValueType &v2) { return v1==v2;}) |
Checks if 2 sets are identical. More... | |
template<typename ValueType , std::size_t Size> | |
bool | isIdenticalArray (const std::array< ValueType, Size > &array_1, const std::array< ValueType, Size > &array_2, const std::function< bool(const ValueType &, const ValueType &)> &value_eq=[](const ValueType &v1, const ValueType &v2) { return v1==v2;}) |
Checks if 2 arrays are identical. More... | |
template<typename T > | |
bool | pointersEqual (const std::shared_ptr< T > &p1, const std::shared_ptr< T > &p2) |
Checks if 2 pointers point to objects that are ==. More... | |
template<typename T > | |
bool | pointersComparison (const std::shared_ptr< T > &p1, const std::shared_ptr< T > &p2) |
Comparison operator for the objects 2 points point to. More... | |
std::string | getTimestampString () |
Get Timestamp string. More... | |
void | reorder (Eigen::Ref< Eigen::VectorXd > v, std::vector< Eigen::Index > order) |
Reorder Eigen::VectorXd implace given index list. More... | |
tinyxml2::XMLError | QueryStringValue (const tinyxml2::XMLElement *xml_element, std::string &value) |
Query a string value from xml element. More... | |
tinyxml2::XMLError | QueryStringText (const tinyxml2::XMLElement *xml_element, std::string &text) |
Query a string Text from xml element. More... | |
tinyxml2::XMLError | QueryStringValue (const tinyxml2::XMLAttribute *xml_attribute, std::string &value) |
Query a string value from xml attribute. More... | |
tinyxml2::XMLError | QueryStringAttribute (const tinyxml2::XMLElement *xml_element, const char *name, std::string &value) |
Query a string attribute from an xml element. More... | |
std::string | StringAttribute (const tinyxml2::XMLElement *xml_element, const char *name, std::string default_value) |
Get string attribute if exist. If it does not exist it returns the default value. More... | |
tinyxml2::XMLError | QueryStringAttributeRequired (const tinyxml2::XMLElement *xml_element, const char *name, std::string &value) |
Query a string attribute from an xml element and print error log. More... | |
tinyxml2::XMLError | QueryDoubleAttributeRequired (const tinyxml2::XMLElement *xml_element, const char *name, double &value) |
Query a double attribute from an xml element and print error log. More... | |
tinyxml2::XMLError | QueryIntAttributeRequired (const tinyxml2::XMLElement *xml_element, const char *name, int &value) |
Query a int attribute from an xml element and print error log. More... | |
bool | almostEqualRelativeAndAbs (double a, double b, double max_diff=1e-6, double max_rel_diff=std::numeric_limits< double >::epsilon()) |
Check if two double are relatively equal. More... | |
bool | almostEqualRelativeAndAbs (const Eigen::Ref< const Eigen::VectorXd > &v1, const Eigen::Ref< const Eigen::VectorXd > &v2, double max_diff=1e-6, double max_rel_diff=std::numeric_limits< double >::epsilon()) |
Check if two Eigen VectorXd are relatively and absolute equal. More... | |
bool | almostEqualRelativeAndAbs (const Eigen::Ref< const Eigen::VectorXd > &v1, const Eigen::Ref< const Eigen::VectorXd > &v2, const Eigen::Ref< const Eigen::VectorXd > &max_diff, const Eigen::Ref< const Eigen::VectorXd > &max_rel_diff) |
Check if two Eigen VectorXd are relatively and absolute equal. More... | |
template<typename FloatType > | |
bool | toNumeric (const std::string &s, FloatType &value) |
Convert a string to a numeric value type. More... | |
std::vector< std::string > | getAllowedCollisions (const std::vector< std::string > &link_names, const AllowedCollisionEntries &acm_entries, bool remove_duplicates=true) |
Gets allowed collisions for a set of link names. More... | |
std::string | toYAMLString (const YAML::Node &node) |
Converts a YAML::Node to a yaml string. More... | |
YAML::Node | fromYAMLString (const std::string &string) |
Converts yaml string to a YAML::Node. More... | |
bool | compareYAML (const YAML::Node &node1, const YAML::Node &node2) |
Checks if the YAML::Nodes are identical. More... | |
template bool | isWithinPositionLimits< float > (const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &position_limits) |
template bool | isWithinPositionLimits< double > (const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &position_limits) |
template bool | satisfiesPositionLimits< float > (const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &position_limits, float max_diff, float max_rel_diff) |
template bool | satisfiesPositionLimits< double > (const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &position_limits, double max_diff, double max_rel_diff) |
template bool | satisfiesPositionLimits< float > (const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &position_limits, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &max_diff, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &max_rel_diff) |
template bool | satisfiesPositionLimits< double > (const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &joint_positions, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &position_limits, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &max_diff, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &max_rel_diff) |
template void | enforcePositionLimits< float > (Eigen::Ref< Eigen::Matrix< float, Eigen::Dynamic, 1 > > joint_positions, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &position_limits) |
template void | enforcePositionLimits< double > (Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, 1 > > joint_positions, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &position_limits) |
template bool | toNumeric< double > (const std::string &, double &) |
template bool | toNumeric< float > (const std::string &, float &) |
template bool | toNumeric< int > (const std::string &, int &) |
template bool | toNumeric< long > (const std::string &, long &) |
template bool | isIdentical< std::string > (const std::vector< std::string > &, const std::vector< std::string > &, bool, const std::function< bool(const std::string &, const std::string &)> &, const std::function< bool(const std::string &, const std::string &)> &) |
template bool | isIdentical< Eigen::Index > (const std::vector< Eigen::Index > &, const std::vector< Eigen::Index > &, bool, const std::function< bool(const Eigen::Index &, const Eigen::Index &)> &, const std::function< bool(const Eigen::Index &, const Eigen::Index &)> &) |
template<typename E > | |
std::enable_if_t<!std::is_polymorphic< E >::value > | my_rethrow_if_nested (const E &) |
template<typename E > | |
std::enable_if_t< std::is_polymorphic< E >::value > | my_rethrow_if_nested (const E &e) |
Variables | |
static std::mt19937 | mersenne { static_cast<std::mt19937::result_type>(std::time(nullptr)) } |
Random number generator. More... | |
using tesseract_common::AlignedMap = typedef std::map<Key, Value, std::less<Key>, Eigen::aligned_allocator<std::pair<const Key, Value> >> |
using tesseract_common::AlignedUnorderedMap = typedef std::unordered_map<Key, Value, std::hash<Key>, std::equal_to<Key>, Eigen::aligned_allocator<std::pair<const Key, Value> >> |
using tesseract_common::AlignedVector = typedef std::vector<T, Eigen::aligned_allocator<T> > |
Enable easy switching to std::filesystem when available.
using tesseract_common::AllowedCollisionEntries = typedef std::unordered_map<tesseract_common::LinkNamesPair, std::string, tesseract_common::PairHash> |
using tesseract_common::AnyPolyBase = typedef tesseract_common::TypeErasureBase<TypeErasureInterface, detail_any::AnyInstance> |
using tesseract_common::LinkNamesPair = typedef std::pair<std::string, std::string> |
using tesseract_common::PairsCollisionMarginData = typedef std::unordered_map<tesseract_common::LinkNamesPair, double, tesseract_common::PairHash> |
using tesseract_common::PluginInfoMap = typedef std::map<std::string, PluginInfo> |
A map of PluginInfo to user defined name.
using tesseract_common::SimpleResourceLocatorFn = typedef std::function<std::string(const std::string&)> |
using tesseract_common::Toolpath = typedef AlignedVector<VectorIsometry3d> |
using tesseract_common::TrajArray = typedef Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> |
using tesseract_common::TransformMap = typedef AlignedMap<std::string, Eigen::Isometry3d> |
using tesseract_common::VectorIsometry3d = typedef AlignedVector<Eigen::Isometry3d> |
using tesseract_common::VectorVector2d = typedef AlignedVector<Eigen::Vector2d> |
using tesseract_common::VectorVector3d = typedef std::vector<Eigen::Vector3d> |
using tesseract_common::VectorVector4d = typedef AlignedVector<Eigen::Vector4d> |
|
strong |
Identifies how the provided contact margin data should be applied.
Enumerator | |
---|---|
NONE | Do not apply contact margin data. |
REPLACE | Replace the contact manager's CollisionMarginData. |
MODIFY | Modify the contact managers default margin and pair margins. This will preserve existing pairs not being modified by the provided margin data. If a pair already exist it will be updated with the provided margin data. |
OVERRIDE_DEFAULT_MARGIN | Override the contact managers default margin only. |
OVERRIDE_PAIR_MARGIN | Override the contact managers pair margin only. This does not preserve any existing pair margin data. |
MODIFY_PAIR_MARGIN | Modify the contact managers pair margin only. This will preserve existing pairs not being modified by the provided margin data. If a pair already exist it will be updated with the provided margin data. |
bool tesseract_common::almostEqualRelativeAndAbs | ( | const Eigen::Ref< const Eigen::VectorXd > & | v1, |
const Eigen::Ref< const Eigen::VectorXd > & | v2, | ||
const Eigen::Ref< const Eigen::VectorXd > & | max_diff, | ||
const Eigen::Ref< const Eigen::VectorXd > & | max_rel_diff | ||
) |
Check if two Eigen VectorXd are relatively and absolute equal.
This is a vectorized implementation of the function above. The max_diff is for handling when comparing numbers near zero
a | A vector of double |
b | A vector of double |
max_diff | The max diff when comparing max(abs(a - b)) <= max_diff, if true they are considered equal |
max_rel_diff | The max relative diff abs(a - b) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of a and b. |
bool tesseract_common::almostEqualRelativeAndAbs | ( | const Eigen::Ref< const Eigen::VectorXd > & | v1, |
const Eigen::Ref< const Eigen::VectorXd > & | v2, | ||
double | max_diff = 1e-6 , |
||
double | max_rel_diff = std::numeric_limits<double>::epsilon() |
||
) |
Check if two Eigen VectorXd are relatively and absolute equal.
This is a vectorized implementation of the function above. The max_diff is for handling when comparing numbers near zero
a | A vector of double |
b | A vector of double |
max_diff | The max diff when comparing max(abs(a - b)) <= max_diff, if true they are considered equal |
max_rel_diff | The max relative diff abs(a - b) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of a and b. |
bool tesseract_common::almostEqualRelativeAndAbs | ( | double | a, |
double | b, | ||
double | max_diff = 1e-6 , |
||
double | max_rel_diff = std::numeric_limits<double>::epsilon() |
||
) |
Check if two double are relatively equal.
The max_diff is for handling when comparing numbers near zero
a | Double |
b | Double |
max_diff | The max diff when comparing std::abs(a - b) <= max_diff, if true they are considered equal |
max_rel_diff | The max relative diff std::abs(a - b) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of a and b. |
Eigen::Vector3d tesseract_common::calcRotationalError | ( | const Eigen::Ref< const Eigen::Matrix3d > & | R | ) |
Calculate the rotation error vector given a rotation error matrix where the angle is between [-pi, pi].
This should be used only for calculating the error. Do not use for numerically calculating jacobians because it breaks down a -PI and PI
R | rotation error matrix |
Eigen::Vector3d tesseract_common::calcRotationalError2 | ( | const Eigen::Ref< const Eigen::Matrix3d > & | R | ) |
Calculate the rotation error vector given a rotation error matrix where the angle is between [0, 2 * pi].
This function does not break down when the angle is near zero or 2pi when calculating the numerical jacobian. This is because when using Eigen's angle axis it converts the angle to be between [0, PI] where internally if the angle is between [-PI, 0] it flips the sign of the axis. Both this function and calcRotationalError both check for this flip and reverts it. Since the angle is always between [-PI, PI], switching the range to [0, PI] will never be close to 2PI. In the case of zero, it also does not break down because we are making sure that the angle axis aligns with the quaternion axis eliminating this issue. As you can see the quaternion keeps the angle small but flips the axis so the correct delta rotation is calculated.
Angle: 0.001 results in an axis: [0, 0, 1] Angle: -0.001 results in and axis: [0, 0, -1] e1 = angle * axis = [0, 0, 0.001] e2 = angle * axis = [0, 0, -0.001] delta = e2 - e1 = [0, 0, 0.002]
This should be used when numerically calculating rotation jacobians
R | rotation error matrix |
Eigen::VectorXd tesseract_common::calcTransformError | ( | const Eigen::Isometry3d & | t1, |
const Eigen::Isometry3d & | t2 | ||
) |
Calculate error between two transforms expressed in t1 coordinate system.
t1 | Target Transform |
t2 | Current Transform |
|
inline |
Checks if the YAML::Nodes are identical.
The == operator checks if they reference the same memory. This checks if they contain the same information
node1 | Input YAML::Node |
node2 | Input YAML::Node |
Eigen::Vector4d tesseract_common::computeRandomColor | ( | ) |
This computes a random color RGBA [0, 1] with alpha set to 1.
Eigen::VectorXd tesseract_common::concat | ( | const Eigen::VectorXd & | a, |
const Eigen::VectorXd & | b | ||
) |
Concatenate two vector.
void tesseract_common::enforcePositionLimits | ( | Eigen::Ref< Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & | position_limits | ||
) |
Enforce position to be within the provided limits.
joint_positions | The joint position to enforce bounds on |
joint_limits | The limits to perform check |
template void tesseract_common::enforcePositionLimits< double > | ( | Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, 1 > > | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > & | position_limits | ||
) |
template void tesseract_common::enforcePositionLimits< float > | ( | Eigen::Ref< Eigen::Matrix< float, Eigen::Dynamic, 1 > > | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > & | position_limits | ||
) |
|
inline |
This will remove libraries with full path in the provided library_names and return them.
library_names | The set to search and remove libraries with full paths |
std::string tesseract_common::fileToString | ( | const tesseract_common::fs::path & | filepath | ) |
Read in the contents of the file into a string.
filepath | The file to read |
|
inline |
Converts yaml string to a YAML::Node.
string | Input string containing the yaml |
Eigen::VectorXd tesseract_common::generateRandomNumber | ( | const Eigen::Ref< const Eigen::MatrixX2d > & | limits | ) |
Given a set of limits it will generate a vector of random numbers between the limit.
limits | The limits to generated numbers based on. |
std::vector< std::string > tesseract_common::getAllowedCollisions | ( | const std::vector< std::string > & | link_names, |
const AllowedCollisionEntries & | acm_entries, | ||
bool | remove_duplicates = true |
||
) |
Gets allowed collisions for a set of link names.
link_names | Vector of link names for which we want the allowed collisions |
acm_entries | Entries in the ACM. Get this with AllowedCollisionMatrix::getAllAllowedCollisions() |
remove_duplicates | If true, duplicates will be removed. Default: true |
|
inline |
|
inline |
std::string tesseract_common::getTempPath | ( | ) |
Get the host temp directory path.
std::string tesseract_common::getTimestampString | ( | ) |
Get Timestamp string.
bool tesseract_common::isIdentical | ( | const std::vector< T > & | vec1, |
const std::vector< T > & | vec2, | ||
bool | ordered = true , |
||
const std::function< bool(const T &, const T &)> & | equal_pred = [](const T& v1, const T& v2) { return v1 == v2; } , |
||
const std::function< bool(const T &, const T &)> & | comp = [](const T& v1, const T& v2) { return v1 < v2; } |
||
) |
Check if two vector of strings are identical.
vec1 | Vector strings |
vec2 | Vector strings |
ordered | If true order is relavent, othwise if false order is not relavent |
equal_pred | Binary predicate passed into std::equals to determine if an element is equal. Useful for vectors of pointers |
comp | Binary function passed into std::sort. Only used it ordered == false. Useful for vectors of pointers |
template bool tesseract_common::isIdentical< Eigen::Index > | ( | const std::vector< Eigen::Index > & | , |
const std::vector< Eigen::Index > & | , | ||
bool | , | ||
const std::function< bool(const Eigen::Index &, const Eigen::Index &)> & | , | ||
const std::function< bool(const Eigen::Index &, const Eigen::Index &)> & | |||
) |
template bool tesseract_common::isIdentical< std::string > | ( | const std::vector< std::string > & | , |
const std::vector< std::string > & | , | ||
bool | , | ||
const std::function< bool(const std::string &, const std::string &)> & | , | ||
const std::function< bool(const std::string &, const std::string &)> & | |||
) |
bool tesseract_common::isIdenticalArray | ( | const std::array< ValueType, Size > & | array_1, |
const std::array< ValueType, Size > & | array_2, | ||
const std::function< bool(const ValueType &, const ValueType &)> & | value_eq = [](const ValueType& v1, const ValueType& v2) { return v1 == v2; } |
||
) |
Checks if 2 arrays are identical.
array_1 | First array |
array_2 | Second array |
bool tesseract_common::isIdenticalMap | ( | const KeyValueContainerType & | map_1, |
const KeyValueContainerType & | map_2, | ||
const std::function< bool(const ValueType &, const ValueType &)> & | value_eq = [](const ValueType& v1, const ValueType& v2) { return v1 == v2; } |
||
) |
Checks if 2 maps are identical.
map_1 | First map |
map_2 | Second map |
bool tesseract_common::isIdenticalSet | ( | const std::set< ValueType > & | set_1, |
const std::set< ValueType > & | set_2, | ||
const std::function< bool(const ValueType &, const ValueType &)> & | value_eq = [](const ValueType& v1, const ValueType& v2) { return v1 == v2; } |
||
) |
Checks if 2 sets are identical.
map_1 | First map |
map_2 | Second map |
bool tesseract_common::isNumeric | ( | const std::string & | s | ) |
Determine if a string is a number.
s | The string to evaluate |
bool tesseract_common::isNumeric | ( | const std::vector< std::string > & | sv | ) |
Determine if each string in vector is a number.
sv | The vector of strings to evaluate |
bool tesseract_common::isWithinPositionLimits | ( | const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & | position_limits | ||
) |
Check if within position limits.
joint_positions | The joint position to check |
position_limits | The joint limits to perform check |
template bool tesseract_common::isWithinPositionLimits< double > | ( | const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > & | position_limits | ||
) |
template bool tesseract_common::isWithinPositionLimits< float > | ( | const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > & | position_limits | ||
) |
void tesseract_common::jacobianChangeBase | ( | Eigen::Ref< Eigen::MatrixXd > | jacobian, |
const Eigen::Isometry3d & | change_base | ||
) |
Change the base coordinate system of the jacobian.
jacobian | The current Jacobian which gets modified in place |
change_base | The transform from the desired frame to the current base frame of the jacobian |
void tesseract_common::jacobianChangeRefPoint | ( | Eigen::Ref< Eigen::MatrixXd > | jacobian, |
const Eigen::Ref< const Eigen::Vector3d > & | ref_point | ||
) |
Change the reference point of the jacobian.
jacobian | The current Jacobian which gets modified in place |
ref_point | Is expressed in the same base frame of the jacobian and is a vector from the old point to the new point. |
void tesseract_common::ltrim | ( | std::string & | s | ) |
Left trim string.
s | The string to left trim |
LinkNamesPair tesseract_common::makeOrderedLinkPair | ( | const std::string & | link_name1, |
const std::string & | link_name2 | ||
) |
Create a pair of strings, where the pair.first is always <= pair.second.
This is commonly used along with PairHash as the key to an unordered_map<LinkNamesPair, Type, PairHash>
link_name1 | First link name |
link_name2 | Second link name |
void tesseract_common::makeOrderedLinkPair | ( | LinkNamesPair & | pair, |
const std::string & | link_name1, | ||
const std::string & | link_name2 | ||
) |
Populate a pair of strings, where the pair.first is always <= pair.second.
This is used to avoid multiple memory application throughout the code base
This is commonly used along with PairHash as the key to an unordered_map<LinkNamesPair, Type, PairHash>
pair | The link name pair to load a lexicographically sorted pair of strings |
link_name1 | First link name |
link_name2 | Second link nam |
std::enable_if_t<!std::is_polymorphic< E >::value > tesseract_common::my_rethrow_if_nested | ( | const E & | ) |
std::enable_if_t< std::is_polymorphic< E >::value > tesseract_common::my_rethrow_if_nested | ( | const E & | e | ) |
bool tesseract_common::operator== | ( | const AllowedCollisionEntries & | entries_1, |
const AllowedCollisionEntries & | entries_2 | ||
) |
|
inline |
bool tesseract_common::pointersComparison | ( | const std::shared_ptr< T > & | p1, |
const std::shared_ptr< T > & | p2 | ||
) |
Comparison operator for the objects 2 points point to.
p1 | First pointer |
p2 | Second pointer |
bool tesseract_common::pointersEqual | ( | const std::shared_ptr< T > & | p1, |
const std::shared_ptr< T > & | p2 | ||
) |
Checks if 2 pointers point to objects that are ==.
p1 | First pointer |
p2 | Second pointer |
void tesseract_common::printNestedException | ( | const std::exception & | e, |
int | level = 0 |
||
) |
Print a nested exception.
e | The exception to print |
level | The exception level which controls the indentation |
tinyxml2::XMLError tesseract_common::QueryDoubleAttributeRequired | ( | const tinyxml2::XMLElement * | xml_element, |
const char * | name, | ||
double & | value | ||
) |
Query a double attribute from an xml element and print error log.
This is the same QueryDoubleAttribute but it will print out error messages for the failure conditions so the user only needs to check for the tinyxml2::XML_SUCCESS since it is a required attribute.
xml_element | The xml attribute to query attribute |
name | The name of the attribute to query |
value | The value to update from the xml attribute |
tinyxml2::XMLError tesseract_common::QueryIntAttributeRequired | ( | const tinyxml2::XMLElement * | xml_element, |
const char * | name, | ||
int & | value | ||
) |
Query a int attribute from an xml element and print error log.
This is the same QueryIntAttribute but it will print out error messages for the failure conditions so the user only needs to check for the tinyxml2::XML_SUCCESS since it is a required attribute.
xml_element | The xml attribute to query attribute |
name | The name of the attribute to query |
value | The value to update from the xml attribute |
tinyxml2::XMLError tesseract_common::QueryStringAttribute | ( | const tinyxml2::XMLElement * | xml_element, |
const char * | name, | ||
std::string & | value | ||
) |
Query a string attribute from an xml element.
xml_element | The xml attribute to query attribute |
name | The name of the attribute to query |
value | The value to update from the xml attribute |
tinyxml2::XMLError tesseract_common::QueryStringAttributeRequired | ( | const tinyxml2::XMLElement * | xml_element, |
const char * | name, | ||
std::string & | value | ||
) |
Query a string attribute from an xml element and print error log.
This is the same QueryStringAttribute but it will print out error messages for the failure conditions so the user only needs to check for the tinyxml2::XML_SUCCESS since it is a required attribute.
xml_element | The xml attribute to query attribute |
name | The name of the attribute to query |
value | The value to update from the xml attribute |
tinyxml2::XMLError tesseract_common::QueryStringText | ( | const tinyxml2::XMLElement * | xml_element, |
std::string & | text | ||
) |
Query a string Text from xml element.
xml_element | The xml element to query string from |
test | The value to update from the xml element |
tinyxml2::XMLError tesseract_common::QueryStringValue | ( | const tinyxml2::XMLAttribute * | xml_attribute, |
std::string & | value | ||
) |
Query a string value from xml attribute.
xml_attribute | The xml attribute to query string from |
value | The value to update from the xml attribute |
tinyxml2::XMLError tesseract_common::QueryStringValue | ( | const tinyxml2::XMLElement * | xml_element, |
std::string & | value | ||
) |
Query a string value from xml element.
xml_element | The xml element to query string from |
value | The value to update from the xml element |
void tesseract_common::reorder | ( | Eigen::Ref< Eigen::VectorXd > | v, |
std::vector< Eigen::Index > | order | ||
) |
Reorder Eigen::VectorXd implace given index list.
v | The vector to reorder |
order | A vector of index which define the new order |
void tesseract_common::rtrim | ( | std::string & | s | ) |
Right trim string.
s | The string to right trim |
bool tesseract_common::satisfiesPositionLimits | ( | const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & | position_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 joint position is within bounds or relatively equal to a limit.
joint_positions | The joint position to check |
joint_limits | The joint limits to perform check |
max_diff | The max diff when comparing position to limit value max(abs(position - limit)) <= max_diff, if true they are considered equal |
max_rel_diff | The max relative diff between position and limit abs(position - limit) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of position and limit. |
bool tesseract_common::satisfiesPositionLimits | ( | const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< FloatType, Eigen::Dynamic, 2 > > & | position_limits, | ||
FloatType | max_diff = static_cast<FloatType>(1e-6) , |
||
FloatType | max_rel_diff = std::numeric_limits<FloatType>::epsilon() |
||
) |
Check if joint position is within bounds or relatively equal to a limit.
joint_positions | The joint position to check |
joint_limits | The joint limits to perform check |
max_diff | The max diff when comparing position to limit value max(abs(position - limit)) <= max_diff, if true they are considered equal |
max_rel_diff | The max relative diff between position and limit abs(position - limit) <= largest * max_rel_diff, if true considered equal. The largest is the largest of the absolute values of position and limit. |
template bool tesseract_common::satisfiesPositionLimits< double > | ( | const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > & | position_limits, | ||
const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > & | max_diff, | ||
const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > & | max_rel_diff | ||
) |
template bool tesseract_common::satisfiesPositionLimits< double > | ( | const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > & | position_limits, | ||
double | max_diff, | ||
double | max_rel_diff | ||
) |
template bool tesseract_common::satisfiesPositionLimits< float > | ( | const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > & | position_limits, | ||
const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > & | max_diff, | ||
const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > & | max_rel_diff | ||
) |
template bool tesseract_common::satisfiesPositionLimits< float > | ( | const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > & | joint_positions, |
const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > & | position_limits, | ||
float | max_diff, | ||
float | max_rel_diff | ||
) |
std::string tesseract_common::strFormat | ( | const std::string & | format, |
Args... | args | ||
) |
std::string tesseract_common::StringAttribute | ( | const tinyxml2::XMLElement * | xml_element, |
const char * | name, | ||
std::string | default_value | ||
) |
Get string attribute if exist. If it does not exist it returns the default value.
xml_element | The xml element to attempt to parse attribute |
name | The name of the attribute |
default_value | The default value to return if attribute does not exist |
void tesseract_common::testSerialization | ( | const SerializableType & | object, |
const std::string & | typename_string | ||
) |
Tests Boost serialization for a serializable type.
Serializes the type to XML file, binary file, and XML string. It then deserializes it and calls the equality operator on the results
object | Object to be serialized |
typename_string | Prefix used for filepaths. Serialized files are put in /tmp/<typename_string>.<extension> |
void tesseract_common::testSerializationDerivedClass | ( | const std::shared_ptr< SerializableTypeBase > & | object, |
const std::string & | typename_string | ||
) |
Tests Boost serialization for a serializable derived type.
Serializes the type to XML file, binary file, and XML string using the base type. It then deserializes it, casts it to the derived type, and calls the equality operator on the results
object | Base class pointer to the object to be serialized |
typename_string | Prefix used for filepaths. Serialized files are put in /tmp/<typename_string>.<extension> |
void tesseract_common::testSerializationPtr | ( | const std::shared_ptr< SerializableType > & | object, |
const std::string & | typename_string | ||
) |
Tests Boost serialization of shared pointer for a serializable type.
Serializes the type to XML file, binary file, and XML string. It then deserializes it and calls the equality operator on the results
object | Object to be serialized |
typename_string | Prefix used for filepaths. Serialized files are put in /tmp/<typename_string>.<extension> |
bool tesseract_common::toNumeric | ( | const std::string & | s, |
FloatType & | value | ||
) |
Convert a string to a numeric value type.
s | The string to be converted |
value | The value to be loaded with converted string |
template bool tesseract_common::toNumeric< double > | ( | const std::string & | , |
double & | |||
) |
template bool tesseract_common::toNumeric< float > | ( | const std::string & | , |
float & | |||
) |
template bool tesseract_common::toNumeric< int > | ( | const std::string & | , |
int & | |||
) |
template bool tesseract_common::toNumeric< long > | ( | const std::string & | , |
long & | |||
) |
|
inline |
Converts a YAML::Node to a yaml string.
node | Input node |
void tesseract_common::trim | ( | std::string & | s | ) |
Trim left and right of string.
s | The string to trim |
void tesseract_common::twistChangeBase | ( | Eigen::Ref< Eigen::VectorXd > | twist, |
const Eigen::Isometry3d & | change_base | ||
) |
Change the base coordinate system of the Twist.
twist | The current Twist which gets modified in place |
change_base | The transform from the desired frame to the current base frame of the Twist |
void tesseract_common::twistChangeRefPoint | ( | Eigen::Ref< Eigen::VectorXd > | twist, |
const Eigen::Ref< const Eigen::Vector3d > & | ref_point | ||
) |
Change the reference point of the provided Twist.
twist | The current Twist which gets modified in place |
ref_point | Is expressed in the same base frame of the Twist and is a vector from the old point to the new point. |
|
static |
Random number generator.