Drake

#include <multibody/collision/fcl_model.h>
Public Member Functions  
FclModel ()  
virtual  ~FclModel () 
void  DoAddElement (const Element &element) override 
Allows subclasses to do additional processing on elements added to the collision model. More...  
void  DoRemoveElement (ElementId id) override 
Allows subclasses to do additional processing when elements are removed from the collision model. More...  
bool  ClosestPointsAllToAll (const std::vector< ElementId > &ids_to_check, bool use_margins, std::vector< PointPair > *closest_points) override 
Computes the points of closest approach between all eligible pairs of collision elements drawn from a specified set of elements. More...  
bool  ClosestPointsPairwise (const std::vector< ElementIdPair > &id_pairs, bool use_margins, std::vector< PointPair > *closest_points) override 
Computes the points of closest approach between specified pairs of collision elements. More...  
bool  CollidingPointsCheckOnly (const std::vector< Eigen::Vector3d > &input_points, double collision_threshold) override 
Given a vector of points in the world coordinate frame, reports if any of those points lie within a specified distance of any collision geometry in the model. More...  
bool  CollisionRaycast (const Eigen::Matrix3Xd &origins, const Eigen::Matrix3Xd &ray_endpoints, bool use_margins, Eigen::VectorXd *distances, Eigen::Matrix3Xd *normals) override 
Performs a raycast intersection test (like a LIDAR / laser range finder). More...  
bool  ComputeMaximumDepthCollisionPoints (bool use_margins, std::vector< PointPair > *points) override 
Computes the point of closest approach between collision elements that are in contact. More...  
std::vector< size_t >  CollidingPoints (const std::vector< Eigen::Vector3d > &input_points, double collision_threshold) override 
Given a vector of points in the world coordinate frame, returns the indices of those points that are within the provided collision_threshold distance of any collision geometry in the model. More...  
void  ClearCachedResults (bool use_margins) override 
Clears possibly cached results so that a fresh computation can be performed. More...  
void  CollisionDetectFromPoints (const Eigen::Matrix3Xd &points, bool use_margins, std::vector< PointPair > *closest_points) override 
Computes the closest distance from each point to any surface in the collision model utilizing Bullet's collision detection code. More...  
void  UpdateModel () override 
Updates the collision model. More...  
bool  UpdateElementWorldTransform (ElementId, const Eigen::Isometry3d &T_local_to_world) override 
Updates the stored transformation from a collision element's canonical space to world space (X_WE ), where X_WE = X_WL * X_LE . More...  
Does not allow copy, move, or assignment  
FclModel (const FclModel &)=delete  
FclModel &  operator= (const FclModel &)=delete 
FclModel (FclModel &&)=delete  
FclModel &  operator= (FclModel &&)=delete 
Public Member Functions inherited from Model  
Model ()  
virtual  ~Model () 
Element *  AddElement (std::unique_ptr< Element > element) 
Adds a collision element to this model. More...  
bool  RemoveElement (ElementId id) 
Removes a collision element from this model. More...  
virtual const Element *  FindElement (ElementId id) const 
Gets a readonly pointer to a collision element in this model. More...  
virtual Element *  FindMutableElement (ElementId id) 
Gets a pointer to a mutable collision element in this model. More...  
void  GetTerrainContactPoints (ElementId id0, Eigen::Matrix3Xd *terrain_points) 
virtual bool  TransformCollisionFrame (const drake::multibody::collision::ElementId &eid, const Eigen::Isometry3d &transform_body_to_joint) 
Modifies a collision element's local transform to be relative to a joint's frame rather than a link's frame. More...  
Model (const Model &)=delete  
Model &  operator= (const Model &)=delete 
Model (Model &&)=delete  
Model &  operator= (Model &&)=delete 
Additional Inherited Members  
Protected Attributes inherited from Model  
std::unordered_map< ElementId, std::unique_ptr< Element > >  elements 

inline 

inlinevirtual 

