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​

structBaseJogSettings

The robot config's moveit_params.base_jog settings that BaseJog uses. More...

classLatencyWindow

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

structResolvedJtacController

A joint_trajectory entry of the controllers list, resolved against the robot model. More...

structResolvedGripperController

A gripper_command entry of the controllers list. More...

structResolvedPolicyControllers

The controllers a policy run commands. More...

structJtacParameters
structRoutedPolicyChunk

A policy chunk routed to the controllers by joint name. More...

structEndEffectorPoseConfig
classInProcessActionChunkProducer

Runs a policy that answers in process, without blocking the streaming loop. More...

structGripperLimits

A joint and its values in the robot's SRDF open and closed states. More...

structLoadedPi05Policy
structPlanarPoint

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

structSam3ModelPorts
structSam2AutomaskModelPorts
classPolicyRunGuard

Admits one run at a time on a policy handle. More...

classMotionApproval

Everything the motion approval gate needs from its process: whether an app is asking for approval, where an operator's answer is delivered, and the two ROS entities that feed them. More...

classPreviewApproval
classMPCBehaviorBase

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

Typedefs Index​

usingPi05PolicyLoader = std::function< tl::expected< LoadedPi05Policy, std::string >(const std::filesystem::path &)>

Enumerations Index​

enum classPolicyResponseOutcome { ... }

Functions Index​

geometry_msgs::msg::TwistclampPlanarTwist (const geometry_msgs::msg::TwistStamped &command, double max_linear_velocity, double max_angular_velocity)

Converts a jog command into a planar base twist: only linear x and angular z, each clamped to its limit. More...

tl::expected< BaseJogSettings, std::string >readBaseJogSettings (rclcpp::Node &node)

Reads the base_jog.* parameters the objective server was launched with, declaring each on first use. 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...

tl::expected< moveit_pro_ml_msgs::msg::PolicyControllers, std::string >controllersFromDeprecatedPorts (const std::string &joint_group_name, const std::string &controller_action_name, const std::vector< double > &absolute_force_torque_threshold, const std::string &gripper_command_action_name, const std::string &gripper_joint_name)

Build the controllers list the deprecated ports describe: one joint_trajectory entry and, when the gripper ports are set, one gripper_command entry. More...

tl::expected< ResolvedPolicyControllers, std::string >resolvePolicyControllers (const moveit_pro_ml_msgs::msg::PolicyControllers &controllers, const base::RobotModel &robot_model)

Check a controllers list against the robot model and resolve each entry's joints. More...

const std::vector< std::string > &jtacRequiredParameterNames ()

The parameters ExecutePolicy needs from every controller, in the order readJtacParameters requests them. More...

const std::vector< std::string > &jtacDeprecatedParameterNames ()
tl::expected< JtacParameters, std::string >jtacParametersFromValues (const std::string &controller_name, std::size_t num_joints, const std::vector< rcl_interfaces::msg::ParameterValue > &required_values, const std::vector< rcl_interfaces::msg::ParameterValue > &deprecated_values)

Fold the parameter values a controller returned into JtacParameters. More...

tl::expected< JtacParameters, std::string >readJtacParameters (const std::shared_ptr< rclcpp::Node > &node, const ResolvedJtacController &jtac, const std::stop_token &stop_token, std::chrono::duration< double > timeout)

Read a joint_trajectory entry's controller parameters through its get_parameters service. More...

tl::expected< void, std::string >checkJtacParameters (const ResolvedJtacController &jtac, const JtacParameters &parameters)

Check a joint_trajectory entry against its controller's parameters. More...

std::vector< moveit_pro_controllers_msgs::msg::AdmittanceParameters >buildAdmittanceSets (const ResolvedJtacController &jtac, const JtacParameters &parameters)

Build the admittance sets a joint_trajectory entry sends: one per sensor frame of its controller, each labeled with the matching end-effector frame and carrying the entry's force-torque threshold. No axis is compliant. More...

tl::expected< RoutedPolicyChunk, std::string >routePolicyChunk (const trajectory_msgs::msg::JointTrajectory &chunk, const std::vector< std::string > &jtac_joint_names, const std::vector< std::string > &gripper_joint_names, bool allow_unnamed)

