Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::srdf Namespace Reference

Main namespace. More...

Classes

struct  KinematicsInformation
 This hold the kinematics information used to create the SRDF and is the data container for the manipulator manager. More...
class  SRDFModel
 Representation of semantic information about the robot. More...

Typedefs

using GroupsJointState = std::unordered_map<tesseract::common::JointId, double>
using GroupsJointStates = std::unordered_map<std::string, GroupsJointState>
using GroupJointStates = std::unordered_map<std::string, GroupsJointStates>
using GroupsTCPs = tesseract::common::LinkIdTransformMap
using GroupTCPs = tesseract::common::AlignedUnorderedMap<std::string, GroupsTCPs>
using ChainGroup = std::vector<std::pair<tesseract::common::LinkId, tesseract::common::LinkId>>
using ChainGroups = std::unordered_map<std::string, ChainGroup>
using JointGroup = std::vector<tesseract::common::JointId>
using JointGroups = std::unordered_map<std::string, JointGroup>
using LinkGroup = std::vector<tesseract::common::LinkId>
using LinkGroups = std::unordered_map<std::string, LinkGroup>
using GroupNames = std::set<std::string>

Functions

template<class Archive>
void serialize (Archive &ar, KinematicsInformation &obj)
template<class Archive>
void serialize (Archive &ar, SRDFModel &obj)
std::shared_ptr< tesseract::common::CollisionMarginData > parseCollisionMargins (const tesseract::scene_graph::SceneGraph &scene_graph, const tinyxml2::XMLElement *srdf_xml, const std::array< int, 3 > &version)
 Parse allowed collisions from srdf xml element.
std::filesystem::path parseConfigFilePath (const tesseract::common::ResourceLocator &locator, const tinyxml2::XMLElement *xml_element, const std::array< int, 3 > &version)
 Parse a config xml element.
tesseract::common::CalibrationInfo parseCalibrationConfig (const tesseract::scene_graph::SceneGraph &scene_graph, const tesseract::common::ResourceLocator &locator, const tinyxml2::XMLElement *xml_element, const std::array< int, 3 > &version)
 Parse calibration config xml element.
tesseract::common::CalibrationInfo parseCalibrationConfig (const tesseract::scene_graph::SceneGraph &scene_graph, const tesseract::common::ResourceLocator &locator, const YAML::Node &config)
 Parse calibration config from yaml.
tesseract::common::CalibrationInfo parseCalibrationConfig (const tesseract::scene_graph::SceneGraph &scene_graph, const tesseract::common::ResourceLocator &locator, const std::string &config)
 Parse calibration config from yaml string.
tesseract::common::KinematicsPluginInfo parseKinematicsPluginConfig (const tesseract::common::ResourceLocator &locator, const tinyxml2::XMLElement *xml_element, const std::array< int, 3 > &version)
 Parse kinematics plugin config xml element.
tesseract::common::KinematicsPluginInfo parseKinematicsPluginConfig (const tesseract::common::ResourceLocator &locator, const YAML::Node &config)
 Parse kinematics plugin config yaml node.
tesseract::common::KinematicsPluginInfo parseKinematicsPluginConfig (const tesseract::common::ResourceLocator &locator, const std::string &config)
 Parse kinematics plugin config yaml string.
tesseract::common::ContactManagersPluginInfo parseContactManagersPluginConfig (const tesseract::common::ResourceLocator &locator, const tinyxml2::XMLElement *xml_element, const std::array< int, 3 > &version)
 Parse contact managers plugin config xml element.
tesseract::common::ContactManagersPluginInfo parseContactManagersPluginConfig (const tesseract::common::ResourceLocator &locator, const YAML::Node &config)
 Parse contact managers plugin config yaml node.
tesseract::common::ContactManagersPluginInfo parseContactManagersPluginConfig (const tesseract::common::ResourceLocator &locator, const std::string &config)
 Parse contact managers plugin config yaml string.
tesseract::common::AllowedCollisionMatrix parseDisabledCollisions (const tesseract::scene_graph::SceneGraph &scene_graph, const tinyxml2::XMLElement *srdf_xml, const std::array< int, 3 > &version)
 Parse allowed collisions from srdf xml element.
GroupJointStates parseGroupStates (const tesseract::scene_graph::SceneGraph &scene_graph, const GroupNames &group_names, const tinyxml2::XMLElement *srdf_xml, const std::array< int, 3 > &version)
 Parse groups states from srdf xml element.
GroupTCPs parseGroupTCPs (const tesseract::scene_graph::SceneGraph &scene_graph, const tinyxml2::XMLElement *srdf_xml, const std::array< int, 3 > &version)
 Parse groups tool center points from srdf xml element.
