Skip to main content

internal Namespace

Definition

namespace pro_rrt::internal { ... }

Functions Index

voidsetFakeAccelerationBounds (moveit_pro::base::RobotModel &robot_model)
std::optional< PlanningError >getCollisionError (const moveit_pro::base::JointModelGroup &group, const Eigen::VectorXd &joint_positions, moveit_pro::base::planning_scene::PlanningScene &planning_scene, bool pad_environment_collisions, bool pad_self_collisions)

Explain why collisionValidationFunction would refuse a configuration. More...

rrtconnect::ValidationFunctionmakeWorkspaceSubdividingValidator (std::function< bool(const Eigen::VectorXd &)> point_validator, rrtconnect::WorkspaceSubdivision subdivision, double configuration_space_step)

Wrap a point validator into an edge-aware rrtconnect::ValidationFunction that subdivides each proposed transition by both spacing bounds. More...

moveit_pro::base::collision_detection::CollisionRequestmakeValidationCollisionRequest (const moveit_pro::base::JointModelGroup &group, bool pad_environment_collisions, bool pad_self_collisions)
Eigen::VectorXdcomputeWorkspaceSweepWeights (const moveit_pro::base::JointModelGroup &group, const moveit_pro::base::RobotState &state, double geometry_scale=1.0, double geometry_padding=0.0)

Compute per-active-variable workspace sweep weights for group: an upper bound, in meters, on how far any point of the robot can move per unit of each variable's motion. More...

Variables Index

constexpr charkTestRobot[] = "panda"
constexpr charkTestGroup[] = "panda_arm"
constexpr doublekFakeAccelerationLimit = 2.0

Functions

computeWorkspaceSweepWeights()

Eigen::VectorXd pro_rrt::internal::computeWorkspaceSweepWeights (const moveit_pro::base::JointModelGroup & group, const moveit_pro::base::RobotState & state, double geometry_scale=1, double geometry_padding=0)

Compute per-active-variable workspace sweep weights for group: an upper bound, in meters, on how far any point of the robot can move per unit of each variable's motion.

For a revolute variable the weight is the joint's worst-case lever arm: the maximum distance from the joint's frame origin (a point on its axis) to any point of any descendant link's collision geometry — attached bodies included — maximized over the positions of the descendant joints. Chain translations accumulate by the triangle inequality (rotations preserve distances, so each hop contributes at most its fixed origin offset plus the connecting joint's own maximum translation), and each link's geometry is covered by a bounding sphere about its frame origin. Prismatic variables move every distal point by exactly the variable delta, so their weight is 1. Only single-DOF revolute and prismatic active joints are supported — the same restriction the planner's continuous-joint wrapping already enforces; any other type is rejected (see @throws). Joints that mimic an active joint add their own scaled sweep to that joint's weight. Descendant joints outside the group may additionally be planar or floating; only their (finite) translation bounds enter the chain accumulation.

The weighted L1 norm weights · |Δq| therefore bounds the workspace distance any robot point sweeps along a straight configuration-space segment Δq, which is what makes it usable as rrtconnect::WorkspaceSubdivision::sweep_weights for collision-validation subdivision. The bound is conservative: it assumes every chain fully stretched and sums per-joint contributions, so it never under-counts the samples needed for a workspace resolution. Rather than silently weaken that guarantee, inputs it cannot bound — a descendant translation variable with a non-finite limit — are rejected (see @throws).

In internal because the only supported surface is RRTParams::workspace_step; the weight computation itself carries no compatibility guarantee.

Parameters
group

Joint model group to compute weights for.

state

Robot state supplying the attached bodies that move with the group's links. Joint positions in the state do not affect the result — the bound is maximized over configurations.

geometry_scale

Largest link scale the collision checker applies (>= 1). Collision checks run against scaled and padded geometry, whose surface points sweep farther per unit of joint motion than the nominal ones, so the bound must cover the inflated bodies.

geometry_padding

Largest link padding the collision checker applies, in meters (>= 0).

Returns

One weight per active variable of group, in the group's active-variable order.

Exceptions
std::invalid_argument

if an active or mimic joint is not single-DOF revolute or prismatic, if the robot model's kinematic tree is malformed (a descendant link without a parent, or an attached body whose shape and pose counts disagree), if a descendant translation-capable joint carries a non-finite or missing position bound (its sweep contribution would be unbounded, so no finite weight is conservative), if a joint reports a variable count its type does not match, or if the inflation arguments are outside their documented ranges.

Definition at line 238 of file workspace_reach.cpp.

getCollisionError()

std::optional< PlanningError > pro_rrt::internal::getCollisionError (const moveit_pro::base::JointModelGroup & group, const Eigen::VectorXd & joint_positions, moveit_pro::base::planning_scene::PlanningScene & planning_scene, bool pad_environment_collisions, bool pad_self_collisions)

