Namespaces | |
graph_algorithms | |
test | |
trajectory_optimization | |
Classes | |
class | BodyShapeDescription |
BodyShapeDescription captures all the information necessary to describe a SceneGraph collision shape associated with a MultibodyPlant Body: a shape S, the MultibodyPlant body B (identified by model instance and body names), and the rigid pose of the shape S relative to the body B, X_BS. More... | |
class | CollisionChecker |
Interface for collision checkers to use. More... | |
class | CollisionCheckerContext |
This class represents the data necessary for CollisionChecker to operate safely across multiple threads in its const API. More... | |
struct | CollisionCheckerParams |
A set of common constructor parameters for a CollisionChecker. More... | |
class | DistanceAndInterpolationProvider |
This class represents the base interface for performing configuration distance and interpolation operations, used by CollisionChecker. More... | |
class | EdgeMeasure |
The measure of the distance of the edge from q1 to q2 and the portion of that is collision free. More... | |
struct | IrisFromCliqueCoverOptions |
class | LinearDistanceAndInterpolationProvider |
This class represents a basic "linear" implementation of DistanceAndInterpolationProvider. More... | |
class | RobotClearance |
A summary of the clearance – a collection of distance measurements – between the robot and everything in the world. More... | |
class | RobotDiagram |
Storage for a combined diagram, plant, and scene graph. More... | |
class | RobotDiagramBuilder |
Storage for a combined diagram builder, plant, and scene graph. More... | |
class | SceneGraphCollisionChecker |
An implementation of CollisionChecker that uses SceneGraph to provide collision checks. More... | |
class | UnimplementedCollisionChecker |
A concrete collision checker implementation that throws an exception for every virtual function hook. More... | |
Typedefs | |
using | ConfigurationDistanceFunction = std::function< double(const Eigen::VectorXd &, const Eigen::VectorXd &)> |
Configuration distance takes two configurations of the robot, q1 and q2, both as Eigen::VectorXd, and returns (potentially weighted) C-space distance as a double. More... | |
using | ConfigurationInterpolationFunction = std::function< Eigen::VectorXd(const Eigen::VectorXd &, const Eigen::VectorXd &, double)> |
Configuration interpolation function takes two configurations of the robot, q1, and q2, both as Eigen::VectorXd, plus a ratio, r, in [0, 1] and returns the interpolated configuration. More... | |
Enumerations | |
enum | RobotCollisionType : uint8_t { kNoCollision = 0x00, kEnvironmentCollision = 0x01, kSelfCollision = 0x02, kEnvironmentAndSelfCollision = kEnvironmentCollision | kSelfCollision } |
Enumerates these predicates (and their combinations): More... | |
Functions | |
BodyShapeDescription | MakeBodyShapeDescription (const multibody::MultibodyPlant< double > &plant, const systems::Context< double > &plant_context, const geometry::GeometryId &geometry_id) |
Constructs a BodyShapeDescription by extracting the shape, pose, and names associated with the provided geometry_id. More... | |
void | IrisInConfigurationSpaceFromCliqueCover (const CollisionChecker &checker, const IrisFromCliqueCoverOptions &options, RandomGenerator *generator, std::vector< geometry::optimization::HPolyhedron > *sets, const planning::graph_algorithms::MaxCliqueSolverBase *max_clique_solver=nullptr) |
Cover the configuration space in Iris regions using the Visibility Clique Cover Algorithm as described in. More... | |
RobotCollisionType | SetInEnvironmentCollision (RobotCollisionType collision_type, bool in_environment_collision) |
RobotCollisionType | SetInSelfCollision (RobotCollisionType collision_type, bool in_self_collision) |
Eigen::SparseMatrix< bool > | VisibilityGraph (const CollisionChecker &checker, const Eigen::Ref< const Eigen::MatrixXd > &points, Parallelism parallelize=Parallelism::Max()) |
Given some number of sampled points in the configuration space of checker 's plant(), computes the "visibility graph" – two points have an edge between them if the line segment connecting them is collision free. More... | |
using ConfigurationDistanceFunction = std::function<double(const Eigen::VectorXd&, const Eigen::VectorXd&)> |
Configuration distance takes two configurations of the robot, q1 and q2, both as Eigen::VectorXd, and returns (potentially weighted) C-space distance as a double.
The returned distance will be strictly non-negative.
To be valid, the function must satisfy the following condition:
for values of q that are valid for the CollisionChecker's plant.
using ConfigurationInterpolationFunction = std::function<Eigen::VectorXd( const Eigen::VectorXd&, const Eigen::VectorXd&, double)> |
Configuration interpolation function takes two configurations of the robot, q1, and q2, both as Eigen::VectorXd, plus a ratio, r, in [0, 1] and returns the interpolated configuration.
Behavior of the function for values of r outside of the range [0,1] is undefined.
To be valid, the function must satisfy the following conditions:
for values of q, q1, and q2 that are valid for the CollisionChecker's plant.
void drake::planning::IrisInConfigurationSpaceFromCliqueCover | ( | const CollisionChecker & | checker, |
const IrisFromCliqueCoverOptions & | options, | ||
RandomGenerator * | generator, | ||
std::vector< geometry::optimization::HPolyhedron > * | sets, | ||
const planning::graph_algorithms::MaxCliqueSolverBase * | max_clique_solver = nullptr |
||
) |
Cover the configuration space in Iris regions using the Visibility Clique Cover Algorithm as described in.
P. Werner, A. Amice, T. Marcucci, D. Rus, R. Tedrake "Approximating Robot Configuration Spaces with few Convex Sets using Clique Covers of Visibility Graphs" In 2024 IEEE Internation Conference on Robotics and Automation. https://arxiv.org/abs/2310.02875
checker | The collision checker containing the plant and its associated scene_graph. |
generator | There are points in the algorithm requiring randomness. The generator controls this source of randomness. |
sets | [in/out] initial sets covering the space (potentially empty). The cover is written into this vector. |
max_clique_solver | The min clique cover problem is approximatley solved by repeatedly solving max clique on the uncovered graph and adding this largest clique to the cover. The max clique problem is solved by this solver. If parallelism is set to allow more than 1 thread, then the solver must be implemented in C++. |
If nullptr is passed as the max_clique_solver
, then max clique will be solved using an instance of MaxCliqueSolverViaGreedy, which is a fast heuristic. If higher quality cliques are desired, consider changing the solver to an instance of MaxCliqueSolverViaMip. Currently, the padding in the collision checker is not forwarded to the algorithm, and therefore the final regions do not necessarily respect this padding. Effectively, this means that the regions are generated as if the padding is set to 0. This behavior may be adjusted in the future at the resolution of #18830.
Note that MaxCliqueSolverViaMip requires the availability of a Mixed-Integer Linear Programming solver (e.g. Gurobi and/or Mosek). We recommend enabling those solvers if possible because they produce higher quality cliques (https://drake.mit.edu/bazel.html#proprietary_solvers). The method will throw if max_clique_solver
cannot solve the max clique problem.
BodyShapeDescription drake::planning::MakeBodyShapeDescription | ( | const multibody::MultibodyPlant< double > & | plant, |
const systems::Context< double > & | plant_context, | ||
const geometry::GeometryId & | geometry_id | ||
) |
Constructs a BodyShapeDescription by extracting the shape, pose, and names associated with the provided geometry_id.
plant_context
is compatible with plant
. plant
is connected to a scene graph. geometry_id
refers to a geometry rigidly affixed to a body of plant
. RobotCollisionType drake::planning::SetInEnvironmentCollision | ( | RobotCollisionType | collision_type, |
bool | in_environment_collision | ||
) |
in_environment_collision
, and the self-collision value is that asserted by collision_type
. RobotCollisionType drake::planning::SetInSelfCollision | ( | RobotCollisionType | collision_type, |
bool | in_self_collision | ||
) |
in_self_collision
, and the environment-collision value is that asserted by collision_type
. Eigen::SparseMatrix<bool> drake::planning::VisibilityGraph | ( | const CollisionChecker & | checker, |
const Eigen::Ref< const Eigen::MatrixXd > & | points, | ||
Parallelism | parallelize = Parallelism::Max() |
||
) |
Given some number of sampled points in the configuration space of checker
's plant(), computes the "visibility graph" – two points
have an edge between them if the line segment connecting them is collision free.
See CollisionChecker documentation for more information on how edge collision checks are performed.
Note that this method assumes the collision checker has symmetric behavior (i.e. checking edge (q1, q2) is the same as checking edge (q2, q1)). This is true for many collision checkers (e.g. those using LinearDistanceAndInterpolationProvider, which is the default), but some more complex spaces with non-linear interpolation (e.g. a Dubin's car) are not symmetric.
If parallelize
specifies more than one thread, then the CollisionCheckerParams::distance_and_interpolation_provider for checker
must be implemented in C++, either by providing the C++ implementation directly directly or by using the default provider.