Class PoseTreeManager
Defined in File pose_tree_manager.hpp
Base Types
public holoscan::Resource(Class Resource)public holoscan::FragmentService(Class FragmentService)
-
class PoseTreeManager : public holoscan::Resource, public holoscan::FragmentService
Manage a shared PoseTree instance as a FragmentService.
This resource creates and holds a
holoscan::PoseTreeinstance, making it accessible to multiple components (like operators) within the same fragment. It simplifies the management of pose data by providing a centralized, configurable point of access.To use it, register an instance of
PoseTreeManagerwith the fragment:// In Application::compose() auto pose_tree_manager = make_resource<PoseTreeManager>("pose_tree_manager", from_config("my_pose_tree")); register_service(pose_tree_manager);
Then, operators can access the underlying
PoseTreeinstance via theservice()method:// In Operator::initialize() pose_tree_ = service<holoscan::PoseTreeManager>("pose_tree_manager")->tree();
The parameters for the underlying
PoseTreecan be configured via the application’s YAML configuration file or directly when creating the resource.YAML-based configuration:
my_pose_tree: number_frames: 256 number_edges: 4096 history_length: 16384 default_number_edges: 32 default_history_length: 1024 edges_chunk_size: 16 history_chunk_size: 128
Experimental Feature The Pose Tree feature, including this manager, is experimental. The API may change in future releases.
Public Functions
- HOLOSCAN_RESOURCE_FORWARD_ARGS_SUPER (PoseTreeManager, holoscan::Resource) PoseTreeManager()=default
-
virtual std::shared_ptr<Resource> resource() const override
Return a shared pointer to this resource, part of the FragmentService interface.
- Returns
A
std::shared_ptr<Resource>pointing to this instance.
Set the internal weak pointer to this resource, part of the FragmentService interface.
- Parameters
resource – A
std::shared_ptr<Resource>that must point to this instance.
-
virtual void initialize() override
Initialize the resource and creates the underlying
PoseTreeinstance.This method is called by the framework after the resource is created and its parameters have been set. It allocates and initializes the
PoseTreewith the configured capacity parameters.
-
virtual void setup(holoscan::ComponentSpec &spec) override
Define the parameters for configuring the
PoseTreeinstance.This method registers the following parameters:
number_frames: Maximum number of coordinate frames.number_edges: Maximum number of edges (direct transformations) between frames.history_length: Total capacity for storing historical pose data across all edges.default_number_edges: Default number of edges allocated per new frame.default_history_length: Default history capacity allocated per new edge.edges_chunk_size: Allocation chunk size for a frame’s edge list.history_chunk_size: Allocation chunk size for an edge’s history buffer.
- Parameters
spec – The component specification to which the parameters are added.
-
std::shared_ptr<PoseTree> tree()
Get a shared pointer to the managed
PoseTreeinstance.This is the primary method for accessing the pose tree from other components.
- Returns
A
std::shared_ptr<PoseTree>to the underlying pose tree.
-
std::shared_ptr<PoseTree> tree() const
Get a shared pointer to the managed
PoseTreeinstance from a const context.- Returns
A
std::shared_ptr<PoseTree>to the underlying pose tree.