Skip to main content

internal Namespace

Internal geometry for CropPosesToPointCloudFootprint. Not part of the supported API surface. More...

Definition​

namespace moveit_pro::behaviors::internal { ... }

Classes Index​

classLatencyWindow

Seam-lead estimate over the last kLatencyWindowSize inference round trips: their max, floored. More...

classMPCBehaviorBase

All non-template implementation for the templated MPCBehaviorBase class. More...

structPlanarPoint

A point in the plane fitted to a point cloud, in that plane's own 2D axes. More...

structSam2AutomaskModelPorts
structSam3ModelPorts

Enumerations Index​

enum classPolicyResponseOutcome { ... }

Functions Index​

PolicyResponseOutcomeclassifyPolicyResponse (std::uint8_t status)

Classify a GetActionChunk response status into the run outcome it demands. More...

std::stringpolicyResponseFailureMessage (const moveit_pro_ml_msgs::srv::GetActionChunk::Response &response)

Render a response classified kFailed as the run's failure reason. More...

boolexceedsPositionLimitTolerance (double position, bool position_bounded, double min_position, double max_position, double tolerance_fraction)

Report whether a position command lies farther outside a joint's position limits than a tolerated fraction of its position range. More...

template <typename Lockable, typename StopTransition>
voidstopRecordingUnderLock (Lockable &mutex, StopTransition &&set_stopped)

Performs the stop transition while holding the mutex shared with trajectory mutation. More...

template < ... >
boolmutateTrajectoryUnlessStopped (Lockable &mutex, StopPredicate &&is_stopped, TrajectoryMutation &&mutate_trajectory)

Mutates the trajectory only while the stop predicate is false under the shared mutex. More...

tl::expected< visualization_msgs::msg::MarkerArray, std::string >makeRejectedWaypointMarkers (const moveit_pro::base::planning_scene::PlanningScene &planning_scene, const moveit_pro::base::JointModelGroup &group, const std::vector< Eigen::VectorXd > &checked_path, int path_index, const moveit_pro::base::collision_detection::CollisionResult::ContactMap &contacts, marker_utils::OutlineDrop *drop=nullptr)

Markers for the waypoint a collision check refused. More...

tl::expected< moveit_pro::hand_eye_calibration::DistortionModel, std::string >parseDistortionModel (std::string_view requested, std::string_view declared)
std::stringintrinsicsSummary (const moveit_pro::hand_eye_calibration::IntrinsicCalibrationResult &result, std::string_view camera_name, moveit_pro::hand_eye_calibration::DistortionModel model)
std::optional< std::string >intrinsicsWarning (const moveit_pro::hand_eye_calibration::IntrinsicCalibrationResult &result, std::string_view camera_name, double rms_reprojection_warn_px, double recorded_disagreement_warn_px, double min_coverage)
std::vector< PlanarPoint >convexHull (std::vector< PlanarPoint > points)

Convex hull of points, counter-clockwise, with collinear points dropped. More...

boolisInsideConvexHull (const std::vector< PlanarPoint > &hull, const PlanarPoint &point, double margin)

Whether point lies inside a counter-clockwise convex hull, allowing margin. More...

boolisWithinJointTravel (const moveit_pro::base::JointModelGroup &group, const Eigen::VectorXd &candidate, const Eigen::VectorXd &seed, double max_travel)
tl::expected< moveit_pro_ml::SAM3DetectResult, std::string >takeSam3Result (tl::expected< moveit_pro_ml::SAM3DetectResult, moveit_pro_ml::InferenceError > &&result)

Adapt inference errors for the Behavior while transferring ownership of successful mask and score buffers. More...

tl::expected< PostProcessResult, std::string >makeExemplarPostProcessResult (tl::expected< std::vector< moveit_studio_vision_msgs::msg::Mask2D >, std::string > &&mask_messages, const std::vector< float > &scores)

Transfer converted mask buffers into the post-processing result and format the corresponding scores. More...

tl::expected< moveit_pro::hand_eye_calibration::CameraIntrinsics, std::string >toCameraIntrinsics (const sensor_msgs::msg::CameraInfo &camera_info)

Extract the pinhole intrinsics the calibration library consumes from a CameraInfo message. More...

moveit_pro::hand_eye_calibration::CharucoBoardConfigtoBoardConfig (const moveit_studio_msgs::msg::CharucoBoard &board)

Convert a CharucoBoard message into the board description the calibration library consumes. More...