Route a policy chunk's joints to the controllers by name. More...

tl::expected< RoutedPolicyChunk, std::string >routePolicyChunk (const trajectory_msgs::msg::JointTrajectory &chunk, const std::vector< std::string > &jtac_joint_names, const std::vector< std::string > &gripper_joint_names, const std::vector< std::string > &solved_joint_names, std::size_t pose_steps)

Route a policy chunk for an end-effector pose run, where inverse kinematics solves some trajectory joints. More...

tl::expected< std::optional< EndEffectorPoseConfig >, std::string >resolveEndEffectorPoses (const std::vector< std::string > &ee_link_names, const std::string &group_name, const std::string &reference_frame, const ResolvedPolicyControllers &controllers, bool policy_uses_real_time_chunking, const base::RobotModel &robot_model)

Resolve and check the end-effector pose ports against the robot model and the run's trajectory joints. More...

std::vector< geometry_msgs::msg::PoseStamped >currentEndEffectorPoses (base::RobotState &robot_state, const EndEffectorPoseConfig &ee_poses)

The pose of each end-effector link in the reference frame, from forward kinematics of the given state. More...

tl::expected< std::vector< geometry_msgs::msg::PoseArray >, std::string >checkEndEffectorPoseTrajectories (const std::vector< std::string > &response_link_names, const std::vector< geometry_msgs::msg::PoseArray > &ee_pose_trajectories, const std::optional< EndEffectorPoseConfig > &ee_poses)

Check a response's end-effector pose trajectories against the run's end-effector pose configuration. More...

tl::expected< void, std::string >solveEndEffectorPoseWindow (base::RobotState &robot_state, const EndEffectorPoseConfig &ee_poses, const std::vector< geometry_msgs::msg::PoseArray > &ee_pose_trajectories, const Eigen::VectorXd &seam_positions, std::int64_t first_step, std::size_t num_steps, Eigen::MatrixXd &jtac_positions)

Solve the IK group's joints for the committed window of an end-effector pose chunk. More...

doubleinverseKinematicsSeamLead (bool ee_pose_run, double last_ik_solve_seconds)

The time an end-effector pose run's seam adds to its lead for the inverse kinematics that runs after the seam is chosen. More...

tl::expected< coverage_path::ProjectionMode, std::string >parseProjectionMode (std::string_view name)

Parse the projection_mode port: PLANAR or SURFACE, case-insensitive. 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...

std::optional< GripperLimits >findGripperLimits (const moveit_pro::base::RobotModel &model)

Find the gripper in a robot's SRDF: the first joint that differs between a group's open and closed states. More...

tl::expected< double, std::string >gripPosition (const GripperLimits &limits, const sensor_msgs::msg::JointState &state)

Read the gripper's position from a joint state: the mean over its joint and those set like it that the state has, so what is held off the hand's middle reads the same as what is held at it. More...

boolstoppedBetweenLimits (const GripperLimits &limits, double position)

Whether a gripper stopped between its limits, as fingers do when they close on an object. More...

tl::expected< void, std::string >setStartStateFromScene (const moveit_msgs::msg::RobotState &scene_state, const moveit_pro::base::JointModelGroup &group, moveit_pro::base::RobotState &robot_state)

Set robot_state to the planning scene's robot state, including multi-DOF joints and the robot pose. More...

tl::expected< void, std::string >checkTimingSupportsGroup (const moveit_pro::base::JointModelGroup &group, bool use_trapezoidal)

Reject Cartesian trapezoidal timing for a planning group that contains the robot's mobile base. More...

PolicyHandlemakeInProcessPi05Policy (InProcessActionChunkProducer::Predict predict, bool supports_real_time_chunking=false)
PolicyHandlemakeGetActionChunkPolicy (const std::shared_ptr< rclcpp::Node > &node, const std::string &service_name)
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...

std::optional< std::string >firstStageFailure (const moveit_pro::task_constructor::Task &task)

