Function moveit_ros::trajectory_cache::appendRobotStateJointStateAsFetchQueryWithTolerance

Function Documentation

moveit::core::MoveItErrorCode moveit_ros::trajectory_cache::appendRobotStateJointStateAsFetchQueryWithTolerance(warehouse_ros::Query &query, const moveit_msgs::msg::RobotState &robot_state, const moveit::planning_interface::MoveGroupInterface &move_group, double match_tolerance, const std::string &prefix)

Extracts relevant features from a vector of moveit_msgs::msg::Constraints messages to a fetch query, with tolerance.

This will extract relevant features from the joint, position, and orientation constraints per element. This exists because many keyable messages contain constraints which should be handled similarly.

WARNING: Visibility constraints are not supported.

Additionally, the component constraints within each vector element are sorted to reduce cache cardinality. For the same reason, constraints with frames are restated in terms of the workspace frame.

We copy the input constraints to support this.

Parameters:
  • query.[inout] The query to add features to.

  • robot_state.[in] The robot state to extract features from.

  • move_group.[in] The manipulator move group, used to get its state.

  • prefix.[in] A prefix to add to feature keys.

Returns:

moveit::core::MoveItErrorCode::SUCCESS if successfully appended. Otherwise, will return a different error code, in which case the query should not be reused.