std::tuple< GroupNames, ChainGroups, JointGroups, LinkGroups > parseGroups (const tesseract::scene_graph::SceneGraph &scene_graph, const tinyxml2::XMLElement *srdf_xml, const std::array< int, 3 > &version)
 Parse groups from srdf xml element.
void processSRDFAllowedCollisions (tesseract::scene_graph::SceneGraph &scene_graph, const SRDFModel &srdf_model)
 Add allowed collisions to the scene graph.
bool compareLinkPairAlphabetically (std::reference_wrapper< const tesseract::common::LinkIdPair > pair1, std::reference_wrapper< const tesseract::common::LinkIdPair > pair2)
 Used to sort a pair of link ids alphabetically by name - first by the alphabetically smaller name of each pair and then by the larger.
std::vector< std::reference_wrapper< const tesseract::common::LinkIdPair > > getAlphabeticalACMKeys (const tesseract::common::AllowedCollisionEntries &allowed_collision_entries)
 Returns an alphabetically sorted vector of ACM keys (the link pairs).

Detailed Description

Main namespace.

Function Documentation

◆ parseCollisionMargins()

tesseract::common::CollisionMarginData::Ptr tesseract::srdf::parseCollisionMargins ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tinyxml2::XMLElement * srdf_xml,
const std::array< int, 3 > & version )

Parse allowed collisions from srdf xml element.

Parameters
scene_graphThe tesseract scene graph
srdf_xmlThe xml element to parse
versionThe srdf version number
Returns
Allowed Collision Matrix

◆ parseConfigFilePath()

std::filesystem::path tesseract::srdf::parseConfigFilePath ( const tesseract::common::ResourceLocator & locator,
const tinyxml2::XMLElement * xml_element,
const std::array< int, 3 > & version )

Parse a config xml element.

It expects the element to have the attribute 'filename'

Parameters
locatorThe locator used to process the file name URL
xml_elementThe xml element to process
versionThe SRDF version
Returns
The extracted file path

◆ parseCalibrationConfig() [1/3]

tesseract::common::CalibrationInfo tesseract::srdf::parseCalibrationConfig ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tesseract::common::ResourceLocator & locator,
const tinyxml2::XMLElement * xml_element,
const std::array< int, 3 > & version )

Parse calibration config xml element.

Parameters
scene_graphThe scene graph
locatorThe locator used to process the file name URL
xml_elementThe xml element to process
versionThe SRDF version
Returns
The calibration information

◆ parseCalibrationConfig() [2/3]

tesseract::common::CalibrationInfo tesseract::srdf::parseCalibrationConfig ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tesseract::common::ResourceLocator & locator,
const YAML::Node & config )

Parse calibration config from yaml.

Parameters
scene_graphThe scene graph
locatorThe locator used to process the file name URL
configThe yaml node to process
Returns
The calibration information

◆ parseCalibrationConfig() [3/3]

tesseract::common::CalibrationInfo tesseract::srdf::parseCalibrationConfig ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tesseract::common::ResourceLocator & locator,
const std::string & config )

Parse calibration config from yaml string.

Parameters
scene_graphThe scene graph
locatorThe locator used to process the file name URL
configThe yaml config as a string
Returns
The calibration information

◆ parseKinematicsPluginConfig() [1/3]

tesseract::common::KinematicsPluginInfo tesseract::srdf::parseKinematicsPluginConfig ( const tesseract::common::ResourceLocator & locator,
const tinyxml2::XMLElement * xml_element,
const std::array< int, 3 > & version )

Parse kinematics plugin config xml element.

Parameters
locatorThe locator used to process the file name URL
xml_elementThe xml element to process
versionThe SRDF version
Returns
The kinematics plugin information

◆ parseKinematicsPluginConfig() [2/3]

tesseract::common::KinematicsPluginInfo tesseract::srdf::parseKinematicsPluginConfig ( const tesseract::common::ResourceLocator & locator,
const YAML::Node & config )

Parse kinematics plugin config yaml node.

Parameters
locatorThe locator used to process the file name URL
configThe yaml config node
Returns
The kinematics plugin information

◆ parseKinematicsPluginConfig() [3/3]

tesseract::common::KinematicsPluginInfo tesseract::srdf::parseKinematicsPluginConfig ( const tesseract::common::ResourceLocator & locator,
const std::string & config )

Parse kinematics plugin config yaml string.

Parameters
locatorThe locator used to process the file name URL
configThe yaml config as a string
Returns
The kinematics plugin information

