Tesseract Scene Graph Package

Background

This package contains the scene graph and parsers. The scene graph is used to manage the connectivity of the environment. The scene graph inherits from boost graph so you are able to leverage boost graph utilities for searching.

Scene Graph (Tree)

Scene Graph (Tree)

Scene Graph (Acyclic)

Scene Graph (Acyclic)

Features

  1. Links - Get, Add, Remove, Modify, Show/Hide, and Enable/Disable Collision
  2. Joints - Get, Add, Remove, Move and Modify
  3. Allowed Collision Matrix - Get, Add, Remove
  4. Graph Functions
    • Get Inbound/Outbound Joints for Link
    • Check if acyclic
    • Check if tree
    • Get Adjacent/InvAdjacent Links for Joint
  5. Utility Functions
    • Save to Graph to Graph Description Language (DOT)
    • Get shortest path between two Links
  6. Parsers
    • URDF Parser
    • SRDF Parser
    • KDL Parser
    • Mesh Parser

Building A Scene Graph

Example Explanation

Create Scene Graph

Add Joints

Create the joints. The links are able to be configured see Joint documentation.

Add the joints to the scene graph_acyclic_tree_example

Inspect Scene Graph

Get the adjacent links for link_3 and print to terminal

Get the inverse adjacent links for link_3 and print to terminal

Get child link names for link link_3 and print to terminal

Get child link names for joint joint_1 and print to terminal

Save the graph to a file for visualization

Test if the graph is Acyclic and print to terminal

Test if the graph is a tree and print to terminal

Create Acyclic Graph

Add joint connecting link_5 and link_4 to create an Acyclic graph_acyclic_tree_example

../_images/tesseract_scene_graph_graph.png

Save the Acyclic graph

Test to confirm it is acyclic, should return true.

Test if it is a tree, should return false.

Get Shortest Path

Create Scene Graph from URDF

Example Explanation

Create Resource Locator

Because this is ROS agnostic you need to provide a resource locator for interpreting package:/.

Load URDF

Get the file path to the urdf file

Create scene graph from urdf

Print information about the scene graph to the terminal

Save the graph to a file.

Parse SRDF adding Allowed Collision Matrix to Graph

Example Explanation

Create Resource Locator

Because this is ROS agnostic you need to provide a resource locator for interpreting package:/.

Load URDF and SRDF

Get the file path to the URDF and SRDF file

Create Scene Graph from URDF

Parse SRDF

Add Allowed Collision Matrix to Scene Graph

Methods for getting Allowed Collision Matrix from Scene Graph

Parse Mesh from file

Example Explanation

Parse Mesh from File

Mesh files can contain multiple meshes. This is a critical difference between MoveIt which merges all shapes in to a single triangle list for collision checking. By keeping each mesh independent, each will have its own bounding box and if you want to convert to a convex hull you will get a closer representation of the geometry.