7#include <unordered_map>
10#include <viam/sdk/common/pose.hpp>
11#include <viam/sdk/components/component.hpp>
12#include <viam/sdk/spatialmath/geometry.hpp>
26 using pose_map = std::unordered_map<std::string, pose_in_frame>;
35 inline pose_map
get_poses(
const std::vector<std::string>& body_names) {
45 virtual pose_map
get_poses(
const std::vector<std::string>& body_names,
46 const ProtoStruct& extra) = 0;
51 virtual ProtoStruct
do_command(
const ProtoStruct& command) = 0;
60 virtual std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra) = 0;
63 using Component::Component;
Extends APIType to additionally define a resource's subtype (e.g., camera).
Definition resource_api.hpp:33
Definition component.hpp:10
A PoseTracker represents a physical pose or motion tracking device.
Definition pose_tracker.hpp:24
virtual pose_map get_poses(const std::vector< std::string > &body_names, const ProtoStruct &extra)=0
Get the poses of each body tracked by the pose tracker.
virtual ProtoStruct do_command(const ProtoStruct &command)=0
Send/receive arbitrary commands to the resource.
API api() const override
Returns the API associated with a particular resource.
virtual std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra)=0
Returns GeometryConfigs associated with the calling pose tracker.
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling pose tracker.
Definition pose_tracker.hpp:54
pose_map get_poses(const std::vector< std::string > &body_names)
Get the poses of each body tracked by the pose tracker.
Definition pose_tracker.hpp:35
Definition resource_api.hpp:50