moveit2
The MoveIt Motion Planning Framework for ROS 2.
|
A cache insertion policy that always decides to insert and never decides to prune for motion plan requests. More...
#include <always_insert_never_prune_policy.hpp>
Public Member Functions | |
AlwaysInsertNeverPrunePolicy () | |
std::string | getName () const override |
Gets the name of the cache insert policy. | |
moveit::core::MoveItErrorCode | checkCacheInsertInputs (const moveit::planning_interface::MoveGroupInterface &move_group, const warehouse_ros::MessageCollection< moveit_msgs::msg::RobotTrajectory > &coll, const moveit_msgs::msg::MotionPlanRequest &key, const moveit::planning_interface::MoveGroupInterface::Plan &value) override |
Checks inputs to the cache insert call to see if we should abort instead. | |
std::vector< warehouse_ros::MessageWithMetadata< moveit_msgs::msg::RobotTrajectory >::ConstPtr > | fetchMatchingEntries (const moveit::planning_interface::MoveGroupInterface &move_group, const warehouse_ros::MessageCollection< moveit_msgs::msg::RobotTrajectory > &coll, const moveit_msgs::msg::MotionPlanRequest &key, const moveit::planning_interface::MoveGroupInterface::Plan &value, double exact_match_precision) override |
Fetches all "matching" cache entries for comparison for pruning. | |
bool | shouldPruneMatchingEntry (const moveit::planning_interface::MoveGroupInterface &move_group, const moveit_msgs::msg::MotionPlanRequest &key, const moveit::planning_interface::MoveGroupInterface::Plan &value, const warehouse_ros::MessageWithMetadata< moveit_msgs::msg::RobotTrajectory >::ConstPtr &matching_entry, std::string *reason=nullptr) override |
bool | shouldInsert (const moveit::planning_interface::MoveGroupInterface &move_group, const moveit_msgs::msg::MotionPlanRequest &key, const moveit::planning_interface::MoveGroupInterface::Plan &value, std::string *reason=nullptr) override |
Returns whether the insertion candidate should be inserted into the cache. | |
moveit::core::MoveItErrorCode | appendInsertMetadata (warehouse_ros::Metadata &metadata, const moveit::planning_interface::MoveGroupInterface &move_group, const moveit_msgs::msg::MotionPlanRequest &key, const moveit::planning_interface::MoveGroupInterface::Plan &value) override |
Appends the insert metadata with the features supported by the policy. | |
void | reset () override |
Resets the state of the policy. | |
![]() | |
virtual | ~CacheInsertPolicyInterface ()=default |
virtual bool | shouldPruneMatchingEntry (const moveit::planning_interface::MoveGroupInterface &move_group, const moveit_msgs::msg::MotionPlanRequest &key, const moveit::planning_interface::MoveGroupInterface::Plan &value, const typename warehouse_ros::MessageWithMetadata< moveit_msgs::msg::RobotTrajectory >::ConstPtr &matching_entry, std::string *reason)=0 |
Returns whether a matched cache entry should be pruned. | |
Static Public Member Functions | |
static std::vector< std::unique_ptr< FeaturesInterface< moveit_msgs::msg::MotionPlanRequest > > > | getSupportedFeatures (double start_tolerance, double goal_tolerance) |
Configures and returns a vector of feature extractors that can be used with this policy. | |
A cache insertion policy that always decides to insert and never decides to prune for motion plan requests.
Supported Metadata and Features ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Appends the following additional metadata, which can be used for querying and sorting:
Usable with the motion plan request features:
Matches, Pruning, and Insertion ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A matching cache entry is one that exactly matches on every one of the features above.
The sort order is ordered on execution_time_s in ascending order (so loweest execution time first). This policy never indicates that pruning should happen, and always indicates that insertion should happen.
Definition at line 75 of file always_insert_never_prune_policy.hpp.
moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy::AlwaysInsertNeverPrunePolicy | ( | ) |
Definition at line 74 of file always_insert_never_prune_policy.cpp.
|
overridevirtual |
Appends the insert metadata with the features supported by the policy.
See notes in docstrings regarding the feature contract.
[in,out] | metadata. | The metadata to add features to. |
[in] | move_group. | The manipulator move group, used to get its state. |
[in] | key. | The object used to key the insertion candidate with. |
[in] | value. | The object that the TrajectoryCache was passed to insert. |
Definition at line 192 of file always_insert_never_prune_policy.cpp.
|
overridevirtual |
Checks inputs to the cache insert call to see if we should abort instead.
[in] | move_group. | The manipulator move group, used to get its state. |
[in] | coll. | The cache database to fetch messages from. |
[in] | key. | The object used to key the insertion candidate with. |
[in] | value. | The object that the TrajectoryCache was passed to insert. |
Definition at line 104 of file always_insert_never_prune_policy.cpp.
|
overridevirtual |
Fetches all "matching" cache entries for comparison for pruning.
This method should be assumed to only return the message metadata without the underlying message data.
The policy should also make the decision about how to sort them. The order in which cache entries are presented to the shouldPruneMatchingEntry will be the order of cache entries returned by this function.
[in] | move_group. | The manipulator move group, used to get its state. |
[in] | coll. | The cache database to fetch messages from. |
[in] | key. | The object used to key the insertion candidate with. |
[in] | value. | The object that the TrajectoryCache was passed to insert. |
[in] | exact_match_precision. | Tolerance for float precision comparison for what counts as an exact match. |
Definition at line 153 of file always_insert_never_prune_policy.cpp.
|
overridevirtual |
Gets the name of the cache insert policy.
Definition at line 99 of file always_insert_never_prune_policy.cpp.
|
static |
Configures and returns a vector of feature extractors that can be used with this policy.
Definition at line 81 of file always_insert_never_prune_policy.cpp.
|
overridevirtual |
Resets the state of the policy.
Definition at line 212 of file always_insert_never_prune_policy.cpp.
|
overridevirtual |
Returns whether the insertion candidate should be inserted into the cache.
NOTE: The TrajectoryCache class executes the insert, but this class informs it on whether the insert should happen or not.
[in] | move_group. | The manipulator move group, used to get its state. |
[in] | key. | The object used to key the insertion candidate with. |
[in] | value. | The object that the TrajectoryCache was passed to insert. |
[out] | reason. | The reason for the returned result. |
Definition at line 181 of file always_insert_never_prune_policy.cpp.
|
override |
Definition at line 169 of file always_insert_never_prune_policy.cpp.