|
| BulletModel () |
|
virtual | ~BulletModel () |
|
void | updateModel () override |
| Perform any operations needed to bring the model up-to-date after making changes to its collision elements. More...
|
|
ElementId | addElement (const Element &element) override |
| Add a collision element to this model. More...
|
|
bool | updateElementWorldTransform (const ElementId, const Eigen::Isometry3d &T_local_to_world) override |
| Change the element-to-world transform of a specified collision element. More...
|
|
bool | closestPointsAllToAll (const std::vector< ElementId > &ids_to_check, const bool use_margins, std::vector< PointPair > &closest_points) override |
| Finds the points where each pair of the elements in ids_to_check are closest. More...
|
|
bool | ComputeMaximumDepthCollisionPoints (const bool use_margins, std::vector< PointPair > &points) override |
| Computes the point of closest approach between collision elements that are in contact. More...
|
|
bool | closestPointsPairwise (const std::vector< ElementIdPair > &id_pairs, const bool use_margins, std::vector< PointPair > &closest_points) override |
| Finds the points where each pair of elements in id_pairs are closest. More...
|
|
void | collisionDetectFromPoints (const Eigen::Matrix3Xd &points, bool use_margins, std::vector< PointPair > &closest_points) override |
| Compute closest distance from each point to any surface in the collision model utilizing Bullet's collision detection code. More...
|
|
void | ClearCachedResults (bool use_margins) override |
| Clears possibly cached results so that a fresh computation can be performed. More...
|
|
bool | collisionRaycast (const Eigen::Matrix3Xd &origins, const Eigen::Matrix3Xd &ray_endpoints, bool use_margins, Eigen::VectorXd &distances, Eigen::Matrix3Xd &normals) override |
| Performs raycasting collision detecting (like a LIDAR / laser rangefinder) More...
|
|
std::vector< PointPair > | potentialCollisionPoints (bool use_margins) override |
| Computes the set of potential collision points for all eligible pairs of collision geometries in this model. More...
|
|
bool | collidingPointsCheckOnly (const std::vector< Eigen::Vector3d > &input_points, double collision_threshold) override |
| Tests if any of the points supplied in input_points collides with any part of the model within a given threshold. More...
|
|
std::vector< size_t > | collidingPoints (const std::vector< Eigen::Vector3d > &input_points, double collision_threshold) override |
| Given a vector of points in world coordinates, returns the indices of those points within a specified distance of any collision geometry in the model. More...
|
|
| Model () |
|
virtual | ~Model () |
|
bool | removeElement (const ElementId &id) |
|
virtual const Element * | readElement (ElementId id) const |
| Get a read-only pointer to a collision element in this model. More...
|
|
virtual void | getTerrainContactPoints (ElementId id0, Eigen::Matrix3Xd &terrain_points) |
|
virtual bool | transformCollisionFrame (const DrakeCollision::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...
|
|
std::vector< size_t > collidingPoints |
( |
const std::vector< Eigen::Vector3d > & |
input_points, |
|
|
double |
collision_threshold |
|
) |
| |
|
overridevirtual |
Given a vector of points in world coordinates, returns the indices of those points within a specified distance of any collision geometry in the model.
In other words, this method tests if a sphere of radius collision_threshold located at input_points[i] collides with any part of the model. The result is returned as a vector of indexes in input_points that do collide with the model. Points are not checked against one another but only against the existing model.
- Parameters
-
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. |
- Returns
- A vector with indexes in input_points of all those points that do collide with the model within the specified threshold.
- See also
- systems/plants/test/collidingPointsTest.m for a Matlab test.
Implements Model.
std::vector< PointPair > potentialCollisionPoints |
( |
bool |
use_margins | ) |
|
|
overridevirtual |
Computes the set of potential collision points for all eligible pairs of collision geometries in this model.
This includes the points of closest approach, but may also include additional points that are "close" to being in contact. This can be useful when simulating scenarios in which two collision elements have more than one point of contact.
This implementation uses Bullet's random perturbation approach to generate the additional contact points. Bullet performs discrete collision detection multiple times with small perturbations to the pose of each collision geometry. The potential collision points are the union of the closest points found in each of these perturbed runs.
- Parameters
-
use_margins | flag indicating whether or not to use the version of this model with collision margins. |
- Returns
- a vector of PointPair objects containing the potential collision points.
- Exceptions
-
An | std::runtime_error if calls to this method are mixed with other dispatching methods such as BulletModel::collisionPointsAllToAll since mixing dispatch methods causes undefined behavior. |
Implements Model.