Why a planned MTC Task found no solution, in its stages' own words. 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)
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...

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
constexpr autokServiceConnectTimeout = std::chrono::seconds(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.

Typedefs​

Pi05PolicyLoader​

using moveit_pro::behaviors::internal::Pi05PolicyLoader = std::function<tl::expected<LoadedPi05Policy, std::string>(const std::filesystem::path&)>

Definition at line 26 of file load_pi05_policy.hpp.

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 24 of file policy.hpp.

Functions​

buildAdmittanceSets()​

std::vector< moveit_pro_controllers_msgs::msg::AdmittanceParameters > moveit_pro::behaviors::internal::buildAdmittanceSets (const ResolvedJtacController & jtac, const JtacParameters & parameters)
nodiscard

Build the admittance sets a joint_trajectory entry sends: one per sensor frame of its controller, each labeled with the matching end-effector frame and carrying the entry's force-torque threshold. No axis is compliant.

Parameters
jtac

The entry.

parameters

Its controller's parameters, already checked by checkJtacParameters.

Returns

One set per sensor frame.

Definition at line 1004 of file execute_policy.cpp.

checkEndEffectorPoseTrajectories()​

tl::expected< std::vector< geometry_msgs::msg::PoseArray >, std::string > moveit_pro::behaviors::internal::checkEndEffectorPoseTrajectories (const std::vector< std::string > & response_link_names, const std::vector< geometry_msgs::msg::PoseArray > & ee_pose_trajectories, const std::optional< EndEffectorPoseConfig > & ee_poses)
nodiscard

Check a response's end-effector pose trajectories against the run's end-effector pose configuration.

Parameters
response_link_names

The response's ee_link_names, one per trajectory.

ee_pose_trajectories

The response's ee_pose_trajectories.

ee_poses

The run's end-effector pose configuration; std::nullopt for a joint-space run.

Returns

The trajectories in ee_link_names order, none for a joint-space run, or an error when a joint-space run gets poses, the names are not one per trajectory or not the links of ee_link_names, a trajectory's frame is not ee_reference_frame, a trajectory has another step count than the first, a pose is not finite, or a quaternion's norm is more than 1e-3 from one. The solve normalizes the quaternions it accepts.

Definition at line 1410 of file execute_policy.cpp.

checkJtacParameters()​

tl::expected< void, std::string > moveit_pro::behaviors::internal::checkJtacParameters (const ResolvedJtacController & jtac, const JtacParameters & parameters)
nodiscard

Check a joint_trajectory entry against its controller's parameters.

The controller must control the entry's joint group, play goals at 100% of their speed, and name as many end-effector frames as sensor frames.

Parameters
jtac

The entry.

parameters

Its controller's parameters.

Returns

Nothing, or an error naming the controller, the parameter, its value and the value expected.

Definition at line 910 of file execute_policy.cpp.

checkTimingSupportsGroup()​

tl::expected< void, std::string > moveit_pro::behaviors::internal::checkTimingSupportsGroup (const moveit_pro::base::JointModelGroup & group, bool use_trapezoidal)
nodiscard

Reject Cartesian trapezoidal timing for a planning group that contains the robot's mobile base.

Trapezoidal timing limits the speed of the tip path that forward kinematics gives at the start robot pose, which leaves out the base motion, so such a group supports only time-optimal timing.

Parameters
group

The planning group to plan for.

use_trapezoidal

Whether the path is timed with the Cartesian trapezoidal velocity profile.

Returns

Nothing for time-optimal timing or a group without the mobile base, or a message naming the group and the base.

Declaration at line 184 of file plan_cartesian_path.hpp, definition at line 468 of file plan_cartesian_path.cpp.

clampPlanarTwist()​

geometry_msgs::msg::Twist moveit_pro::behaviors::internal::clampPlanarTwist (const geometry_msgs::msg::TwistStamped & command, double max_linear_velocity, double max_angular_velocity)
nodiscard

Converts a jog command into a planar base twist: only linear x and angular z, each clamped to its limit.

A non-finite component yields zero. All other components are zero.

Parameters
command

Jog command as published by the MoveIt Pro Desktop App.

max_linear_velocity

Largest allowed magnitude of linear x, in m/s. Must be finite and greater than 0.

max_angular_velocity

Largest allowed magnitude of angular z, in rad/s. Must be finite and greater than 0.

Definition at line 102 of file base_jog.cpp.

classifyPolicyResponse()​

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

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 13 of file policy.cpp.

controllersFromDeprecatedPorts()​

tl::expected< moveit_pro_ml_msgs::msg::PolicyControllers, std::string > moveit_pro::behaviors::internal::controllersFromDeprecatedPorts (const std::string & joint_group_name, const std::string & controller_action_name, const std::vector< double > & absolute_force_torque_threshold, const std::string & gripper_command_action_name, const std::string & gripper_joint_name)
nodiscard

Build the controllers list the deprecated ports describe: one joint_trajectory entry and, when the gripper ports are set, one gripper_command entry.

Parameters
joint_group_name

The deprecated joint_group_name port.

controller_action_name

The deprecated controller_action_name port.

absolute_force_torque_threshold

The deprecated absolute_force_torque_threshold port.

gripper_command_action_name

The deprecated gripper_command_action_name port.

gripper_joint_name

The deprecated gripper_joint_name port.

Returns

The list, or an error when only one of the two gripper ports is set.

Definition at line 523 of file execute_policy.cpp.

convexHull()​

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

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.

currentEndEffectorPoses()​

std::vector< geometry_msgs::msg::PoseStamped > moveit_pro::behaviors::internal::currentEndEffectorPoses (base::RobotState & robot_state, const EndEffectorPoseConfig & ee_poses)
nodiscard

The pose of each end-effector link in the reference frame, from forward kinematics of the given state.

Parameters
robot_state

The state to read, set to the observed joint positions.

ee_poses

The run's end-effector pose configuration.

Returns

One pose per link, in ee_link_names order, each stamped with the reference frame.

Definition at line 1392 of file execute_policy.cpp.

exceedsPositionLimitTolerance()​

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

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 439 of file execute_policy.cpp.

findGripperLimits()​

std::optional< GripperLimits > moveit_pro::behaviors::internal::findGripperLimits (const moveit_pro::base::RobotModel & model)
nodiscard

Find the gripper in a robot's SRDF: the first joint that differs between a group's open and closed states.

Parameters
model

The robot model.

Returns

The joint and its two values, or nothing unless exactly one group has both states.

Definition at line 92 of file is_gripper_holding.cpp.

firstStageFailure()​

std::optional< std::string > moveit_pro::behaviors::internal::firstStageFailure (const moveit_pro::task_constructor::Task & task)
nodiscard

Why a planned MTC Task found no solution, in its stages' own words.

The first stage in task order that has no solution and keeps a failure, as "<stage>: <comment>", where the comment is that stage's first failure's. A wrapper stage such as ComputeIK keeps the failures it records itself, as "eef in collision: <a> - <b>", which Task::explainFailure passes over for its wrapped child's. Stages keep their failures only while the task's introspection is on.

Parameters
task

A Task that has been planned.

Returns

The explanation, or std::nullopt where no stage keeps a failure.

Definition at line 73 of file explain_mtc_task_failure.cpp.

gripPosition()​

tl::expected< double, std::string > moveit_pro::behaviors::internal::gripPosition (const GripperLimits & limits, const sensor_msgs::msg::JointState & state)
nodiscard

Read the gripper's position from a joint state: the mean over its joint and those set like it that the state has, so what is held off the hand's middle reads the same as what is held at it.

Parameters
limits

The gripper's joint, the joints set like it, and their open and closed values.

state

The robot's joint state.

Returns

The position, or why the state does not give one.

Definition at line 111 of file is_gripper_holding.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)
nodiscard

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)
nodiscard

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.

