Drake
drake::geometry Namespace Reference

Namespaces

 detail
 
 internal
 
 test
 

Classes

class  Box
 Definition of a box. More...
 
class  Convex
 Support for convex shapes. More...
 
class  Cylinder
 Definition of a cylinder. More...
 
class  FrameKinematicsVector
 A FrameKinematicsVector is used to report kinematics data for registered frames (identified by unique FrameId values) to SceneGraph. More...
 
class  GeometryContext
 The custom leaf context type for SceneGraph. More...
 
class  GeometryFrame
 This simple class carries the definition of a frame used in the SceneGraph. More...
 
class  GeometryInstance
 A geometry instance combines a geometry definition (i.e., a shape of some sort), a pose (relative to a parent "frame" P), material information, and an opaque collection of metadata. More...
 
class  GeometryProperties
 The base class for defining a set of geometry properties. More...
 
class  GeometrySet
 The GeometrySet, as its name implies, is a convenience class for defining a set of geometries. More...
 
class  GeometryState
 The context-dependent state of SceneGraph. More...
 
class  HalfSpace
 Definition of a half space. More...
 
class  Identifier
 A simple identifier class. More...
 
class  IllustrationProperties
 The set of properties for geometry used in an "illustration" role. More...
 
class  Mesh
 Limited support for meshes. More...
 
struct  PenetrationAsPointPair
 A characterization of the intersection of two penetrating geometries. More...
 
class  ProximityProperties
 The set of properties for geometry used in a proximity role. More...
 
class  QueryObject
 The QueryObject serves as a mechanism to perform geometry queries on the world's geometry. More...
 
class  SceneGraph
 SceneGraph serves as the nexus for all geometry (and geometry-based operations) in a Diagram. More...
 
class  SceneGraphInspector
 The SceneGraphInspector serves as a mechanism to query the topological structure of a SceneGraph instance. More...
 
class  Shape
 The base interface for all shape specifications. More...
 
class  ShapeReifier
 The interface for converting shape descriptions to real shapes. More...
 
struct  ShapeTag
 Simple struct for instantiating the type-specific Shape functionality. More...
 
struct  SignedDistancePair
 The data for reporting the signed distance between two geometries, A and B. More...
 
struct  SignedDistanceToPoint
 The data for reporting the signed distance from a query point to a geometry. More...
 
class  Sphere
 Definition of sphere. More...
 
class  VisualMaterial
 Definition of material for simple visualization. More...
 

Typedefs

template<typename T >
using FramePoseVector = FrameKinematicsVector< Isometry3< T > >
 Class for communicating pose information to SceneGraph for registered frames. More...
 
using SourceId = Identifier< class SourceTag >
 Type used to identify geometry sources in SceneGraph. More...
 
using FrameId = Identifier< class FrameTag >
 Type used to identify geometry frames in SceneGraph. More...
 
using GeometryId = Identifier< class GeometryTag >
 Type used to identify geometry instances in SceneGraph. More...
 
using ProximityIndex = TypeSafeIndex< class ProximityTag >
 Index used to identify a geometry in the proximity engine. More...
 
using GeometryIndex = TypeSafeIndex< class GeometryTag >
 Index into the ordered vector of all registered geometries (regardless of parent frame, role, etc.) More...
 
using FrameIndex = TypeSafeIndex< class GeometryTag >
 Index into the ordered vector of all registered frames – by convention, the world frame's index is always zero. More...
 
Structures for maintaining the entity relationships
using FrameIdSet = std::unordered_set< FrameId >
 Collection of unique frame ids. More...
 

Enumerations

enum  Role { kUnassigned = 0x0, kProximity = 0x1, kIllustration = 0x2 }
 General enumeration for indicating geometry role. More...
 

Functions

std::ostream & operator<< (std::ostream &out, const GeometryProperties &props)
 
template<class Key , class Findable >
void FindOrThrow (const Key &key, const Findable &source, const std::function< std::string()> &make_message)
 
template<class Key >
std::string get_missing_id_message (const Key &key)
 
template<class Key , class Value >
const ValueGetValueOrThrow (const Key &key, const std::unordered_map< Key, Value > &map)
 
template<class Key , class Value >
ValueGetMutableValueOrThrow (const Key &key, std::unordered_map< Key, Value > *map)
 
template<>
std::string get_missing_id_message< SourceId > (const SourceId &key)
 
template<>
std::string get_missing_id_message< FrameId > (const FrameId &key)
 
template<>
std::string get_missing_id_message< GeometryId > (const GeometryId &key)
 
void DispatchLoadMessage (const SceneGraph< double > &scene_graph, lcm::DrakeLcmInterface *lcm)
 (Advanced) Explicitly dispatches an LCM load message based on the registered geometry. More...
 
systems::lcm::LcmPublisherSystemConnectDrakeVisualizer (systems::DiagramBuilder< double > *builder, const SceneGraph< double > &scene_graph, const systems::OutputPort< double > &pose_bundle_output_port, lcm::DrakeLcmInterface *lcm=nullptr)
 Implements ConnectDrakeVisualizer, but using pose_bundle_output_port to explicitly specify the output port used to get pose bundles for scene_graph. More...
 
systems::lcm::LcmPublisherSystemConnectDrakeVisualizer (systems::DiagramBuilder< double > *builder, const SceneGraph< double > &scene_graph, lcm::DrakeLcmInterface *lcm=nullptr)
 Extends a Diagram with the required components to interface with drake_visualizer. More...
 