◆ parseContactManagersPluginConfig() [1/3]

tesseract::common::ContactManagersPluginInfo tesseract::srdf::parseContactManagersPluginConfig ( const tesseract::common::ResourceLocator & locator,
const tinyxml2::XMLElement * xml_element,
const std::array< int, 3 > & version )

Parse contact managers plugin config xml element.

Parameters
locatorThe locator used to process the file name URL
xml_elementThe xml element to process
versionThe SRDF version
Returns
The contact managers plugin information

◆ parseContactManagersPluginConfig() [2/3]

tesseract::common::ContactManagersPluginInfo tesseract::srdf::parseContactManagersPluginConfig ( const tesseract::common::ResourceLocator & locator,
const YAML::Node & config )

Parse contact managers plugin config yaml node.

Parameters
locatorThe locator used to process the file name URL
configThe yaml config node
Returns
The contact managers plugin information

◆ parseContactManagersPluginConfig() [3/3]

tesseract::common::ContactManagersPluginInfo tesseract::srdf::parseContactManagersPluginConfig ( const tesseract::common::ResourceLocator & locator,
const std::string & config )

Parse contact managers plugin config yaml string.

Parameters
locatorThe locator used to process the file name URL
configThe yaml config string
Returns
The contact managers plugin information

◆ parseDisabledCollisions()

tesseract::common::AllowedCollisionMatrix tesseract::srdf::parseDisabledCollisions ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tinyxml2::XMLElement * srdf_xml,
const std::array< int, 3 > & version )

Parse allowed collisions from srdf xml element.

Parameters
scene_graphThe tesseract scene graph
srdf_xmlThe xml element to parse
versionThe srdf version number
Returns
Allowed Collision Matrix

◆ parseGroupStates()

GroupJointStates tesseract::srdf::parseGroupStates ( const tesseract::scene_graph::SceneGraph & scene_graph,
const GroupNames & group_names,
const tinyxml2::XMLElement * srdf_xml,
const std::array< int, 3 > & version )

Parse groups states from srdf xml element.

Parameters
scene_graphThe tesseract scene graph
srdf_xmlThe xml element to parse
versionThe srdf version number
Returns
Group states

◆ parseGroupTCPs()

GroupTCPs tesseract::srdf::parseGroupTCPs ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tinyxml2::XMLElement * srdf_xml,
const std::array< int, 3 > & version )

Parse groups tool center points from srdf xml element.

Parameters
scene_graphThe tesseract scene graph
srdf_xmlThe xml element to parse
versionThe srdf version number
Returns
Group Tool Center Points

◆ parseGroups()

std::tuple< GroupNames, ChainGroups, JointGroups, LinkGroups > tesseract::srdf::parseGroups ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tinyxml2::XMLElement * srdf_xml,
const std::array< int, 3 > & version )

Parse groups from srdf xml element.

Parameters
scene_graphThe tesseract scene graph
srdf_xmlThe xml element to parse
versionThe srdf version number
Returns
GroupNames, ChainGroups, JointGroups, LinkGroups

◆ processSRDFAllowedCollisions()

void tesseract::srdf::processSRDFAllowedCollisions ( tesseract::scene_graph::SceneGraph & scene_graph,
const SRDFModel & srdf_model )

Add allowed collisions to the scene graph.

Parameters
scene_graphThe scene graph to add allowed collisions data
srdf_modelThe srdf model to extract allowed collisions

◆ compareLinkPairAlphabetically()

bool tesseract::srdf::compareLinkPairAlphabetically ( std::reference_wrapper< const tesseract::common::LinkIdPair > pair1,
std::reference_wrapper< const tesseract::common::LinkIdPair > pair2 )

Used to sort a pair of link ids alphabetically by name - first by the alphabetically smaller name of each pair and then by the larger.

A LinkIdPair is canonically ordered by hash value, so neither name sits at a fixed position; each pair's smaller and larger name are selected here rather than read off first() and second() in order.

Parameters
pair1First pair of link ids
pair2Second pair of link ids
Returns
True if pair1 should go before pair2 (is closer to A)

◆ getAlphabeticalACMKeys()

std::vector< std::reference_wrapper< const tesseract::common::LinkIdPair > > tesseract::srdf::getAlphabeticalACMKeys ( const tesseract::common::AllowedCollisionEntries & allowed_collision_entries)

Returns an alphabetically sorted vector of ACM keys (the link pairs).

Parameters
allowed_collision_entriesEntries to be sorted
Returns
An alphabetically sorted vector of ACM keys (the link pairs)