std::stringrefinementSummary (const moveit_pro::hand_eye_calibration::BundleAdjustmentResult &result, double outlier_threshold_px)
std::optional< std::string >refinementWarning (const moveit_pro::hand_eye_calibration::BundleAdjustmentResult &result, double rms_reprojection_warn_px)
std::stringintrinsicsSummary (const IntrinsicCalibrationResult &result, std::string_view camera_name, const DistortionModel model)
std::optional< std::string >intrinsicsWarning (const IntrinsicCalibrationResult &result, std::string_view camera_name, const double rms_reprojection_warn_px, const double recorded_disagreement_warn_px, const double min_coverage)

Variables Index​

constexpr std::size_tkLatencyWindowSize = 5

Description​

Internal geometry for CropPosesToPointCloudFootprint. Not part of the supported API surface.

Symbols in this namespace are visible so tests can reach them and carry no API-compatibility guarantee.

Enumerations​

PolicyResponseOutcome​

enum class moveit_pro::behaviors::internal::PolicyResponseOutcome
strong
Enumeration values
kChunkProduced
kEndOfRun
kFailed

How a policy response's status maps onto the run: execute the chunk, end the run as complete, or fail it.

Definition at line 53 of file execute_policy.hpp.

Functions​

classifyPolicyResponse()​

PolicyResponseOutcome moveit_pro::behaviors::internal::classifyPolicyResponse (std::uint8_t status)

Classify a GetActionChunk response status into the run outcome it demands.

CHUNK_PRODUCED executes the chunk and NO_MORE_ACTIONS ends the run as complete; everything else fails the run: ERROR, UNKNOWN (the server never set the field), and any value the contract does not define, so only an explicit NO_MORE_ACTIONS may end a run as complete.

Parameters
status

The response's status field.

Returns

The outcome the caller must apply.

Definition at line 493 of file execute_policy.cpp.

convexHull()​

std::vector< PlanarPoint > moveit_pro::behaviors::internal::convexHull (std::vector< PlanarPoint > points)

Convex hull of points, counter-clockwise, with collinear points dropped.

Monotone chain. Returns fewer than three vertices when the input is empty or degenerate (all points equal, or all collinear), which callers must treat as "no usable footprint" rather than as an empty region.

Definition at line 63 of file crop_poses_to_pointcloud_footprint.cpp.

exceedsPositionLimitTolerance()​

bool moveit_pro::behaviors::internal::exceedsPositionLimitTolerance (double position, bool position_bounded, double min_position, double max_position, double tolerance_fraction)

Report whether a position command lies farther outside a joint's position limits than a tolerated fraction of its position range.

Parameters
position

The commanded position.

position_bounded

Whether the joint declares position limits.

min_position

Lower position limit, used only when position_bounded is true.

max_position

Upper position limit, used only when position_bounded is true.

tolerance_fraction

Fraction of the position range (max_position - min_position) tolerated past either limit. Must be non-negative; a negative fraction inverts the band.

Returns

True when the joint is bounded and the position lies more than the tolerated band below min_position or above max_position; false otherwise, including for an unbounded joint.

Definition at line 528 of file execute_policy.cpp.

intrinsicsSummary()​

std::string moveit_pro::behaviors::internal::intrinsicsSummary (const moveit_pro::hand_eye_calibration::IntrinsicCalibrationResult & result, std::string_view camera_name, moveit_pro::hand_eye_calibration::DistortionModel model)

The info line for a calibration outcome. It names the solved intrinsics under the given model, how well they fit the views, how certain they are there, and how much of the image the corners covered. It then reports how far the intrinsics the camera published differ from the solved ones, and the views the solve or the fit left out.

Definition at line 36 of file calibrate_camera_intrinsics.hpp.

intrinsicsSummary()​

std::string moveit_pro::behaviors::internal::intrinsicsSummary (const IntrinsicCalibrationResult & result, std::string_view camera_name, const DistortionModel model)

Definition at line 151 of file calibrate_camera_intrinsics.cpp.

intrinsicsWarning()​

std::optional< std::string > moveit_pro::behaviors::internal::intrinsicsWarning (const moveit_pro::hand_eye_calibration::IntrinsicCalibrationResult & result, std::string_view camera_name, double rms_reprojection_warn_px, double recorded_disagreement_warn_px, double min_coverage)