inverseKinematicsSeamLead()​

double moveit_pro::behaviors::internal::inverseKinematicsSeamLead (bool ee_pose_run, double last_ik_solve_seconds)
nodiscard

The time an end-effector pose run's seam adds to its lead for the inverse kinematics that runs after the seam is chosen.

Twice the last solve time keeps a solve slower than the last from eating into the time the fit, the collision check, and the send need before the seam, which would discard the chunk.

Parameters
ee_pose_run

True when the run solves end-effector poses.

last_ik_solve_seconds

How long the run's last solve took, zero before the first.

Returns

Twice the last solve time plus a fixed slack for an end-effector pose run, zero otherwise.

Definition at line 1600 of file execute_policy.cpp.

isInsideConvexHull()​

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

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)
nodiscard

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 33 of file generate_calibration_views.hpp, definition at line 84 of file generate_calibration_views.cpp.

jtacDeprecatedParameterNames()​

const std::vector< std::string > & moveit_pro::behaviors::internal::jtacDeprecatedParameterNames ()
nodiscard

The deprecated single-value parameters, in the order readJtacParameters requests them. A controller that declares none of them answers with no values, which reads as all of them unset.

Definition at line 781 of file execute_policy.cpp.

jtacParametersFromValues()​

tl::expected< JtacParameters, std::string > moveit_pro::behaviors::internal::jtacParametersFromValues (const std::string & controller_name, std::size_t num_joints, const std::vector< rcl_interfaces::msg::ParameterValue > & required_values, const std::vector< rcl_interfaces::msg::ParameterValue > & deprecated_values)
nodiscard

