![]() |
Tesseract 0.28.4
|
Tesseract supports primitive shapes, meshes, convex hulls, signed distance fields, and octrees for collision and visualization.
The tesseract_geometry package provides the geometry types used throughout Tesseract for both visualization and collision checking. Each geometry type can be attached to links in the scene graph and is used by the collision system.
Tesseract provides a comprehensive set of geometry types:
Analytically-defined shapes with exact representations:
| Shape | Description | Parameters |
|---|---|---|
| Box | Axis-aligned rectangular prism | width (x), height (y), depth (z) |
| Sphere | Perfect sphere | radius |
| Cylinder | Circular cylinder | radius, length |
| Cone | Circular cone | radius, length |
| Capsule | Cylinder with hemispherical end caps | radius, length |
| Plane | Infinite half-space | normal (a, b, c), offset (d) |
A volumetric, implicit geometry: the signed distance to a surface (negative inside). It is stored in a backend-neutral form, either sampled on a regular axis-aligned grid over a local-frame domain, or sparse: a NanoVDB grid that holds only the voxels near the surface. Collision backends query the field in place through its distance and gradient; nothing is copied into a backend-specific representation. It enables true concave volumetric contact and signed-distance/gradient queries, and is the canonical way to use a distance field. Create one in-process from any distance function (analytic, sensor-fused, or a sampler wrapping another library such as OpenVDB), sample a function onto a grid up front with the discrete factory, or load a serialized VDB FloatGrid or NanoVDB file. VDB import currently accepts one FloatGrid with an axis-aligned, uniform transform.
A sparse field is one grid of a NanoVDB file (by name when the file holds several), read in place with its band clamp: the distance at which its values saturate. Where it has no data, or reads at or past the clamp outside the surface, it has no answer (+infinity), so several fields on a link (for example level sets of different objects stored in one file) combine as any geometries do: the nearest answers. In a level set (NanoVDB grid class LevelSet) inactive voxels hold the background and count as data; in any other grid every voxel a read uses must be active.
Grids of one surface at different resolutions can instead be stacked as levels, explicitly: a multi-level field takes sparse fields finest first and answers from the first that can, a finer level giving way at its band clamp to a coarser one with real range. A fine grid cropped around a region of interest over a coarse grid of the whole object then costs fine voxels only where they are needed. Levels must describe the same surface; separate objects belong in separate fields. In URDF, level children of the element select each level's grid (by grid name or index) and band clamp.
Note: A field built from a distance function calls that function at every collision query. For an expensive function (for example, distance to a mesh), sample it onto a grid up front with the discrete factory.
Note: The Bullet and FCL discrete collision backends consume a Signed Distance Field. It is concave, so it is not supported by the continuous/cast managers. This is distinct from the Gazebo "SDF" Simulation Description Format.
Volumetric representation using an octree data structure. Useful for representing point cloud data (e.g., from depth cameras) as collision geometry.
Octree cells can be represented as different shapes:
Tip: Prune the octree before creating the Tesseract octree shape to simplify the collision geometry.
See the Creating Geometries Example for complete code demonstrating how to create each geometry type programmatically.
For loading meshes from files, see the mesh parsing utilities in the scene_graph package.
Geometry objects are assigned to links through Visual and Collision elements:
A key difference from MoveIt is how mesh files with multiple shapes are handled:
This is particularly important for complex parts where a single convex hull would be a poor approximation, but multiple convex hulls (one per sub-mesh) provide much better coverage.