The warning a calibration outcome deserves, or nullopt when it deserves none. Five conditions warn: the published intrinsics disagree with the calibrated ones by more than recorded_disagreement_warn_px at an observed corner and by more than a fixed multiple of the calibration's uncertainty there; the uncertainty is too high to settle that check, because it is above recorded_disagreement_warn_px or because the disagreement is above that limit but not beyond the multiple; the solved distortion cannot be undone across the image; the coverage is below min_coverage; or the solved fit is above rms_reprojection_warn_px. The first points at the calibrated values only when none of the other four conditions holds.

Definition at line 49 of file calibrate_camera_intrinsics.hpp.

intrinsicsWarning()​

std::optional< std::string > moveit_pro::behaviors::internal::intrinsicsWarning (const IntrinsicCalibrationResult & result, std::string_view camera_name, const double rms_reprojection_warn_px, const double recorded_disagreement_warn_px, const double min_coverage)

Definition at line 178 of file calibrate_camera_intrinsics.cpp.

isInsideConvexHull()​

bool moveit_pro::behaviors::internal::isInsideConvexHull (const std::vector< PlanarPoint > & hull, const PlanarPoint & point, double margin)

Whether point lies inside a counter-clockwise convex hull, allowing margin.

A positive margin grows the footprint, a negative one shrinks it, both measured perpendicular to each hull edge. Points exactly on an edge count as inside at margin 0. Returns false for a hull with fewer than three vertices.

Definition at line 112 of file crop_poses_to_pointcloud_footprint.cpp.

isWithinJointTravel()​

bool moveit_pro::behaviors::internal::isWithinJointTravel (const moveit_pro::base::JointModelGroup & group, const Eigen::VectorXd & candidate, const Eigen::VectorXd & seed, double max_travel)

Returns true when every revolute joint of the candidate lies within max_travel radians of the seed. The distance comes from the joint model, so a continuous joint may wrap around. The bound keeps the candidate in the posture of the seed instead of reaching the same pose through an elbow or wrist flip. Joints of other types are not bounded. Both vectors hold one value per active joint of the group, which assumes single-DOF joints. The IK solver rejects any other group before it calls this check.

Declaration at line 32 of file generate_calibration_views.hpp, definition at line 76 of file generate_calibration_views.cpp.

makeExemplarPostProcessResult()​

tl::expected< PostProcessResult, std::string > moveit_pro::behaviors::internal::makeExemplarPostProcessResult (tl::expected< std::vector< moveit_studio_vision_msgs::msg::Mask2D >, std::string > && mask_messages, const std::vector< float > & scores)

Transfer converted mask buffers into the post-processing result and format the corresponding scores.

Declaration at line 137 of file get_masks_2d_from_exemplar.hpp, definition at line 516 of file get_masks_2d_from_exemplar.cpp.

makeRejectedWaypointMarkers()​

tl::expected< visualization_msgs::msg::MarkerArray, std::string > moveit_pro::behaviors::internal::makeRejectedWaypointMarkers (const moveit_pro::base::planning_scene::PlanningScene & planning_scene, const moveit_pro::base::JointModelGroup & group, const std::vector< Eigen::VectorXd > & checked_path, int path_index, const moveit_pro::base::collision_detection::CollisionResult::ContactMap & contacts, marker_utils::OutlineDrop * drop=nullptr)

Markers for the waypoint a collision check refused.

Draws the refused configuration as a translucent robot, followed by spheres at the contacts that refused it. Internal: exposed so the waypoint selection is testable without running a collision check or a ROS publisher, and not covered by the API-compatibility guarantee.

Parameters
planning_scene

Scene the path was checked against. Its current state seeds the drawn pose, so joints outside group and attached bodies keep their scene values.

group

Planning group whose active joints checked_path describes.

checked_path

Waypoints exactly as handed to the collision check — the downsampled path, not the input trajectory, since that is what path_index counts.

path_index

Waypoint the collision check refused.

contacts

Contacts the check reported.

drop

Why an outline the scene called for was not drawn and on which link, or kNone, so the caller can say so. A missing margin reads on screen exactly like a check that used none.

Returns

The markers, or an error when path_index falls outside checked_path. Neither the pose nor the spheres are returned on error: both describe one waypoint, so an index that does not identify one leaves nothing meaningful to draw.

Definition at line 80 of file validate_trajectory.cpp.

mutateTrajectoryUnlessStopped()​

template <typename Lockable, typename StopPredicate, typename TrajectoryMutation>
bool moveit_pro::behaviors::internal::mutateTrajectoryUnlessStopped (Lockable & mutex, StopPredicate && is_stopped, TrajectoryMutation && mutate_trajectory)