Explain why collisionValidationFunction would refuse a configuration.

Runs the same checks under the same request as the predicate, and reports the first that finds contacts. Callers that only need a verdict should use the predicate: this one requests contact details, so it costs more per call and is meant for the failure path.

Reports self-collisions before environment ones. That is this function's own order, not the predicate's: collisionValidationFunction issues a single checkCollision, which checks the environment first and self-collisions second. So a configuration that is in both kinds of collision is named here by its self-collision, while the predicate would have hit the environment contact first. Both are real contacts of the same configuration under the same request — what the predicate cannot express either way is which, since it answers with a bare bool.

Contacts come back in the returned PlanningError::collision_info, which is what lets a caller draw where the configuration touched rather than only that it did. Deriving them from a separate check of the caller's own devising risks reporting a contact that is not the one that refused the pose; sharing the request is the point of this function.

Parameters
group

Joint model group associated with joint_positions.

joint_positions

Configuration to explain. Must hold one value per active variable of group, exactly as collisionValidationFunction requires.

planning_scene

Planning scene to check against. Its current state's group joints are overwritten with joint_positions.

pad_environment_collisions

Whether link padding applies to robot-environment checks.

pad_self_collisions

Whether link padding applies to self-collision checks. When false, the returned message omits the padding hint for a self-collision, which would otherwise name a padding value that had no part in the refusal.

Returns

A PlanningError naming the colliding bodies, carrying the contacts and joint_positions, or std::nullopt if neither check recorded a contact — which is not the same as valid, since a caller may refuse the configuration for reasons this function does not check.

info

"No contact recorded" and "no collision" coincide only because the request asks for contacts and leaves room for them: FCL stops storing once the contact budget is spent and reports the collision through a flag instead. That budget is set here and never by the caller, so the two stay equivalent — but the branch is on the contacts, because they are what the message needs.

Definition at line 305 of file pro_rrt.cpp.

makeValidationCollisionRequest()

moveit_pro::base::collision_detection::CollisionRequest pro_rrt::internal::makeValidationCollisionRequest (const moveit_pro::base::JointModelGroup & group, bool pad_environment_collisions, bool pad_self_collisions)
inline

Collision request performed by collisionValidationFunction, exposed so measurement code can query contact details under the exact predicate the planner validates with. Inline so the planner's per-sample validation path stays free of an exported call. Symbols in internal are not part of the supported API surface.

Definition at line 399 of file pro_rrt.hpp.

makeWorkspaceSubdividingValidator()

rrtconnect::ValidationFunction pro_rrt::internal::makeWorkspaceSubdividingValidator (std::function< bool(const Eigen::VectorXd &)> point_validator, rrtconnect::WorkspaceSubdivision subdivision, double configuration_space_step)

Wrap a point validator into an edge-aware rrtconnect::ValidationFunction that subdivides each proposed transition by both spacing bounds.

When the origin waypoint is engaged, the transition q_origin -> q_dest is handed to the workspace-referred rrtconnect::edgeBinarySearch overload, so its samples are never spaced wider than configuration_space_step in the joint space nor than workspace_step in swept distance — structurally, whatever transition length a caller proposes. The origin itself is assumed already validated by the caller, which holds for every tree-growth and segment-validation call site in rrtconnect and rrtstar. When the origin is disengaged only the destination is validated. A transition edgeBinarySearch rejects for an unrepresentable sample count or a size mismatch fails closed. Exposed for tests; symbols in internal are not part of the supported API surface.

Parameters
point_validator

Predicate for a single configuration.

subdivision

Sweep weights and workspace step. The step must be strictly positive and finite and the weights finite and non-negative; both are validated here. The weight vector's length is only checkable once a transition arrives, so a length that does not match the configurations fails closed at call time rather than throwing.

configuration_space_step

Joint-space upper bound on sample spacing, validated here like the workspace step.

Returns

The wrapped validation function.

Exceptions
std::invalid_argument

if either step or a weight entry violates the constraints above.

Definition at line 369 of file pro_rrt.cpp.

setFakeAccelerationBounds()

void pro_rrt::internal::setFakeAccelerationBounds (moveit_pro::base::RobotModel & robot_model)
inline

Definition at line 31 of file planning_test_utils.hpp.

Variables

kFakeAccelerationLimit

constexpr double pro_rrt::internal::kFakeAccelerationLimit = 2.0
constexpr

Definition at line 25 of file planning_test_utils.hpp.

kTestGroup

constexpr char pro_rrt::internal::kTestGroup[] = "panda_arm"
constexpr

Definition at line 20 of file planning_test_utils.hpp.

kTestRobot

constexpr char pro_rrt::internal::kTestRobot[] = "panda"
constexpr

Definition at line 19 of file planning_test_utils.hpp.


The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.