overridevirtual 
Clears possibly cached results so that a fresh computation can be performed.
[in]  use_margins  If true , the cache of the model with margins is cleared. If false , the cache of the model without margins is cleared. 
Depending on the implementation, the collision model may cache results on each dispatch. For instance, Bullet uses cached results to warmstart its LCP solvers.
Clearing cached results allows the collision model to perform a fresh computation without any coupling with previous history.
Implements Model.

overridevirtual 
Computes the points of closest approach between all eligible pairs of collision elements drawn from a specified set of elements.
ids_to_check  The vector of ElementId for which the alltoall collision detection should be performed  
use_margins  A flag indicating whether or not to use the version of this model with collision margins  
[out]  closest_points  A reference to a vector of PointPair objects that contains the closest point information after this method is called 
Implements Model.

overridevirtual 
Computes the points of closest approach between specified pairs of collision elements.
id_pairs  A vector of ElementIdPair specifying which pairs of elements to consider  
use_margins  A flag indicating whether or not to use the version of this model with collision margins  
[out]  closest_points  A reference to a vector of PointPair objects that contains the closest point information after this method is called 
Implements Model.

overridevirtual 
Given a vector of points in the world coordinate frame, returns the indices of those points that are within the provided collision_threshold
distance of any collision geometry in the model.
In other words, the index i
is included in the returned vector of indices iff a sphere of radius collision_threshold
, located at input_points[i]
collides with any collision element in the model.
input_points  The list of points to check for collisions against the model. 
collision_threshold  The radius of a control sphere around each point used to check for collisions with the model. 
Implements Model.

overridevirtual 
Given a vector of points in the world coordinate frame, reports if any of those points lie within a specified distance of any collision geometry in the model.
In other words, this method tests if any of the spheres of radius collision_threshold
located at input_points[i]
collides with any part of the model. This method returns as soon as any of these spheres collides with the model. Points are not checked against one another but only against the existing model.
input_points  The list of points to check for collisions against the model. 
collision_threshold  The radius of a control sphere around each point used to check for collisions with the model. 
Implements Model.

overridevirtual 
Computes the closest distance from each point to any surface in the collision model utilizing Bullet's collision detection code.
points  An ordered list of N points represented columnwise by a 3 x N Matrix.  
use_margins  A flag indicating whether to use the version of this model with collision margins.  
[out]  closest_points  A vector of N PointPair instances such that the i'th instance reports the query result for the i'th input point. 
Implements Model.

overridevirtual 
Performs a raycast intersection test (like a LIDAR / laser range finder).
origin  A 3 x N matrix where each column specifies the position of a ray's origin in the world coordinate frame. If origin has dimensions of 3 x 1, the same origin is used for all rays.  
ray_endpoint  A 3 x N matrix where each column specifies a second point on the corresponding ray.  
use_margins  A flag indicating whether or not to use the version of this model with collision margins.  
[out]  distance  The distance to the first collision, or 1 if no collision occurs. 
Implements Model.

overridevirtual 
Computes the point of closest approach between collision elements that are in contact.
[in]  use_margins  If true the model uses the representation with margins. If false , the representation without margins is used instead. 
[out]  closest_points  A reference to a vector of PointPair objects that contains the closest point information after this method is called. 
Implements Model.

overridevirtual 
Allows subclasses to do additional processing on elements added to the collision model.
This is called each time Model::AddElement is called.
element  The element that has been added. 
std::runtime_error  If there was a problem processing the element. 
Reimplemented from Model.

overridevirtual 
Allows subclasses to do additional processing when elements are removed from the collision model.
This is called by Model::RemoveElement() prior to removing id from elements. The derived class should not do this removal.
id  The id of the element that will be removed. 
Reimplemented from Model.
Updates the stored transformation from a collision element's canonical space to world space (X_WE
), where X_WE = X_WL * X_LE
.
X_LE
is the transform that maps the element to its parent body's space, referred to as "local". X_WL
maps the body/local space to the world.
id  The ID of the element being updated. 
X_WL  The new value for the localtoworld transform. It reflects the current world pose of the parent body in a given context. 
Reimplemented from Model.

overridevirtual 
Updates the collision model.
This method is typically called after changes are made to its collision elements.
Implements Model.