Fold the parameter values a controller returned into JtacParameters.

A list form wins over its deprecated single-value form when non-empty, as the controller itself decides: sensor_frames over sensor_frame, ee_frames over ee_frame, ft_sensor_names over ft_sensor_name, and default_goal_tolerances over default_goal_tolerance.

Parameters
controller_name

The controller, named in errors.

num_joints

The controller's joint count, which a per-joint tolerance list must match.

required_values

One value per name in jtacRequiredParameterNames(), in that order. A controller that does not declare one of them answers with no values.

deprecated_values

One value per name in jtacDeprecatedParameterNames(), in that order, or none.

Returns

The parameters, or an error naming the controller and a parameter that is missing or has the wrong type.

Definition at line 831 of file execute_policy.cpp.

jtacRequiredParameterNames()​

const std::vector< std::string > & moveit_pro::behaviors::internal::jtacRequiredParameterNames ()
nodiscard

The parameters ExecutePolicy needs from every controller, in the order readJtacParameters requests them.

Definition at line 769 of file execute_policy.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)
nodiscard

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

Declaration at line 138 of file get_masks_2d_from_exemplar.hpp, definition at line 517 of file get_masks_2d_from_exemplar.cpp.

makeGetActionChunkPolicy()​

PolicyHandle moveit_pro::behaviors::internal::makeGetActionChunkPolicy (const std::shared_ptr< rclcpp::Node > & node, const std::string & service_name)
nodiscard

Definition at line 247 of file policy_adapters.cpp.

makeInProcessPi05Policy()​

PolicyHandle moveit_pro::behaviors::internal::makeInProcessPi05Policy (InProcessActionChunkProducer::Predict predict, bool supports_real_time_chunking=false)
nodiscard

Definition at line 241 of file policy_adapters.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)
nodiscard

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 152 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)
nodiscard

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)
nodiscard

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.

parseProjectionMode()​

tl::expected< coverage_path::ProjectionMode, std::string > moveit_pro::behaviors::internal::parseProjectionMode (std::string_view name)
nodiscard

Parse the projection_mode port: PLANAR or SURFACE, case-insensitive.

Definition at line 146 of file generate_surface_coverage_path.cpp.

policyResponseFailureMessage()​

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

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 29 of file policy.cpp.

readBaseJogSettings()​

tl::expected< BaseJogSettings, std::string > moveit_pro::behaviors::internal::readBaseJogSettings (rclcpp::Node & node)
nodiscard

Reads the base_jog.* parameters the objective server was launched with, declaring each on first use.

A config without a base_jog file leaves the parameters declared but unset.

Parameters
node

The objective server's node.

Returns

The settings, or an error naming what is missing, mistyped, or out of range: every limit must be finite and greater than 0.

Definition at line 111 of file base_jog.cpp.

readJtacParameters()​

tl::expected< JtacParameters, std::string > moveit_pro::behaviors::internal::readJtacParameters (const std::shared_ptr< rclcpp::Node > & node, const ResolvedJtacController & jtac, const std::stop_token & stop_token, std::chrono::duration< double > timeout)
nodiscard

Read a joint_trajectory entry's controller parameters through its get_parameters service.

Parameters
node

The node that calls the service, which an executor must spin.

jtac