Mutates the trajectory only while the stop predicate is false under the shared mutex.

Returns

True when the mutation ran; false when recording had already stopped.

Definition at line 26 of file record_joint_trajectory_synchronization.hpp.

parseDistortionModel()​

tl::expected< DistortionModel, std::string > moveit_pro::behaviors::internal::parseDistortionModel (std::string_view requested, std::string_view declared)

Resolve the distortion_model port: "auto", or an empty value as the editor writes for a cleared port, follows the model the camera declares (plumb_bob when it declares none); "plumb_bob" and "rational_polynomial" force one. The declared model must already be empty or one of those two, as toCameraIntrinsics checks.

Definition at line 134 of file calibrate_camera_intrinsics.cpp.

policyResponseFailureMessage()​

std::string moveit_pro::behaviors::internal::policyResponseFailureMessage (const moveit_pro_ml_msgs::srv::GetActionChunk::Response & response)

Render a response classified kFailed as the run's failure reason.

An unset or contract-undefined status gets its own text naming the adapter-side bug; ERROR reports the response's message as the reason.

Parameters
response

The policy response that failed the run.

Returns

The operator-facing failure reason.

Definition at line 509 of file execute_policy.cpp.

refinementSummary()​

std::string moveit_pro::behaviors::internal::refinementSummary (const moveit_pro::hand_eye_calibration::BundleAdjustmentResult & result, double outlier_threshold_px)

The info line for a refinement outcome: how many camera poses were refined and how well the board corners fit the images before and after. The average can rise only when a positive outlier_threshold_px stops outlier corners from being fitted, and the line says so.

Definition at line 62 of file refine_calibration_bundle_adjustment.cpp.

refinementWarning()​

std::optional< std::string > moveit_pro::behaviors::internal::refinementWarning (const moveit_pro::hand_eye_calibration::BundleAdjustmentResult & result, double rms_reprojection_warn_px)

The warning a refinement outcome deserves, or nullopt when it deserves none. Warned outcomes are a solver that stopped before converging and a fit still above rms_reprojection_warn_px.

Definition at line 94 of file refine_calibration_bundle_adjustment.cpp.

stopRecordingUnderLock()​

template <typename Lockable, typename StopTransition>
void moveit_pro::behaviors::internal::stopRecordingUnderLock (Lockable & mutex, StopTransition && set_stopped)

Performs the stop transition while holding the mutex shared with trajectory mutation.

Definition at line 17 of file record_joint_trajectory_synchronization.hpp.

takeSam3Result()​

tl::expected< moveit_pro_ml::SAM3DetectResult, std::string > moveit_pro::behaviors::internal::takeSam3Result (tl::expected< moveit_pro_ml::SAM3DetectResult, moveit_pro_ml::InferenceError > && result)

Adapt inference errors for the Behavior while transferring ownership of successful mask and score buffers.

Declaration at line 134 of file get_masks_2d_from_exemplar.hpp, definition at line 534 of file get_masks_2d_from_exemplar.cpp.

toBoardConfig()​

moveit_pro::hand_eye_calibration::CharucoBoardConfig moveit_pro::behaviors::internal::toBoardConfig (const moveit_studio_msgs::msg::CharucoBoard & board)

Convert a CharucoBoard message into the board description the calibration library consumes.

Clamps the square counts to what an int holds and copies the rest. The library validates the geometry when it builds the board.

Parameters
board

The board message from a Behavior port.

Returns

The library board description.

Definition at line 79 of file hand_eye_calibration_common.cpp.

toCameraIntrinsics()​

tl::expected< moveit_pro::hand_eye_calibration::CameraIntrinsics, std::string > moveit_pro::behaviors::internal::toCameraIntrinsics (const sensor_msgs::msg::CameraInfo & camera_info)

Extract the pinhole intrinsics the calibration library consumes from a CameraInfo message.

Uses the K matrix and the raw distortion coefficients, matching how the detections are made on the unrectified image.

Parameters
camera_info

The camera's intrinsics message.

Returns

The library intrinsics, or an error when the focal lengths are not positive, the distortion model is not plumb_bob, rational_polynomial, or empty, the coefficient count does not match the declared model, or coefficients are carried with no declared model.

Definition at line 27 of file hand_eye_calibration_common.cpp.

Variables​

kLatencyWindowSize​

constexpr std::size_t moveit_pro::behaviors::internal::kLatencyWindowSize = 5
constexpr

Definition at line 102 of file execute_policy.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.