Runs one inference of a policy that produces trajectory chunks.
Hidden behind an interface so the production service client and a test double share one seam. The caller fills the request observation and real-time-chunking carryover; the producer returns the next chunk. A failed return means the call itself could not complete, which is distinct from a successful call whose response reports the policy has no more actions.
| virtual tl::expected< void, std::string > moveit_pro::behaviors::ActionChunkProducerInterface::warmup |
( |
const GetActionChunk::Request & |
| ) |
|
|
inlinevirtual |
Exercise the full policy round-trip once before the run's clock starts.
Sends one throwaway inference so the first getActionChunk() on the run timeline does not pay the cold cost of establishing the request/response path (service discovery and the transport's first-message endpoint matching, which is seconds on a fresh connection). Paid on the timeline, that cost stalls the first chunk so it lands in the controller's past with nothing to stitch, and inflates the latency estimate that places every later seam. The request is shaped like a first inference (new_episode set) and its response is discarded. The default does nothing, which suits an in-process producer with no transport to warm.
- Parameters
-
| sample_request | A representative first-inference request used only to drive the round-trip. |
- Returns
- An error if the policy cannot be reached, otherwise success.