moveit2
The MoveIt Motion Planning Framework for ROS 2.
|
#include <cache_insert_policy_interface.hpp>
Public Member Functions | |
virtual | ~CacheInsertPolicyInterface ()=default |
virtual std::string | getName () const =0 |
Gets the name of the cache insert policy. | |
virtual moveit::core::MoveItErrorCode | checkCacheInsertInputs (const moveit::planning_interface::MoveGroupInterface &move_group, const warehouse_ros::MessageCollection< CacheEntryT > &coll, const KeyT &key, const ValueT &value)=0 |
Checks inputs to the cache insert call to see if we should abort instead. | |
virtual std::vector< typename warehouse_ros::MessageWithMetadata< CacheEntryT >::ConstPtr > | fetchMatchingEntries (const moveit::planning_interface::MoveGroupInterface &move_group, const warehouse_ros::MessageCollection< CacheEntryT > &coll, const KeyT &key, const ValueT &value, double exact_match_precision)=0 |
Fetches all "matching" cache entries for comparison for pruning. | |
virtual bool | shouldPruneMatchingEntry (const moveit::planning_interface::MoveGroupInterface &move_group, const KeyT &key, const ValueT &value, const typename warehouse_ros::MessageWithMetadata< CacheEntryT >::ConstPtr &matching_entry, std::string *reason)=0 |
Returns whether a matched cache entry should be pruned. | |
virtual bool | shouldInsert (const moveit::planning_interface::MoveGroupInterface &move_group, const KeyT &key, const ValueT &value, std::string *reason)=0 |
Returns whether the insertion candidate should be inserted into the cache. | |
virtual moveit::core::MoveItErrorCode | appendInsertMetadata (warehouse_ros::Metadata &metadata, const moveit::planning_interface::MoveGroupInterface &move_group, const KeyT &key, const ValueT &value)=0 |
Appends the insert metadata with the features supported by the policy. | |
virtual void | reset ()=0 |
Resets the state of the policy. | |
Definition at line 123 of file cache_insert_policy_interface.hpp.
|
virtualdefault |
|
pure virtual |
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. |
Implemented in moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::BestSeenExecutionTimePolicy, moveit_ros::trajectory_cache::CartesianAlwaysInsertNeverPrunePolicy, and moveit_ros::trajectory_cache::CartesianBestSeenExecutionTimePolicy.
|
pure virtual |
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. |
Implemented in moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::BestSeenExecutionTimePolicy, moveit_ros::trajectory_cache::CartesianAlwaysInsertNeverPrunePolicy, and moveit_ros::trajectory_cache::CartesianBestSeenExecutionTimePolicy.
|
pure virtual |
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. |
Implemented in moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::BestSeenExecutionTimePolicy, moveit_ros::trajectory_cache::CartesianAlwaysInsertNeverPrunePolicy, and moveit_ros::trajectory_cache::CartesianBestSeenExecutionTimePolicy.
|
pure virtual |
Gets the name of the cache insert policy.
Implemented in moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::CartesianAlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::BestSeenExecutionTimePolicy, and moveit_ros::trajectory_cache::CartesianBestSeenExecutionTimePolicy.
|
pure virtual |
Resets the state of the policy.
Implemented in moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::CartesianAlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::BestSeenExecutionTimePolicy, and moveit_ros::trajectory_cache::CartesianBestSeenExecutionTimePolicy.
|
pure virtual |
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. |
Implemented in moveit_ros::trajectory_cache::AlwaysInsertNeverPrunePolicy, moveit_ros::trajectory_cache::BestSeenExecutionTimePolicy, moveit_ros::trajectory_cache::CartesianAlwaysInsertNeverPrunePolicy, and moveit_ros::trajectory_cache::CartesianBestSeenExecutionTimePolicy.
|
pure virtual |
Returns whether a matched cache entry should be pruned.
NOTE: The TrajectoryCache class also has some top-level logic to preserve cache entries that would have been pruned.
[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. |
[in] | matching_entry. | The matched cache entry to be possibly pruned. |
[out] | reason. | The reason for the returned result. |