![]() |
Tesseract 0.28.4
|
Namespace owning boost's hash_is_avalanching, and defined iff boost has the trait at all. More...
Classes | |
| class | AllowedCollisionMatrix |
| class | AnyWrapper |
| class | AnyInterface |
| class | AnyPoly |
| struct | CalibrationInfo |
| The CalibrationInfo struct. More... | |
| class | CloneCache |
| Used to create a cache of objects. More... | |
| class | CollisionMarginPairData |
| class | CollisionMarginData |
| Stores information about how the margins allowed between collision objects. More... | |
| class | ContactAllowedValidator |
| Should return true if links are allowed to be in collision, otherwise false. More... | |
| class | ACMContactAllowedValidator |
| class | CombinedContactAllowedValidator |
| struct | NameId |
| Tagged integer identity type for links and joints. More... | |
| struct | OrderedIdPair |
| Canonically ordered pair of ids with cached combined hash — the key type for pair-keyed maps (ACM, collision margins, collision coefficients). More... | |
| class | JointState |
| class | JointTrajectory |
| Represents a joint trajectory. More... | |
| struct | KinematicLimits |
| Store kinematic limits. More... | |
| struct | LogRecord |
| Structured representation of a Tesseract log event. More... | |
| struct | ManipulatorInfo |
| Contains information about a robot manipulator. More... | |
| struct | PluginInfo |
| The Plugin Information struct. More... | |
| struct | PluginInfoContainer |
| struct | PluginDiscoveryInfo |
| Plugin library discovery information used before loading plugin-specific schemas. More... | |
| struct | ProfilesPluginInfo |
| The profile plugin information structure. More... | |
| struct | KinematicsPluginInfo |
| The kinematics plugin information structure. More... | |
| struct | ContactManagersPluginInfo |
| The contact managers plugin information structure. More... | |
| struct | TaskComposerPluginInfo |
| The task composer plugin information structure. More... | |
| class | Profile |
| The Profile class. More... | |
| class | ProfileDictionary |
| This class is used to store profiles used by various tasks. More... | |
| struct | ProfileFactoryData |
| This is a base class used to store data need by the profiles This may contain the environment, scene graph, etc. More... | |
| class | ProfileFactory |
| Profile Factory class used for loading profile to be called by name. More... | |
| class | ProfilePluginFactory |
| class | PropertyTreeValidationError |
| Exception containing all configuration validation diagnostics. More... | |
| class | PropertyTree |
| Represents a node in a hierarchical property tree. More... | |
| class | PropertyTreeBuilder |
| Fluent builder for constructing PropertyTree schemas with minimal boilerplate. More... | |
| class | ResourceLocator |
| Abstract class for resource loaders. More... | |
| class | GeneralResourceLocator |
| A general resource loaders using environment variable. More... | |
| class | Resource |
| Represents resource data available from a file or url. More... | |
| class | SimpleLocatedResource |
| Resource implementation for a local file. More... | |
| class | BytesResource |
| class | SchemaRegistry |
| A global registry of named schemas for PropertyTree. More... | |
| struct | Serialization |
| struct | ambiguate |
| struct | got_type |
| struct | got_type< A > |
| struct | sig_check |
| struct | has_member |
| class | Stopwatch |
| A simple stopwatch class leveraging chrono high resolution clock. More... | |
| class | Timer |
| A timer which calls a callback every interval on a separate thread. More... | |
| struct | LinkTag |
| struct | JointTag |
| class | TestPluginBase |
| class | TestPluginMultiply |
| class | TestProfile |
| struct | NameIdTestAccess |
| Test-only access to NameId internals; NameId declares this a friend. More... | |
Typedefs | |
| using | AllowedCollisionEntries = std::unordered_map<LinkIdPair, std::string> |
| using | BoolAnyPoly = AnyWrapper<bool> |
| using | IntAnyPoly = AnyWrapper<int> |
| using | UnsignedAnyPoly = AnyWrapper<unsigned> |
| using | DoubleAnyPoly = AnyWrapper<double> |
| using | FloatAnyPoly = AnyWrapper<float> |
| using | StringAnyPoly = AnyWrapper<std::string> |
| using | SizeTAnyPoly = AnyWrapper<std::size_t> |
| using | VectorStringAnyPoly = AnyWrapper<std::vector<std::string>> |
| using | VectorBoolAnyPoly = AnyWrapper<std::vector<bool>> |
| using | VectorIntAnyPoly = AnyWrapper<std::vector<int>> |
| using | VectorUnsignedAnyPoly = AnyWrapper<std::vector<unsigned>> |
| using | VectorDoubleAnyPoly = AnyWrapper<std::vector<double>> |
| using | VectorFloatAnyPoly = AnyWrapper<std::vector<float>> |
| using | VectorSizeTAnyPoly = AnyWrapper<std::vector<std::size_t>> |
| using | UMapStringStringAnyPoly = AnyWrapper<std::unordered_map<std::string, std::string>> |
| using | UMapStringBoolAnyPoly = AnyWrapper<std::unordered_map<std::string, bool>> |
| using | UMapStringIntAnyPoly = AnyWrapper<std::unordered_map<std::string, int>> |
| using | UMapStringUnsignedAnyPoly = AnyWrapper<std::unordered_map<std::string, unsigned>> |
| using | UMapStringDoubleAnyPoly = AnyWrapper<std::unordered_map<std::string, double>> |
| using | UMapStringFloatAnyPoly = AnyWrapper<std::unordered_map<std::string, float>> |
| using | UMapStringSizeTAnyPoly = AnyWrapper<std::unordered_map<std::string, std::size_t>> |
| using | PairsCollisionMarginData = std::unordered_map<LinkIdPair, double> |
| template<typename T> | |
| using | AlignedVector = std::vector<T, Eigen::aligned_allocator<T>> |
| 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 |
| using | VectorIsometry3d = AlignedVector<Eigen::Isometry3d> |
| using | VectorVector4d = AlignedVector<Eigen::Vector4d> |
| using | VectorVector3d = std::vector<Eigen::Vector3d> |
| using | VectorVector2d = AlignedVector<Eigen::Vector2d> |
| using | LinkIdTransformMap = AlignedUnorderedMap<LinkId, Eigen::Isometry3d> |
| using | JointIdTransformMap = AlignedUnorderedMap<JointId, Eigen::Isometry3d> |
| using | Toolpath = AlignedVector<VectorIsometry3d> |
| using | TrajArray = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> |
| using | LinkId = NameId<LinkTag> |
| using | JointId = NameId<JointTag> |
| using | LinkIdPair = OrderedIdPair<LinkTag> |
| using | JointStateAnyPoly = AnyWrapper<JointState> |
| using | JointStatePtrAnyPoly = AnyWrapper<std::shared_ptr<JointState>> |
| using | LogAttribute = std::variant<bool, std::int64_t, std::uint64_t, double, std::string> |
| Scalar value supported by a structured log-record attribute. | |
| using | LogAttributes = std::unordered_map<std::string, LogAttribute> |
| Collection of structured attributes indexed by attribute name. | |
| using | LogRecordHandler = std::function<void(const LogRecord&)> |
| Callback invoked for each structured record that passes spdlog filtering. | |
| using | LogRecordHandlerId = std::uint64_t |
| Opaque identifier assigned to a registered structured-record handler. | |
| using | ManipulatorInfoAnyPoly = AnyWrapper<ManipulatorInfo> |
| using | PluginInfoMap = std::map<std::string, PluginInfo> |
| A map of PluginInfo to user defined name. | |
| using | ProfileDictionaryPtrAnyPoly = tesseract::common::AnyWrapper<std::shared_ptr<ProfileDictionary>> |
| using | SimpleResourceLocatorFn = std::function<std::string(const std::string&)> |
| template<typename SerializableType> | |
| using | TestSerializationCompareFn = std::function<bool(const SerializableType&, const SerializableType&)> |
Enumerations | |
| enum class | CollisionMarginPairOverrideType : std::uint8_t { NONE , REPLACE , MODIFY } |
| Identifies how the provided contact margin data should be applied. More... | |
| enum class | CombinedContactAllowedValidatorType : std::uint8_t { AND , OR } |
| Identify how the two should be combined. More... | |
Functions | |
| bool | operator== (const AllowedCollisionEntries &entries_1, const AllowedCollisionEntries &entries_2) |
| template<class Archive> | |
| void | serialize (Archive &ar, AllowedCollisionMatrix &obj) |
| std::ostream & | operator<< (std::ostream &os, const AllowedCollisionMatrix &acm) |
| template<class Archive, class T> | |
| void | serialize (Archive &ar, AnyWrapper< T > &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, AnyPoly &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, CalibrationInfo &obj) |
| template<class Archive, typename Tag> | |
| std::string | save_minimal (const Archive &, const NameId< Tag > &id) |
| template<class Archive, typename Tag> | |
| void | load_minimal (const Archive &, NameId< Tag > &id, const std::string &value) |
| template<class Archive, typename Tag> | |
| void | save (Archive &ar, const OrderedIdPair< Tag > &pair) |
| OrderedIdPair archives as its two names, under the same NVPs cereal gives std::pair. | |
| template<class Archive, typename Tag> | |
| void | load (Archive &ar, OrderedIdPair< Tag > &pair) |
| template<class Archive> | |
| void | serialize (Archive &ar, CollisionMarginPairData &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, CollisionMarginData &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, ACMContactAllowedValidator &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, CombinedContactAllowedValidator &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, JointState &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, JointTrajectory &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, ManipulatorInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, KinematicLimits &obj) |
| template<class Archive> | |
| void | serialize (Archive &, Resource &) |
| template<class Archive> | |
| void | serialize (Archive &, GeneralResourceLocator &) |
| template<class Archive> | |
| void | serialize (Archive &ar, SimpleLocatedResource &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, BytesResource &obj) |
| template<class Archive> | |
| void | save (Archive &ar, const PluginInfo &obj) |
| template<class Archive> | |
| void | load (Archive &ar, PluginInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, PluginInfoContainer &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, PluginDiscoveryInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, ProfilesPluginInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, KinematicsPluginInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, ContactManagersPluginInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, TaskComposerPluginInfo &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, Profile &obj) |
| template<class Archive> | |
| void | serialize (Archive &ar, ProfileDictionary &obj) |
| template<typename FloatType> | |
| bool | 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 | 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 | 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 | 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. | |
| std::shared_ptr< spdlog::logger > | getLogger (std::string_view name="tesseract") |
| Get the Tesseract-owned default logger or a registered named logger. | |
| void | setLogger (std::shared_ptr< spdlog::logger > logger) |
| Replace the default Tesseract logger. | |
| bool | isLogLevelEnabled (spdlog::level::level_enum level) noexcept |
| Check whether the default Tesseract logger accepts a severity. | |
| LogRecordHandlerId | addLogRecordHandler (LogRecordHandler handler) |
| Register a callback that receives structured log records. | |
| bool | removeLogRecordHandler (LogRecordHandlerId id) noexcept |
| Unregister a structured-record callback. | |
| void | emitLogRecord (const LogRecord &record) noexcept |
| Emit a structured record through its spdlog logger and all registered handlers. | |
| bool | writeSimplePlyFile (const std::string &path, const tesseract::common::VectorVector3d &vertices, const std::vector< Eigen::Vector3i > &vectices_color, const Eigen::VectorXi &faces, int num_faces) |
| Write a simple ply file given vertices and faces. | |
| bool | writeSimplePlyFile (const std::string &path, const tesseract::common::VectorVector3d &vertices, const Eigen::VectorXi &faces, int num_faces) |
| Write a simple ply file given vertices and faces. | |
| int | loadSimplePlyFile (const std::string &path, tesseract::common::VectorVector3d &vertices, Eigen::VectorXi &faces, bool triangles_only=false) |
| Loads a simple ply file given a path. | |
| PropertyTree | makePluginInfoContainerSchema (std::string_view factory_base_type) |
| Build a PluginInfoContainer schema for the given factory base type. | |
| std::optional< std::pair< std::string, std::size_t > > | isSequenceType (std::string_view type) |
| Check if type is a sequence. | |
| std::optional< std::pair< std::string, std::string > > | isMapType (std::string_view type) |
| Check if type is a map. | |
| void | validateRequired (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: ensure 'required' attribute is present and non-null. | |
| void | validateEnum (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: enforce that node's value is in 'enum' list. | |
| void | validateStringLength (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: enforce minimum_length and maximum_length constraints on strings. | |
| void | validateMap (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: ensure node value is of type YAML::NodeType::Map. | |
| void | validateSequence (const PropertyTree &node, std::size_t length, const std::string &path, std::vector< std::string > &errors) |
| Validator: ensure node value is of type YAML::NodeType::Sequence. | |
| void | validateContainer (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: ensure property is a container of child properties. The property should have children and the value should be null. | |
| void | validateCustomType (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: Retrieve schema for the custom type and run its validators. | |
| void | validatePluginInfo (const PropertyTree &node, const std::string &base_type, const std::string &path, std::vector< std::string > &errors) |
| Validator: Validate a plugin info structure (class + config) for derived types. | |
| template<typename T> | |
| void | validateTypeCast (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validate that the node's value can be interpreted as the provided type. | |
| template<typename T> | |
| void | validateTypeCastWithRange (const PropertyTree &node, const std::string &path, std::vector< std::string > &errors) |
| Validator: type cast and enforce 'minimum'/'maximum' range constraints. | |
| void | registerSchema (const std::string &key, const std::string &path) |
| Register a schema from a file path. | |
| void | registerSchema (const std::string &key, const std::function< PropertyTree()> &fn) |
| Register a schema from a function. | |
| void | registerSchemaDerivedType (const std::string &base_type, const std::string &derived_type) |
| Register that a derived type schema can be used where a base type is expected. | |
| std::size_t | nameIdHash (const std::string &name) noexcept |
| Hash a name into a NameId value. | |
| std::size_t | combineNameIdHash (std::size_t f, std::size_t s) noexcept |
| Mix two id values into one bucket hash — the hash of the OrderedIdPair holding them, so a caller can compute a pair's bucket hash without constructing one. | |
| template<typename Tag> | |
| std::ostream & | operator<< (std::ostream &os, const NameId< Tag > &id) |
| Stream insertion: writes exactly id.name(). Print value() explicitly where the numeric id matters. | |
| template<typename IdT> | |
| std::vector< IdT > | toIds (const std::vector< std::string > &names) |
| Convert a vector of strings to a vector of NameId<Tag>. | |
| template<typename Container> | |
| std::vector< std::string > | toNames (const Container &ids) |
| Convert any container of NameId<Tag> to a vector of name strings. | |
| template<typename Tag> | |
| constexpr std::size_t | hash_value (const NameId< Tag > &id) noexcept |
| ADL hook for boost::hash. Returns the cached id value; no rehash per lookup. | |
| template<typename Tag> | |
| std::size_t | hash_value (const OrderedIdPair< Tag > &p) noexcept |
| ADL hook for boost::hash. Returns the cached combined hash; no rehash per lookup. | |
| template<typename SerializableType> | |
| bool | testSerializationCompareEqual (const SerializableType &a, const SerializableType &b) |
| template<typename SerializableType> | |
| bool | testSerializationComparePtrEqual (const SerializableType &a, const SerializableType &b) |
| template<typename SerializableType> | |
| void | testSerialization (const SerializableType &object, const std::string &typename_string, TestSerializationCompareFn< SerializableType > compare=testSerializationCompareEqual< SerializableType >) |
| Tests serialization for a serializable type. | |
| template<typename SerializableTypeBase, typename SerializableTypeDerived> | |
| void | testSerializationDerivedClass (const std::shared_ptr< SerializableTypeBase > &object, const std::string &typename_string) |
| Tests serialization for a serializable derived type. | |
| template<typename SerializableTypeStored> | |
| void | testSerializationAnyPoly (const tesseract::common::AnyPoly &object, const std::string &typename_string, TestSerializationCompareFn< SerializableTypeStored > compare=testSerializationCompareEqual< SerializableTypeStored >) |
| Tests serialization for a serializable any poly type. | |
| template<typename... Args> | |
| std::string | strFormat (const std::string &format, Args... args) |
| template<typename T> | |
| void | appendBytes (std::vector< std::uint8_t > &buf, const T &value) |
| Append the raw bytes of a trivially-copyable value to a byte buffer (native byte order). | |
| template<typename T> | |
| T | readBytes (const std::vector< std::uint8_t > &buf, std::size_t &offset) |
Read a trivially-copyable value from a byte buffer at offset, advancing it. | |
| std::string | fileToString (const std::filesystem::path &filepath) |
| Read in the contents of the file into a string. | |
| void | twistChangeRefPoint (Eigen::Ref< Eigen::VectorXd > twist, const Eigen::Ref< const Eigen::Vector3d > &ref_point) |
| Change the reference point of the provided Twist. | |
| void | twistChangeBase (Eigen::Ref< Eigen::VectorXd > twist, const Eigen::Isometry3d &change_base) |
| Change the base coordinate system of the Twist. | |
| void | jacobianChangeBase (Eigen::Ref< Eigen::MatrixXd > jacobian, const Eigen::Isometry3d &change_base) |
| Change the base coordinate system of the jacobian. | |
| void | jacobianChangeRefPoint (Eigen::Ref< Eigen::MatrixXd > jacobian, const Eigen::Ref< const Eigen::Vector3d > &ref_point) |
| Change the reference point of the jacobian. | |
| Eigen::VectorXd | concat (const Eigen::VectorXd &a, const Eigen::VectorXd &b) |
| Concatenate two vector. | |
| 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]. | |
| Eigen::VectorXd | calcTransformError (const Eigen::Isometry3d &t1, const Eigen::Isometry3d &t2) |
| Calculate error between two transforms expressed in t1 coordinate system. | |
| Eigen::VectorXd | calcJacobianTransformErrorDiff (const Eigen::Isometry3d &target, const Eigen::Isometry3d &source, const Eigen::Isometry3d &source_perturbed) |
| Calculate jacobian transform error difference expressed in the target frame coordinate system. | |
| Eigen::VectorXd | calcJacobianTransformErrorDiff (const Eigen::Isometry3d &target, const Eigen::Isometry3d &source, const Eigen::Isometry3d &source_perturbed, const Eigen::Ref< const Eigen::VectorXd > &lower_tolerance, const Eigen::Ref< const Eigen::VectorXd > &upper_tolerance) |
| Calculate jacobian transform error difference with optional per-component dead-band tolerances. | |
| Eigen::VectorXd | calcJacobianTransformErrorDiff (const Eigen::Isometry3d &target, const Eigen::Isometry3d &target_perturbed, const Eigen::Isometry3d &source, const Eigen::Isometry3d &source_perturbed) |
| Calculate jacobian transform error difference expressed in the target frame coordinate system. | |
| Eigen::VectorXd | calcJacobianTransformErrorDiff (const Eigen::Isometry3d &target, const Eigen::Isometry3d &target_perturbed, const Eigen::Isometry3d &source, const Eigen::Isometry3d &source_perturbed, const Eigen::Ref< const Eigen::VectorXd > &lower_tolerance, const Eigen::Ref< const Eigen::VectorXd > &upper_tolerance) |
| Calculate jacobian transform error difference (dynamic target) with optional per-component dead-band tolerances. | |
| void | applyTolerances (Eigen::Ref< Eigen::VectorXd > v, const Eigen::Ref< const Eigen::VectorXd > &lower_tolerance, const Eigen::Ref< const Eigen::VectorXd > &upper_tolerance) |
| Apply a per-component dead-band tolerance to an error vector in place. | |
| Eigen::Vector4d | computeRandomColor () |
| This computes a random color RGBA [0, 1] with alpha set to 1. | |
| void | printNestedException (const std::exception &e, int level=0) |
| Print a nested exception. | |
| std::string | getTempPath () |
| Get the host temp directory path. | |
| bool | isNumeric (const std::string &s) |
| Determine if a string is a number. | |
| bool | isNumeric (const std::vector< std::string > &sv) |
| Determine if each string in vector is a number. | |
| 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. | |
| void | ltrim (std::string &s) |
| Left trim string. | |
| void | rtrim (std::string &s) |
| Right trim string. | |
| void | trim (std::string &s) |
| Trim left and right of string. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| 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 ==. | |
| 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. | |
| std::string | getTimestampString () |
| Get Timestamp string. | |
| void | reorder (Eigen::Ref< Eigen::VectorXd > v, std::vector< Eigen::Index > order) |
| Reorder Eigen::VectorXd implace given index list. | |
| int | QueryStringValue (const tinyxml2::XMLElement *xml_element, std::string &value) |
| Query a string value from xml element. | |
| int | QueryStringText (const tinyxml2::XMLElement *xml_element, std::string &text) |
| Query a string Text from xml element. | |
| int | QueryStringValue (const tinyxml2::XMLAttribute *xml_attribute, std::string &value) |
| Query a string value from xml attribute. | |
| int | QueryStringAttribute (const tinyxml2::XMLElement *xml_element, const char *name, std::string &value) |
| Query a string attribute from an xml element. | |
| 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. | |
| int | QueryStringAttributeRequired (const tinyxml2::XMLElement *xml_element, const char *name, std::string &value) |
| Query a string attribute from an xml element and print error log. | |
| int | QueryDoubleAttributeRequired (const tinyxml2::XMLElement *xml_element, const char *name, double &value) |
| Query a double attribute from an xml element and print error log. | |
| int | QueryIntAttributeRequired (const tinyxml2::XMLElement *xml_element, const char *name, int &value) |
| Query a int attribute from an xml element and print error log. | |
| 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. | |
| 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. | |
| 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. | |
| template<typename Scalar> | |
| bool | almostEqualRelativeAndAbs (const Eigen::Transform< Scalar, 3, Eigen::Isometry > &a, const Eigen::Transform< Scalar, 3, Eigen::Isometry > &b, std::common_type_t< Scalar > trans_atol=Scalar(1e-10), std::common_type_t< Scalar > trans_rtol=Eigen::NumTraits< Scalar >::dummy_precision(), std::common_type_t< Scalar > rot_tol=Scalar(1e-10)) noexcept |
| Test whether two isometries are equal up to numerical noise. | |
| template<typename FloatType> | |
| bool | toNumeric (const std::string &s, FloatType &value) |
| Convert a string to a numeric value type. | |
| template<class T, class Hash = std::hash<T>, class Eq = std::equal_to<T>> | |
| void | removeDuplicates (std::vector< T > &v) |
| Remove duplicates and keep first. | |
| std::vector< LinkId > | getAllowedCollisions (const std::vector< LinkId > &link_ids, const AllowedCollisionEntries &acm_entries, bool remove_duplicates=true) |
| Gets allowed collisions for a set of link ids. | |
| template<typename To, typename From> | |
| To | numeric_cast (From value) |
| Safely cast a number from one type to another, checking for overflow and underflow. | |
| void | processYamlIncludeDirective (YAML::Node &node, const ResourceLocator &locator) |
| Recursively expands !include directives in a YAML node, in-place. | |
| YAML::Node | loadYamlFile (const std::string &file_path, const ResourceLocator &locator) |
| Loads a YAML file and processes !include directives recursively. | |
| YAML::Node | loadYamlString (const std::string &yaml_string, const ResourceLocator &locator) |
| void | writeYamlToFile (const YAML::Node &node, const std::string &file_path) |
| Writes a YAML::Node to a file. | |
| void | checkForUnknownKeys (const YAML::Node &node, const std::set< std::string > &expected_keys) |
| Check node map for unknown keys. | |
| std::string | toYAMLString (const YAML::Node &node) |
| Converts a YAML::Node to a yaml string. | |
| YAML::Node | fromYAMLString (const std::string &string) |
| Converts yaml string to a YAML::Node. | |
| bool | compareYAML (const YAML::Node &node1, const YAML::Node &node2) |
| Checks if the YAML::Nodes are identical. | |
| template bool | isWithinLimits< float > (const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &limits) |
| template bool | isWithinLimits< double > (const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &limits) |
| template bool | satisfiesLimits< float > (const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &limits, float max_diff, float max_rel_diff) |
| template bool | satisfiesLimits< double > (const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &limits, double max_diff, double max_rel_diff) |
| template bool | satisfiesLimits< float > (const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &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 | satisfiesLimits< double > (const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 1 > > &values, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &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 | enforceLimits< float > (Eigen::Ref< Eigen::Matrix< float, Eigen::Dynamic, 1 > > values, const Eigen::Ref< const Eigen::Matrix< float, Eigen::Dynamic, 2 > > &limits) |
| template void | enforceLimits< double > (Eigen::Ref< Eigen::Matrix< double, Eigen::Dynamic, 1 > > values, const Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 2 > > &limits) |
| std::ostream & | operator<< (std::ostream &os, const PropertyTree &tree) |
| bool | isRelativePath (const std::string &url) |
| std::size_t | findSeparator (const std::string &str) |
| 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) |
| std::pair< Eigen::Vector3d, double > | calcRotationalErrorDecomposed (const Eigen::Ref< const Eigen::Matrix3d > &R) |
| bool | operator== (const ProfileDictionary &lhs, const ProfileDictionary &rhs) |
| bool | operator!= (const ProfileDictionary &lhs, const ProfileDictionary &rhs) |
| template<class Archive> | |
| void | serialize (Archive &ar, TestProfile &obj) |
Variables | |
| std::mt19937 | mersenne { std::random_device{}() } |
| Random number generator, one independently seeded instance per thread. | |
Namespace owning boost's hash_is_avalanching, and defined iff boost has the trait at all.
Boost gained the trait in 1.81 and moved it out of boost::unordered in 1.89, where the old name survives only as a using-declaration that cannot be specialized.
| using tesseract::common::AlignedUnorderedMap |
|
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 CollisionMarginPairData. |
| MODIFY | Modify the contact managers 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. |
|
strong |
Identify how the two should be combined.
| Enumerator | |
|---|---|
| AND | Combines the two ContactAllowedValidator with AND operator. |
| OR | Combines the two ContactAllowedValidator with OR operator. |
| void tesseract::common::save | ( | Archive & | ar, |
| const OrderedIdPair< Tag > & | pair ) |
OrderedIdPair archives as its two names, under the same NVPs cereal gives std::pair.
A container keyed on OrderedIdPair therefore writes the format its string-keyed predecessor wrote, when the key was std::pair<std::string, std::string>. The ids are name hashes and are never written; they are recomputed from the names on load.
The names are emitted lexicographically rather than in the pair's canonical order, which is decided by hash value and so would tie the archive to the hashing implementation.
| 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.
| joint_positions | The values to check |
| position_limits | The limits to perform check |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| values | The values to enforce bounds on |
| limits | The limits to perform check |
| std::shared_ptr< spdlog::logger > tesseract::common::getLogger | ( | std::string_view | name = "tesseract" | ) |
Get the Tesseract-owned default logger or a registered named logger.
The default tesseract logger writes colorized messages to standard error and remains owned by Tesseract if removed from the spdlog registry. A newly created named logger is registered with spdlog and clones the current sinks, formatter, level, error handler, and flush level of the default logger.
| name | Logger name. An empty name is permitted and follows normal spdlog registry semantics. |
| void tesseract::common::setLogger | ( | std::shared_ptr< spdlog::logger > | logger | ) |
Replace the default Tesseract logger.
The logger must be non-null and named tesseract. Replace it during single-threaded application startup, before worker threads begin logging; replacement must not run concurrently with logging. Dropping tesseract from the spdlog registry does not replace the logger owned by Tesseract; use this function instead.
| logger | Logger to install as the default Tesseract logger. |
| std::invalid_argument | if logger is null or is not named tesseract. |
|
noexcept |
Check whether the default Tesseract logger accepts a severity.
Use this to guard expensive work needed only to construct a log message. Ordinary messages should use the TESSERACT_LOG_* macros directly.
| level | Native spdlog severity. |
level. | LogRecordHandlerId tesseract::common::addLogRecordHandler | ( | LogRecordHandler | handler | ) |
Register a callback that receives structured log records.
Handlers are invoked synchronously after the record has been written to its spdlog sinks. Exceptions thrown by a handler are isolated and do not escape the logging call or prevent later handlers from running.
| handler | Callback to register. |
handler is empty.
|
noexcept |
Unregister a structured-record callback.
Removal prevents a handler that has not yet started from being called by an in-flight dispatch and waits for callbacks already running on other threads to return. When called by the handler itself, removal returns without waiting for the current callback. State captured by a handler must remain valid until any callback that has already started has returned.
| id | Identifier returned by addLogRecordHandler(). |
|
noexcept |
Emit a structured record through its spdlog logger and all registered handlers.
Records rejected by the selected logger's native spdlog level are discarded before sink or handler dispatch. Structured attributes are appended to the spdlog message in deterministic key order. Logging and handler failures are contained and do not escape this function.
| record | Record to emit. |
| bool tesseract::common::writeSimplePlyFile | ( | const std::string & | path, |
| const tesseract::common::VectorVector3d & | vertices, | ||
| const std::vector< Eigen::Vector3i > & | vectices_color, | ||
| const Eigen::VectorXi & | faces, | ||
| int | num_faces ) |
Write a simple ply file given vertices and faces.
| path | The file path |
| vertices | A vector of vertices |
| vertices_color | The vertices color (0-255,0-255,0-255), if empty uses a default color |
| faces | The first values indicates the number of vertices that define the face followed by the vertice index |
| num_faces | The number of faces |
| bool tesseract::common::writeSimplePlyFile | ( | const std::string & | path, |
| const tesseract::common::VectorVector3d & | vertices, | ||
| const Eigen::VectorXi & | faces, | ||
| int | num_faces ) |
Write a simple ply file given vertices and faces.
| path | The file path |
| vertices | A vector of vertices |
| faces | The first values indicates the number of vertices that define the face followed by the vertice index |
| num_faces | The number of faces |
| int tesseract::common::loadSimplePlyFile | ( | const std::string & | path, |
| tesseract::common::VectorVector3d & | vertices, | ||
| Eigen::VectorXi & | faces, | ||
| bool | triangles_only = false ) |
Loads a simple ply file given a path.
| path | The file path |
| vertices | A vector of vertices |
| faces | The first values indicates the number of vertices that define the face followed by the vertice index |
| triangles_only | Convert to only include triangles |
| PropertyTree tesseract::common::makePluginInfoContainerSchema | ( | std::string_view | factory_base_type | ) |
Build a PluginInfoContainer schema for the given factory base type.
| factory_base_type | Fully-qualified factory base class name. |
| std::optional< std::pair< std::string, std::size_t > > tesseract::common::isSequenceType | ( | std::string_view | type | ) |
Check if type is a sequence.
| type | The type to check |
| std::optional< std::pair< std::string, std::string > > tesseract::common::isMapType | ( | std::string_view | type | ) |
Check if type is a map.
| type | The type to check |
| void tesseract::common::validateRequired | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: ensure 'required' attribute is present and non-null.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateEnum | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: enforce that node's value is in 'enum' list.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateStringLength | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: enforce minimum_length and maximum_length constraints on strings.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateMap | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: ensure node value is of type YAML::NodeType::Map.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateSequence | ( | const PropertyTree & | node, |
| std::size_t | length, | ||
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: ensure node value is of type YAML::NodeType::Sequence.
| node | Node to validate. |
| length | The length if fixed size. If zero, it is considered dynamic size sequence. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateContainer | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: ensure property is a container of child properties. The property should have children and the value should be null.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateCustomType | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: Retrieve schema for the custom type and run its validators.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validatePluginInfo | ( | const PropertyTree & | node, |
| const std::string & | base_type, | ||
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: Validate a plugin info structure (class + config) for derived types.
| node | Node to validate (should contain 'class' and 'config' fields). |
| base_type | The base type name to check against. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateTypeCast | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validate that the node's value can be interpreted as the provided type.
| node | PropertyTree node whose value to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::validateTypeCastWithRange | ( | const PropertyTree & | node, |
| const std::string & | path, | ||
| std::vector< std::string > & | errors ) |
Validator: type cast and enforce 'minimum'/'maximum' range constraints.
| node | Node to validate. |
| path | Dot-separated path for error messages. |
| errors | Output vector to append errors to. |
| void tesseract::common::registerSchema | ( | const std::string & | key, |
| const std::string & | path ) |
Register a schema from a file path.
| key | Unique identifier for this schema. |
| path | Path to a .yaml schema file. |
| void tesseract::common::registerSchema | ( | const std::string & | key, |
| const std::function< PropertyTree()> & | fn ) |
Register a schema from a function.
| key | Unique identifier for this schema. |
| fn | Function that returns a PropertyTree schema. |
| void tesseract::common::registerSchemaDerivedType | ( | const std::string & | base_type, |
| const std::string & | derived_type ) |
Register that a derived type schema can be used where a base type is expected.
| base_type | The base type name |
| derived_type | The derived type name |
|
nodiscardnoexcept |
Hash a name into a NameId value.
boost::hash<std::string>, which is avalanching and identical on every platform. Defined out of line so this header stays free of boost includes.
|
nodiscardnoexcept |
Mix two id values into one bucket hash — the hash of the OrderedIdPair holding them, so a caller can compute a pair's bucket hash without constructing one.
boost::hash_combine over the two values. Defined out of line so this header stays free of boost includes.
| void tesseract::common::testSerialization | ( | const SerializableType & | object, |
| const std::string & | typename_string, | ||
| TestSerializationCompareFn< SerializableType > | compare = testSerializationCompareEqual<SerializableType> ) |
Tests 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 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::testSerializationAnyPoly | ( | const tesseract::common::AnyPoly & | object, |
| const std::string & | typename_string, | ||
| TestSerializationCompareFn< SerializableTypeStored > | compare = testSerializationCompareEqual<SerializableTypeStored> ) |
Tests serialization for a serializable any poly 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::appendBytes | ( | std::vector< std::uint8_t > & | buf, |
| const T & | value ) |
Append the raw bytes of a trivially-copyable value to a byte buffer (native byte order).
A small primitive for hand-rolled binary serialization; pairs with readBytes.
| T tesseract::common::readBytes | ( | const std::vector< std::uint8_t > & | buf, |
| std::size_t & | offset ) |
Read a trivially-copyable value from a byte buffer at offset, advancing it.
Inverse of appendBytes.
| std::runtime_error | if the buffer has fewer than sizeof(T) bytes remaining. |
| std::string tesseract::common::fileToString | ( | const std::filesystem::path & | filepath | ) |
Read in the contents of the file into a string.
| filepath | The file to read |
| 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. |
| 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::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. |
| 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::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 |
| Eigen::VectorXd tesseract::common::calcJacobianTransformErrorDiff | ( | const Eigen::Isometry3d & | target, |
| const Eigen::Isometry3d & | source, | ||
| const Eigen::Isometry3d & | source_perturbed ) |
Calculate jacobian transform error difference expressed in the target frame coordinate system.
This is used when the target is a fixed frame in the environment. Handles the angle-axis ±π discontinuity by computing err and perturbed_err in coordination.
| target | The desired transform to express the transform error difference in |
| source | The current location of the source transform |
| source_perturbed | The perturbed location of the source transform |
| Eigen::VectorXd tesseract::common::calcJacobianTransformErrorDiff | ( | const Eigen::Isometry3d & | target, |
| const Eigen::Isometry3d & | source, | ||
| const Eigen::Isometry3d & | source_perturbed, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | lower_tolerance, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | upper_tolerance ) |
Calculate jacobian transform error difference with optional per-component dead-band tolerances.
Same behavior as the 3-argument overload; additionally, after the paired ±π/sign correction the err and perturbed_err vectors are clamped inside [lower_tolerance, upper_tolerance] before the subtraction. Both tolerance vectors must be size 6, or both empty for raw finite-difference behavior.
| target | The desired transform to express the transform error difference in |
| source | The current location of the source transform |
| source_perturbed | The perturbed location of the source transform |
| lower_tolerance | Per-component dead-band lower bound (size 6, or empty for no-op) |
| upper_tolerance | Per-component dead-band upper bound (same size constraints as lower_tolerance) |
| Eigen::VectorXd tesseract::common::calcJacobianTransformErrorDiff | ( | const Eigen::Isometry3d & | target, |
| const Eigen::Isometry3d & | target_perturbed, | ||
| const Eigen::Isometry3d & | source, | ||
| const Eigen::Isometry3d & | source_perturbed ) |
Calculate jacobian transform error difference expressed in the target frame coordinate system.
This is used when the target and source are both dynamic links. Handles the angle-axis ±π discontinuity by computing err and perturbed_err in coordination.
| target | The desired transform to express the transform error difference in |
| target_perturbed | The perturbed location of the target transform |
| source | The current location of the source transform |
| source_perturbed | The perturbed location of the source transform |
| Eigen::VectorXd tesseract::common::calcJacobianTransformErrorDiff | ( | const Eigen::Isometry3d & | target, |
| const Eigen::Isometry3d & | target_perturbed, | ||
| const Eigen::Isometry3d & | source, | ||
| const Eigen::Isometry3d & | source_perturbed, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | lower_tolerance, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | upper_tolerance ) |
Calculate jacobian transform error difference (dynamic target) with optional per-component dead-band tolerances.
Same behavior as the 4-argument overload; additionally, after the paired ±π/sign correction the err and perturbed_err vectors are clamped inside [lower_tolerance, upper_tolerance] before the subtraction. Both tolerance vectors must be size 6, or both empty for raw finite-difference behavior.
| target | The desired transform to express the transform error difference in |
| target_perturbed | The perturbed location of the target transform |
| source | The current location of the source transform |
| source_perturbed | The perturbed location of the source transform |
| lower_tolerance | Per-component dead-band lower bound (size 6, or empty for no-op) |
| upper_tolerance | Per-component dead-band upper bound (same size constraints as lower_tolerance) |
| void tesseract::common::applyTolerances | ( | Eigen::Ref< Eigen::VectorXd > | v, |
| const Eigen::Ref< const Eigen::VectorXd > & | lower_tolerance, | ||
| const Eigen::Ref< const Eigen::VectorXd > & | upper_tolerance ) |
Apply a per-component dead-band tolerance to an error vector in place.
Each component is clamped to zero inside [lower(i), upper(i)], shifted by v(i) - lower(i) below the band, and v(i) - upper(i) above. The function is a no-op only when both lower_tolerance and upper_tolerance are empty. When non-empty, both tolerance vectors must match v in size; otherwise std::runtime_error is thrown. A non-empty paired with an empty tolerance is treated as a size mismatch and throws.
| v | The vector to clamp in place |
| lower_tolerance | Per-component lower bound (size must equal v.size(), or empty when paired with an empty upper_tolerance for a no-op) |
| upper_tolerance | Per-component upper bound (same size constraints as lower_tolerance) |
| Eigen::Vector4d tesseract::common::computeRandomColor | ( | ) |
This computes a random color RGBA [0, 1] with alpha set to 1.
| 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 |
| std::string tesseract::common::getTempPath | ( | ) |
Get the host temp directory path.
| 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 |
| 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. |
| void tesseract::common::ltrim | ( | std::string & | s | ) |
Left trim string.
| s | The string to left trim |
| void tesseract::common::rtrim | ( | std::string & | s | ) |
Right trim string.
| s | The string to right trim |
| void tesseract::common::trim | ( | std::string & | s | ) |
Trim left and right of string.
| s | The string to trim |
| 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 |
| 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::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::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 |
| 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 |
| std::string tesseract::common::getTimestampString | ( | ) |
Get Timestamp string.
| 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 |
| int 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 |
| int 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 |
| int 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 |
| int 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 |
| 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 |
| int 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 |
| int 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 |
| int 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 |
| 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. |
| 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 | ( | 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. |
|
noexcept |
Test whether two isometries are equal up to numerical noise.
Translation: ||ta - tb|| <= max(trans_atol, trans_rtol * max(||ta||, ||tb||)) Rotation: angle(Ra^T Rb) <= rot_tol (via ||Ra - Rb||_F^2 = 8 sin^2(theta/2) ~ 2 theta^2, relative error theta^2/12)
Frame-invariant, symmetric in a/b, well-defined at the origin, sqrt-free. Any NaN yields false. Requires linear() of both inputs to be a proper rotation (checked in debug builds; a non-finite linear part is left to the NaN path). Defaults are tuned for double at robot-cell scale; float callers should pass their own.
| 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 |
| void tesseract::common::removeDuplicates | ( | std::vector< T > & | v | ) |
Remove duplicates and keep first.
| v | The vector to remove duplicates from |
| std::vector< LinkId > tesseract::common::getAllowedCollisions | ( | const std::vector< LinkId > & | link_ids, |
| const AllowedCollisionEntries & | acm_entries, | ||
| bool | remove_duplicates = true ) |
Gets allowed collisions for a set of link ids.
| link_ids | Vector of LinkIds 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 |
| To tesseract::common::numeric_cast | ( | From | value | ) |
Safely cast a number from one type to another, checking for overflow and underflow.
| To | The target type |
| From | The source type |
| value | The value to cast |
| std::underflow_error | if casting a negative signed value to an unsigned type |
| std::overflow_error | if the value is out of the target type's range |
| void tesseract::common::processYamlIncludeDirective | ( | YAML::Node & | node, |
| const ResourceLocator & | locator ) |
Recursively expands !include directives in a YAML node, in-place.
This function walks the given node and:
After this call returns, node and its entire subtree will have had all !include directives resolved and removed. Subsequent calls on the same expanded tree are no-ops.
| node | The YAML node to process. Must be non-const so it can be mutated in-place as includes are expanded. |
| locator | The locator used to resolve file paths or URLs for !include directives. May maintain internal state (e.g. cache) between calls. |
| std::runtime_error | if an !include tag is not a scalar string, or if the specified file cannot be located or loaded. |
| YAML::Node tesseract::common::loadYamlFile | ( | const std::string & | file_path, |
| const ResourceLocator & | locator ) |
Loads a YAML file and processes !include directives recursively.
This function loads a YAML file and replaces any node tagged with !include with the content of the specified file. It handles nested !include directives and works with both maps and sequences.
| file_path | The path to the YAML file/url to be loaded. |
| locator | The locator used to resolve urls and relative file paths. |
| std::runtime_error | if an !include tag is used improperly (e.g., not scalar), or if a file specified in an !include directive cannot be loaded. |
| void tesseract::common::writeYamlToFile | ( | const YAML::Node & | node, |
| const std::string & | file_path ) |
Writes a YAML::Node to a file.
| node | The YAML::Node to write. |
| file_path | The path to the output file. |
| std::runtime_error | if the file cannot be opened. |
| void tesseract::common::checkForUnknownKeys | ( | const YAML::Node & | node, |
| const std::set< std::string > & | expected_keys ) |
Check node map for unknown keys.
| node | The node to check |
| expected_keys | The expected keys |
| std::string tesseract::common::toYAMLString | ( | const YAML::Node & | node | ) |
Converts a YAML::Node to a yaml string.
| node | Input node |
| YAML::Node tesseract::common::fromYAMLString | ( | const std::string & | string | ) |
Converts yaml string to a YAML::Node.
| string | Input string containing the yaml |
| bool tesseract::common::compareYAML | ( | const YAML::Node & | node1, |
| const YAML::Node & | node2 ) |
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 |
|
inlinethread_local |
Random number generator, one independently seeded instance per thread.
Seeding affects only the calling thread. On Windows each DLL additionally gets its own instance, so a seed set in one module does not reach draws made in another.