![]() |
Tesseract 0.28.4
|

Public Member Functions | |
| SceneGraph (const std::string &name="") | |
| SceneGraph (const SceneGraph &other)=delete | |
| SceneGraph & | operator= (const SceneGraph &other)=delete |
| SceneGraph (SceneGraph &&other) noexcept | |
| SceneGraph & | operator= (SceneGraph &&other) noexcept |
| SceneGraph::UPtr | clone () const |
| Clone the scene graph. | |
| void | clear () |
| Clear the scene graph. | |
| void | setName (const std::string &name) |
| Sets the graph name. | |
| const std::string & | getName () const |
| Sets the graph name. | |
| bool | setRoot (const common::LinkId &id) |
| Sets the root link name (aka. World Coordinate Frame). | |
| const common::LinkId & | getRoot () const |
| Gets the root link name (aka. World Coordinate Frame). | |
| bool | addLink (const Link &link, bool replace_allowed=false) |
| Adds a link to the graph. | |
| bool | addLink (const Link &link, const Joint &joint) |
| Adds a link/joint to the graph. | |
| std::shared_ptr< const Link > | getLink (const common::LinkId &id) const |
| Get a link in the graph. | |
| std::vector< std::shared_ptr< const Link > > | getLinks () const |
| Get a vector links in the scene graph. | |
| std::vector< std::shared_ptr< const Link > > | getLeafLinks () const |
| Get a vector leaf links in the scene graph. | |
| bool | removeLink (const common::LinkId &id, bool recursive=false) |
| Removes a link from the graph. | |
| bool | moveLink (const Joint &joint) |
| Move link defined by provided joint This deletes all inbound joints on the parent link defined by the joint. | |
| void | setLinkVisibility (const common::LinkId &id, bool visibility) |
| Set a links visibility. | |
| bool | getLinkVisibility (const common::LinkId &id) const |
| Get a given links visibility setting. | |
| void | setLinkCollisionEnabled (const common::LinkId &id, bool enabled) |
| Set whether a link should be considered during collision checking. | |
| bool | getLinkCollisionEnabled (const common::LinkId &id) const |
| Get whether a link should be considered during collision checking. | |
| bool | addJoint (const Joint &joint) |
| Adds joint to the graph. | |
| std::shared_ptr< const Joint > | getJoint (const common::JointId &id) const |
| Get a joint in the graph. | |
| bool | removeJoint (const common::JointId &id, bool recursive=false) |
| Removes a joint from the graph. | |
| bool | moveJoint (const common::JointId &id, const common::LinkId &parent_link_id) |
| Move joint to new parent link. | |
| std::vector< std::shared_ptr< const Joint > > | getJoints () const |
| Get a vector of joints in the scene graph. | |
| std::vector< std::shared_ptr< const Joint > > | getActiveJoints () const |
| Get a vector of active joints in the scene graph. | |
| bool | changeJointOrigin (const common::JointId &id, const Eigen::Isometry3d &new_origin) |
| Changes the "origin" transform of the joint and recomputes the associated edge. | |
| bool | changeJointLimits (const common::JointId &id, const JointLimits &limits) |
| Changes the limits of a joint. The JointLimits::Ptr remains the same, but the values passed in are assigned. | |
| bool | changeJointPositionLimits (const common::JointId &id, double lower, double upper) |
| Changes the position limits associated with a joint. | |
| bool | changeJointVelocityLimits (const common::JointId &id, double limit) |
| Changes the velocity limits associated with a joint. | |
| bool | changeJointAccelerationLimits (const common::JointId &id, double limit) |
| Changes the acceleration limits associated with a joint. | |
| bool | changeJointJerkLimits (const common::JointId &id, double limit) |
| Changes the jerk limits associated with a joint. | |
| std::shared_ptr< const JointLimits > | getJointLimits (const common::JointId &id) |
| Gets the limits of the joint specified by name. | |
| void | setAllowedCollisionMatrix (std::shared_ptr< tesseract::common::AllowedCollisionMatrix > acm) |
| Set the allowed collision matrix. | |
| void | addAllowedCollision (const common::LinkId &link_id1, const common::LinkId &link_id2, const std::string &reason) |
| Disable collision between two collision objects. | |
| void | addAllowedCollision (const tesseract::common::LinkIdPair &pair, const std::string &reason) |
| Add allowed collision for a canonically ordered link-id pair. | |
| void | removeAllowedCollision (const common::LinkId &link_id1, const common::LinkId &link_id2) |
| Remove disabled collision pair from allowed collision matrix. | |
| void | removeAllowedCollision (const tesseract::common::LinkIdPair &pair) |
| Remove disabled collision pair using a pre-built canonical pair. | |
| void | removeAllowedCollision (const common::LinkId &link_id) |
| Remove disabled collision for any pair with link_name from allowed collision matrix. | |
| void | clearAllowedCollisions () |
| Remove all allowed collisions. | |
| bool | isCollisionAllowed (const tesseract::common::LinkIdPair &pair) const |
| Check if a link pair is allowed to be in collision. | |
| std::shared_ptr< const tesseract::common::AllowedCollisionMatrix > | getAllowedCollisionMatrix () const |
| Get the allowed collision matrix. | |
| std::shared_ptr< tesseract::common::AllowedCollisionMatrix > | getAllowedCollisionMatrix () |
| Get the allowed collision matrix. | |
| std::shared_ptr< const Link > | getSourceLink (const common::JointId &id) const |
| Get the source link (parent link) for a joint. | |
| std::shared_ptr< const Link > | getTargetLink (const common::JointId &id) const |
| Get the target link (child link) for a joint. | |
| std::vector< std::shared_ptr< const Joint > > | getInboundJoints (const common::LinkId &id) const |
| Get inbound joints for a link. | |
| std::vector< std::shared_ptr< const Joint > > | getOutboundJoints (const common::LinkId &id) const |
| Get outbound joints for a link. | |
| bool | isAcyclic () const |
| Determine if the graph contains cycles. | |
| bool | isTree () const |
| Determine if the graph is a tree. | |
| bool | isEmpty () const |
| Check if the graph is empty. | |
| std::vector< common::LinkId > | getAdjacentLinkIds (const common::LinkId &id) const |
| Get a vector of adjacent link ids provided a link name. | |
| std::vector< common::LinkId > | getInvAdjacentLinkIds (const common::LinkId &id) const |
| Geta a vector of inverse adjacent link ids provided a link id. | |
| std::vector< common::LinkId > | getLinkChildrenIds (const common::LinkId &id) const |
| Get all children for a given link id. | |
| std::vector< common::LinkId > | getJointChildrenIds (const common::JointId &id) const |
| Get all children link ids for a given joint id. | |
| std::unordered_map< common::LinkId, common::LinkId > | getAdjacencyMap (const std::vector< common::LinkId > &link_ids) const |
| Create mapping between links in the scene to the provided links if they are directly affected if the link moves. | |
| std::vector< common::LinkId > | getJointChildrenIds (const std::vector< common::JointId > &ids) const |
| Get all children link ids for the given joint ids. | |
| void | saveDOT (const std::string &path) const |
| Saves Graph as Graph Description Language (DOT). | |
| ShortestPath | getShortestPath (const common::LinkId &root, const common::LinkId &tip) const |
| Get the shortest path between two links. | |
| Vertex | getVertex (const common::LinkId &id) const |
| Get the graph vertex by name or ID. | |
| Edge | getEdge (const common::JointId &id) const |
| Get the graph edge by joint ID. | |
| bool | insertSceneGraph (const tesseract::scene_graph::SceneGraph &scene_graph, const std::string &prefix="") |
| Merge a graph into the current graph. | |
| bool | insertSceneGraph (const tesseract::scene_graph::SceneGraph &scene_graph, const tesseract::scene_graph::Joint &joint, const std::string &prefix="") |
| Merge a graph into the current environment. | |
| bool | operator== (const SceneGraph &rhs) const |
| bool | operator!= (const SceneGraph &rhs) const |
Protected Member Functions | |
| bool | addLinkHelper (const std::shared_ptr< Link > &link_ptr, bool replace_allowed=false) |
| Adds a link to the graph. | |
| bool | addJointHelper (const std::shared_ptr< Joint > &joint_ptr) |
| Adds joint to the graph. | |
Friends | |
| template<class Archive> | |
| friend | void::tesseract::scene_graph::serialize (Archive &ar, SceneGraph &obj) |
| SceneGraph::UPtr tesseract::scene_graph::SceneGraph::clone | ( | ) | const |
Clone the scene graph.
| void tesseract::scene_graph::SceneGraph::setName | ( | const std::string & | name | ) |
Sets the graph name.
| name | The name of the graph |
| const std::string & tesseract::scene_graph::SceneGraph::getName | ( | ) | const |
Sets the graph name.
| name | The name of the graph |
| bool tesseract::scene_graph::SceneGraph::setRoot | ( | const common::LinkId & | id | ) |
Sets the root link name (aka. World Coordinate Frame).
| name | The name of the link |
| const common::LinkId & tesseract::scene_graph::SceneGraph::getRoot | ( | ) | const |
Gets the root link name (aka. World Coordinate Frame).
| bool tesseract::scene_graph::SceneGraph::addLink | ( | const Link & | link, |
| bool | replace_allowed = false ) |
Adds a link to the graph.
The first link added to the graph is set as the root by default. Use setRoot to change the root link of the graph.
| link | The link to be added to the graph |
| replace_allowed | If true and the link exist it will be replaced |
Adds a link/joint to the graph.
The first link added to the graph is set as the root by default. Use setRoot to change the root link of the graph.
| link | The link to be added to the graph |
| joint | The associated joint to be added to the graph |
| std::shared_ptr< const Link > tesseract::scene_graph::SceneGraph::getLink | ( | const common::LinkId & | id | ) | const |
Get a link in the graph.
| name | The name of the link |
| std::vector< std::shared_ptr< const Link > > tesseract::scene_graph::SceneGraph::getLinks | ( | ) | const |
Get a vector links in the scene graph.
| std::vector< std::shared_ptr< const Link > > tesseract::scene_graph::SceneGraph::getLeafLinks | ( | ) | const |
Get a vector leaf links in the scene graph.
| bool tesseract::scene_graph::SceneGraph::removeLink | ( | const common::LinkId & | id, |
| bool | recursive = false ) |
Removes a link from the graph.
Note: this will remove all inbound and outbound edges
| name | Name of the link to be removed |
| recursive | If true all children are removed if it only has a single joint |
| bool tesseract::scene_graph::SceneGraph::moveLink | ( | const Joint & | joint | ) |
Move link defined by provided joint This deletes all inbound joints on the parent link defined by the joint.
| joint | The joint defining the link move |
| void tesseract::scene_graph::SceneGraph::setLinkVisibility | ( | const common::LinkId & | id, |
| bool | visibility ) |
Set a links visibility.
| visibility | True if should be visible, otherwise false |
| bool tesseract::scene_graph::SceneGraph::getLinkVisibility | ( | const common::LinkId & | id | ) | const |
Get a given links visibility setting.
| void tesseract::scene_graph::SceneGraph::setLinkCollisionEnabled | ( | const common::LinkId & | id, |
| bool | enabled ) |
Set whether a link should be considered during collision checking.
| enabled | True if should be considered during collision checking, otherwise false |
| bool tesseract::scene_graph::SceneGraph::getLinkCollisionEnabled | ( | const common::LinkId & | id | ) | const |
Get whether a link should be considered during collision checking.
| bool tesseract::scene_graph::SceneGraph::addJoint | ( | const Joint & | joint | ) |
Adds joint to the graph.
| joint | The joint to be added |
| std::shared_ptr< const Joint > tesseract::scene_graph::SceneGraph::getJoint | ( | const common::JointId & | id | ) | const |
Get a joint in the graph.
| name | The name of the joint |
| bool tesseract::scene_graph::SceneGraph::removeJoint | ( | const common::JointId & | id, |
| bool | recursive = false ) |
Removes a joint from the graph.
| name | Name of the joint to be removed |
| recursive | If true all children are removed if this this is the only joint of the child link |
| bool tesseract::scene_graph::SceneGraph::moveJoint | ( | const common::JointId & | id, |
| const common::LinkId & | parent_link_id ) |
Move joint to new parent link.
| name | Name of the joint to move |
| parent_link | Name of parent link to move to |
| std::vector< std::shared_ptr< const Joint > > tesseract::scene_graph::SceneGraph::getJoints | ( | ) | const |
Get a vector of joints in the scene graph.
| std::vector< std::shared_ptr< const Joint > > tesseract::scene_graph::SceneGraph::getActiveJoints | ( | ) | const |
Get a vector of active joints in the scene graph.
| bool tesseract::scene_graph::SceneGraph::changeJointOrigin | ( | const common::JointId & | id, |
| const Eigen::Isometry3d & | new_origin ) |
Changes the "origin" transform of the joint and recomputes the associated edge.
| name | Name of the joint to be changed |
| new_origin | The new transform associated with the joint |
| bool tesseract::scene_graph::SceneGraph::changeJointLimits | ( | const common::JointId & | id, |
| const JointLimits & | limits ) |
Changes the limits of a joint. The JointLimits::Ptr remains the same, but the values passed in are assigned.
| name | Name of the joint to be changed |
| limits | The new limits associated with the joint |
| bool tesseract::scene_graph::SceneGraph::changeJointPositionLimits | ( | const common::JointId & | id, |
| double | lower, | ||
| double | upper ) |
Changes the position limits associated with a joint.
| joint_name | Name of the joint to be updated |
| limits | New position limits to be set as the joint limits @returnTrue if successful. |
| bool tesseract::scene_graph::SceneGraph::changeJointVelocityLimits | ( | const common::JointId & | id, |
| double | limit ) |
Changes the velocity limits associated with a joint.
| joint_name | Name of the joint to be updated |
| limits | New velocity limits to be set as the joint limits |
| bool tesseract::scene_graph::SceneGraph::changeJointAccelerationLimits | ( | const common::JointId & | id, |
| double | limit ) |
Changes the acceleration limits associated with a joint.
| joint_name | Name of the joint to be updated |
| limits | New acceleration limits to be set as the joint limits |
| bool tesseract::scene_graph::SceneGraph::changeJointJerkLimits | ( | const common::JointId & | id, |
| double | limit ) |
Changes the jerk limits associated with a joint.
| joint_name | Name of the joint to be updated |
| limits | New jerk limits to be set as the joint limits |
| std::shared_ptr< const JointLimits > tesseract::scene_graph::SceneGraph::getJointLimits | ( | const common::JointId & | id | ) |
Gets the limits of the joint specified by name.
| name | Name of the joint which limits will be retrieved |
| void tesseract::scene_graph::SceneGraph::setAllowedCollisionMatrix | ( | std::shared_ptr< tesseract::common::AllowedCollisionMatrix > | acm | ) |
Set the allowed collision matrix.
| acm | The allowed collision matrix to assign |
| void tesseract::scene_graph::SceneGraph::addAllowedCollision | ( | const common::LinkId & | link_id1, |
| const common::LinkId & | link_id2, | ||
| const std::string & | reason ) |
| void tesseract::scene_graph::SceneGraph::removeAllowedCollision | ( | const common::LinkId & | link_id1, |
| const common::LinkId & | link_id2 ) |
| void tesseract::scene_graph::SceneGraph::removeAllowedCollision | ( | const tesseract::common::LinkIdPair & | pair | ) |
Remove disabled collision pair using a pre-built canonical pair.
Forwarder to tesseract::common::AllowedCollisionMatrix::removeAllowedCollision(const LinkIdPair&). Useful when iterating an existing ACM and erasing by key without reconstructing LinkId objects from strings.
| pair | Canonically ordered link-id pair (the map key) |
| void tesseract::scene_graph::SceneGraph::removeAllowedCollision | ( | const common::LinkId & | link_id | ) |
Remove disabled collision for any pair with link_name from allowed collision matrix.
| link_name | Collision object name |
| bool tesseract::scene_graph::SceneGraph::isCollisionAllowed | ( | const tesseract::common::LinkIdPair & | pair | ) | const |
Check if a link pair is allowed to be in collision.
| pair | Canonically ordered link-id pair |
| std::shared_ptr< const tesseract::common::AllowedCollisionMatrix > tesseract::scene_graph::SceneGraph::getAllowedCollisionMatrix | ( | ) | const |
Get the allowed collision matrix.
| std::shared_ptr< tesseract::common::AllowedCollisionMatrix > tesseract::scene_graph::SceneGraph::getAllowedCollisionMatrix | ( | ) |
Get the allowed collision matrix.
| std::shared_ptr< const Link > tesseract::scene_graph::SceneGraph::getSourceLink | ( | const common::JointId & | id | ) | const |
Get the source link (parent link) for a joint.
| id | The joint ID |
| std::shared_ptr< const Link > tesseract::scene_graph::SceneGraph::getTargetLink | ( | const common::JointId & | id | ) | const |
Get the target link (child link) for a joint.
| joint_name | The name of the joint |
| std::vector< std::shared_ptr< const Joint > > tesseract::scene_graph::SceneGraph::getInboundJoints | ( | const common::LinkId & | id | ) | const |
Get inbound joints for a link.
The inbound joints are all joints that have the link identified as the child link
| link_name | The name of the link |
| std::vector< std::shared_ptr< const Joint > > tesseract::scene_graph::SceneGraph::getOutboundJoints | ( | const common::LinkId & | id | ) | const |
Get outbound joints for a link.
The outbound joints are all joins that have the link identified as the parent link
| id | The link ID |
| bool tesseract::scene_graph::SceneGraph::isAcyclic | ( | ) | const |
Determine if the graph contains cycles.
| bool tesseract::scene_graph::SceneGraph::isTree | ( | ) | const |
Determine if the graph is a tree.
| bool tesseract::scene_graph::SceneGraph::isEmpty | ( | ) | const |
Check if the graph is empty.
| std::vector< LinkId > tesseract::scene_graph::SceneGraph::getAdjacentLinkIds | ( | const common::LinkId & | id | ) | const |
Get a vector of adjacent link ids provided a link name.
| id | Id of link |
| std::vector< LinkId > tesseract::scene_graph::SceneGraph::getInvAdjacentLinkIds | ( | const common::LinkId & | id | ) | const |
Geta a vector of inverse adjacent link ids provided a link id.
| id |
| std::vector< LinkId > tesseract::scene_graph::SceneGraph::getLinkChildrenIds | ( | const common::LinkId & | id | ) | const |
| std::vector< LinkId > tesseract::scene_graph::SceneGraph::getJointChildrenIds | ( | const common::JointId & | id | ) | const |
Get all children link ids for a given joint id.
| id | Id of joint |
| std::unordered_map< LinkId, LinkId > tesseract::scene_graph::SceneGraph::getAdjacencyMap | ( | const std::vector< common::LinkId > & | link_ids | ) | const |
Create mapping between links in the scene to the provided links if they are directly affected if the link moves.
| link_names | The links to map other links to |
| std::vector< common::LinkId > tesseract::scene_graph::SceneGraph::getJointChildrenIds | ( | const std::vector< common::JointId > & | ids | ) | const |
Get all children link ids for the given joint ids.
| ids | Ids of joints |
| void tesseract::scene_graph::SceneGraph::saveDOT | ( | const std::string & | path | ) | const |
Saves Graph as Graph Description Language (DOT).
| path | The file path |
| ShortestPath tesseract::scene_graph::SceneGraph::getShortestPath | ( | const common::LinkId & | root, |
| const common::LinkId & | tip ) const |
Get the shortest path between two links.
| root | The base link |
| tip | The tip link |
| SceneGraph::Vertex tesseract::scene_graph::SceneGraph::getVertex | ( | const common::LinkId & | id | ) | const |
Get the graph vertex by name or ID.
| name | The vertex/link name |
| SceneGraph::Edge tesseract::scene_graph::SceneGraph::getEdge | ( | const common::JointId & | id | ) | const |
Get the graph edge by joint ID.
| id | The edge/joint ID |
| bool tesseract::scene_graph::SceneGraph::insertSceneGraph | ( | const tesseract::scene_graph::SceneGraph & | scene_graph, |
| const std::string & | prefix = "" ) |
Merge a graph into the current graph.
| scene_graph | Const ref to the graph to be merged (said graph will be copied) |
| prefix | string Will prepend to every link and joint of the merged graph |
| bool tesseract::scene_graph::SceneGraph::insertSceneGraph | ( | const tesseract::scene_graph::SceneGraph & | scene_graph, |
| const tesseract::scene_graph::Joint & | joint, | ||
| const std::string & | prefix = "" ) |
Merge a graph into the current environment.
| scene_graph | Const ref to the graph to be merged (said graph will be copied) |
| joint | The joint that connects current environment with the inserted graph |
| prefix | string Will prepend to every link and joint of the merged graph |
|
protected |
Adds a link to the graph.
The first link added to the graph is set as the root by default. Use setRoot to change the root link of the graph.
| link_ptr | Shared pointer to the link to be added to the graph |
| replace_allowed | If true and the link exist it will be replaced |
|
protected |
Adds joint to the graph.
| joint_ptr | Shared pointer to the joint to be added |