The entry, whose controller_name names the controller node.

stop_token

Stops the wait when requested.

timeout

How long the whole read may take.

Returns

The parameters, or an error when the service does not answer in time, the read is stopped, or the controller does not declare a required parameter.

Definition at line 950 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)
nodiscard

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)
nodiscard

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.

resolveEndEffectorPoses()​

tl::expected< std::optional< EndEffectorPoseConfig >, std::string > moveit_pro::behaviors::internal::resolveEndEffectorPoses (const std::vector< std::string > & ee_link_names, const std::string & group_name, const std::string & reference_frame, const ResolvedPolicyControllers & controllers, bool policy_uses_real_time_chunking, const base::RobotModel & robot_model)
nodiscard

Resolve and check the end-effector pose ports against the robot model and the run's trajectory joints.

Fails when the group or the frame is set without ee_link_names, or ee_link_names without either; when the policy uses real-time chunking; when the group does not exist or contains a mobile base or a multi-DOF joint; when ee_link_names lists more than path_ik::kMaxNumTips links, a link twice, a link the robot model lacks, or a link no group joint moves; when a group joint is in no joint_trajectory entry; when a commanded joint outside the group, trajectory or gripper, lies between a link and its arm base; and when the reference frame is not a link of the robot model or a group joint moves it.

Parameters
ee_link_names

The ee_link_names port; empty runs joint space.

group_name

The ee_ik_group_name port.

reference_frame

The ee_reference_frame port.

controllers

The run's resolved controllers: its trajectory joints, gripper joints and clamp ranges.

policy_uses_real_time_chunking

The policy_uses_real_time_chunking port.

robot_model

The robot model.

Returns

std::nullopt for a joint-space run, the configuration for an end-effector pose run, or an error naming the port and the rule it breaks.

Definition at line 1194 of file execute_policy.cpp.

resolvePolicyControllers()​

tl::expected< ResolvedPolicyControllers, std::string > moveit_pro::behaviors::internal::resolvePolicyControllers (const moveit_pro_ml_msgs::msg::PolicyControllers & controllers, const base::RobotModel & robot_model)
nodiscard

Check a controllers list against the robot model and resolve each entry's joints.

Applies validatePolicyControllersShape, then requires each joint group and gripper joint to exist, each gripper joint to be single-DOF, each joint to belong to one entry only, each action to end in /follow_joint_trajectory, each joint_tolerances group to lie inside its entry's group with each joint in one such group at most, and each clamped_joint_groups group to lie inside its entry's group with each joint single-DOF and position-limited.

Parameters
controllers

The list, which must not be empty.

robot_model

The robot model the groups and joints are looked up in.

Returns

The resolved controllers, or an error naming the entry and the rule it breaks.

Definition at line 668 of file execute_policy.cpp.

routePolicyChunk()​

tl::expected< RoutedPolicyChunk, std::string > moveit_pro::behaviors::internal::routePolicyChunk (const trajectory_msgs::msg::JointTrajectory & chunk, const std::vector< std::string > & jtac_joint_names, const std::vector< std::string > & gripper_joint_names, bool allow_unnamed)
nodiscard

Route a policy chunk's joints to the controllers by name.

Each chunk joint must belong to exactly one controller, and every commanded joint must be in the chunk, so the chunk's joint order does not matter. A chunk without joint names is read in run order, which is only accepted when the run has no gripper and one trajectory controller.

Parameters
chunk

The policy chunk.

jtac_joint_names

The trajectory joints, defining the row order of jtac_positions.

gripper_joint_names

The gripper joints, in entry order.

allow_unnamed

Whether a chunk without joint names is read in run order.

Returns

The routed chunk, or an error if the chunk has no points, names a joint twice, carries a joint no controller commands, misses a commanded joint, or holds a non-finite or missing value.

Definition at line 1022 of file execute_policy.cpp.

routePolicyChunk()​

tl::expected< RoutedPolicyChunk, std::string > moveit_pro::behaviors::internal::routePolicyChunk (const trajectory_msgs::msg::JointTrajectory & chunk, const std::vector< std::string > & jtac_joint_names, const std::vector< std::string > & gripper_joint_names, const std::vector< std::string > & solved_joint_names, std::size_t pose_steps)
nodiscard