IllustrationProperties MakeDrakeVisualizerProperties (const Vector4< double > &diffuse)
 Constructs an IllustrationProperties instance compatible with the ConnectDrakeVisualizer incorporating the given diffuse color. More...
 
template<typename Tag >
std::string to_string (const drake::geometry::Identifier< Tag > &id)
 Enables use of identifiers with to_string. More...
 
Geometry role to string conversions

These are simply convenience functions for converting the Role enumeration into a human-readable string.

std::string to_string (const Role &role)
 
std::ostream & operator<< (std::ostream &out, const Role &role)
 

Typedef Documentation

◆ FrameId

using FrameId = Identifier<class FrameTag>

Type used to identify geometry frames in SceneGraph.

◆ FrameIdSet

using FrameIdSet = std::unordered_set<FrameId>

Collection of unique frame ids.

◆ FrameIndex

using FrameIndex = TypeSafeIndex<class GeometryTag>

Index into the ordered vector of all registered frames – by convention, the world frame's index is always zero.

◆ FramePoseVector

Class for communicating pose information to SceneGraph for registered frames.

Template Parameters
TThe scalar type. Must be a valid Eigen scalar.

Instantiated templates for the following kinds of T's are provided:

  • double
  • AutoDiffXd

They are already available to link against in the containing library. No other values for T are currently supported.

◆ GeometryId

using GeometryId = Identifier<class GeometryTag>

Type used to identify geometry instances in SceneGraph.

◆ GeometryIndex

using GeometryIndex = TypeSafeIndex<class GeometryTag>

Index into the ordered vector of all registered geometries (regardless of parent frame, role, etc.)

◆ ProximityIndex

using ProximityIndex = TypeSafeIndex<class ProximityTag>

Index used to identify a geometry in the proximity engine.

The same index type applies to both anchored and dynamic geometries. They are distinguished by which method they are passed to.

◆ SourceId

using SourceId = Identifier<class SourceTag>

Type used to identify geometry sources in SceneGraph.

Enumeration Type Documentation

◆ Role

enum Role
strong

General enumeration for indicating geometry role.

Enumerator
kUnassigned 
kProximity 
kIllustration 

Function Documentation

◆ ConnectDrakeVisualizer()

systems::lcm::LcmPublisherSystem * ConnectDrakeVisualizer ( systems::DiagramBuilder< double > *  builder,
const SceneGraph< double > &  scene_graph,
const systems::OutputPort< double > &  pose_bundle_output_port,
lcm::DrakeLcmInterface lcm = nullptr 
)

Implements ConnectDrakeVisualizer, but using pose_bundle_output_port to explicitly specify the output port used to get pose bundles for scene_graph.

This is required, for instance, when the SceneGraph is inside a Diagram, and the Diagram exports the pose bundle port.

Precondition
pose_bundle_output_port must be connected directly to the pose_bundle_output_port of scene_graph.
See also
ConnectDrakeVisualizer().

◆ DispatchLoadMessage()

void DispatchLoadMessage ( const SceneGraph< double > &  scene_graph,
lcm::DrakeLcmInterface lcm 
)

(Advanced) Explicitly dispatches an LCM load message based on the registered geometry.

Normally this is done automatically at Simulator initialization. But if you have to do it yourself (likely because you are not using a Simulator), it should be invoked after registration is complete. Typically this is used after ConnectDrakeVisualizer() has been used to add visualization to the Diagram that contains the given scene_graph. The message goes to LCM channel "DRAKE_VIEWER_LOAD_ROBOT".

See also
geometry::ConnectDrakeVisualizer()

◆ FindOrThrow()

void drake::geometry::FindOrThrow ( const Key &  key,
const Findable &  source,
const std::function< std::string()> &  make_message 
)

◆ get_missing_id_message()

std::string drake::geometry::get_missing_id_message ( const Key &  key)

◆ get_missing_id_message< FrameId >()

std::string drake::geometry::get_missing_id_message< FrameId > ( const FrameId key)

◆ get_missing_id_message< GeometryId >()

◆ get_missing_id_message< SourceId >()

◆ GetMutableValueOrThrow()

Value& drake::geometry::GetMutableValueOrThrow ( const Key &  key,
std::unordered_map< Key, Value > *  map 
)

◆ GetValueOrThrow()

const Value& drake::geometry::GetValueOrThrow ( const Key &  key,
const std::unordered_map< Key, Value > &  map 
)

◆ MakeDrakeVisualizerProperties()

IllustrationProperties MakeDrakeVisualizerProperties ( const Vector4< double > &  diffuse)

Constructs an IllustrationProperties instance compatible with the ConnectDrakeVisualizer incorporating the given diffuse color.

◆ operator<<() [1/2]

std::ostream & operator<< ( std::ostream &  out,
const Role role 
)

◆ operator<<() [2/2]

std::ostream& drake::geometry::operator<< ( std::ostream &  out,
const GeometryProperties props 
)

◆ to_string() [1/2]

std::string to_string ( const Role role)

◆ to_string() [2/2]

std::string drake::geometry::to_string ( const drake::geometry::Identifier< Tag > &  id)
inline

Enables use of identifiers with to_string.

It requires ADL to work. So, it should be invoked as: to_string(id); and should be preceded by using std::to_string.