Skip to main content

PolicyRunGuard Class

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

Declaration​

class moveit_pro::behaviors::internal::PolicyRunGuard { ... }

Included Headers​

#include <policy.hpp>

Public Member Functions Index​

tl::expected< Lease, std::string >acquire ()

Private Member Attributes Index​

std::shared_ptr< std::atomic_bool >busy_ = std::make_shared<std::atomic_bool>(false)

Description​

Admits one run at a time on a policy handle.

Runs that share a handle, such as two ExecutePolicy Behaviors under a Parallel node, would otherwise interleave inferences and real-time-chunking state on one policy, so the second run fails busy instead.

Definition at line 60 of file policy.hpp.

Public Member Functions​

acquire()​

tl::expected< PolicyRunGuard::Lease, std::string > moveit_pro::behaviors::internal::PolicyRunGuard::acquire ()
Returns

A lease, or the busy diagnostic while another lease from this guard is alive.

Declaration at line 81 of file policy.hpp, definition at line 64 of file policy.cpp.

Private Member Attributes​

busy_​

std::shared_ptr<std::atomic_bool> moveit_pro::behaviors::internal::PolicyRunGuard::busy_ = std::make_shared<std::atomic_bool>(false)

Definition at line 84 of file policy.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.