Route a policy chunk for an end-effector pose run, where inverse kinematics solves some trajectory joints.

As the overload without solved joints, except that the chunk must not name a solved joint, its rows in jtac_positions are left at zero for the caller to fill, and the chunk has pose_steps points. A chunk with no points is accepted when every commanded joint is solved, and then routes to pose_steps steps with every row at zero.

Parameters
chunk

The policy chunk.

jtac_joint_names

The trajectory joints, defining the row order of jtac_positions.

gripper_joint_names

The gripper joints, in entry order.

solved_joint_names

The trajectory joints inverse kinematics solves, which the chunk must not carry.

pose_steps

The policy steps the chunk's end-effector poses cover.

Returns

The routed chunk, or an error for any rule the other overload checks, a chunk that names a solved joint, or a step count that differs from pose_steps.

Definition at line 1130 of file execute_policy.cpp.

setStartStateFromScene()​

tl::expected< void, std::string > moveit_pro::behaviors::internal::setStartStateFromScene (const moveit_msgs::msg::RobotState & scene_state, const moveit_pro::base::JointModelGroup & group, moveit_pro::base::RobotState & robot_state)
nodiscard

Set robot_state to the planning scene's robot state, including multi-DOF joints and the robot pose.

Fails when group contains a multi-DOF joint, or the mobile base, that scene_state does not give in the model frame: the start pose of that joint, or the robot pose, would otherwise stay at the value robot_state held, and the plan would move the robot from there.

Parameters
scene_state

The robot state of the planning scene.

group

The planning group to plan for.

robot_state

The state to update. Its link transforms are up to date on success.

Returns

Nothing on success, or a message naming the missing joint or mobile base.

Declaration at line 169 of file plan_cartesian_path.hpp, definition at line 257 of file plan_cartesian_path.cpp.

solveEndEffectorPoseWindow()​

tl::expected< void, std::string > moveit_pro::behaviors::internal::solveEndEffectorPoseWindow (base::RobotState & robot_state, const EndEffectorPoseConfig & ee_poses, const std::vector< geometry_msgs::msg::PoseArray > & ee_pose_trajectories, const Eigen::VectorXd & seam_positions, std::int64_t first_step, std::size_t num_steps, Eigen::MatrixXd & jtac_positions)
nodiscard

Solve the IK group's joints for the committed window of an end-effector pose chunk.

The window starts at the seam, so its first step holds the seam positions, and the solve moves the links from there through the policy's poses for the window's later steps. The other trajectory joints, such as a torso, take each step's positions from jtac_positions. Each pose is expressed relative to its link's arm base at that step's positions. Columns outside the window get the seam positions in the IK rows; the executor does not play them.

Parameters
robot_state

Supplies the positions of the joints no controller commands; the trajectory joints are set here.

ee_poses

The run's end-effector pose configuration.

ee_pose_trajectories

The response's poses in ee_link_names order, from checkEndEffectorPoseTrajectories.

seam_positions

The trajectory joints' positions at the seam, in the order of ee_poses.jtac_joint_names.

first_step

The chunk step the window starts at, which the seam overwrites.

num_steps

The window's length, at least 1.

jtac_positions

The routed chunk, one row per ee_poses.jtac_joint_names, whose IK rows are filled in.

Returns

Nothing, or an error naming the chunk step and the link inverse kinematics could not follow.

Definition at line 1502 of file execute_policy.cpp.

stoppedBetweenLimits()​

bool moveit_pro::behaviors::internal::stoppedBetweenLimits (const GripperLimits & limits, double position)
nodiscard

Whether a gripper stopped between its limits, as fingers do when they close on an object.

Definition at line 147 of file is_gripper_holding.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)
nodiscard

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

Declaration at line 135 of file get_masks_2d_from_exemplar.hpp, definition at line 535 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)
nodiscard

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)
nodiscard

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​

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

Definition at line 78 of file execute_policy.hpp.

kServiceConnectTimeout​

auto moveit_pro::behaviors::internal::kServiceConnectTimeout = std::chrono::seconds(5)
constexpr

Definition at line 16 of file policy_adapters.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.15.0.