9#include <boost/optional/optional.hpp>
12#include <viam/sdk/common/pose.hpp>
13#include <viam/sdk/common/proto_convert.hpp>
14#include <viam/sdk/common/proto_value.hpp>
16#include <viam/sdk/resource/resource_api.hpp>
17#include <viam/sdk/services/service.hpp>
24class FrameSystemConfig;
55 boost::optional<KinematicModel>
model;
75 const std::vector<WorldState::transform>& additional_transforms) = 0;
80 return get_pose(component_name,
"world", {}, {});
88 const std::string& component_name,
89 const std::string& destination_frame,
90 const std::vector<WorldState::transform>& supplemental_transforms) {
91 return get_pose(component_name, destination_frame, supplemental_transforms, {});
100 const std::string& component_name,
101 const std::string& destination_frame,
102 const std::vector<WorldState::transform>& supplemental_transforms,
103 const ProtoStruct& extra) = 0;
109 const std::string& destination) {
119 const std::string& destination,
120 const std::vector<WorldState::transform>& additional_transforms) = 0;
127 virtual std::vector<unsigned char>
transform_pcd(
const std::vector<unsigned char>& pcd,
128 const std::string& source,
129 const std::string& destination) = 0;
144namespace proto_convert_details {
Definition resource_api.hpp:21
The machine's frame system: the tree of reference frames viam-server builds from the frame config of ...
Definition framesystem.hpp:43
std::vector< frame_system_config > get_frame_system_config()
Get the configuration of every frame in the frame system.
Definition framesystem.hpp:68
virtual pose_in_frame get_pose(const std::string &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms, const ProtoStruct &extra)=0
Get the pose of a component in the desired reference frame.
virtual std::vector< frame_system_config > get_frame_system_config(const std::vector< WorldState::transform > &additional_transforms)=0
Get the configuration of every frame in the frame system.
pose_in_frame transform_pose(const pose_in_frame &query, const std::string &destination)
Express a pose in a different reference frame.
Definition framesystem.hpp:108
pose_in_frame get_pose(const std::string &component_name, const std::string &destination_frame, const std::vector< WorldState::transform > &supplemental_transforms)
Get the pose of a component in the desired reference frame.
Definition framesystem.hpp:87
pose_in_frame get_pose(const std::string &component_name)
Get the pose of a component in the world reference frame.
Definition framesystem.hpp:79
virtual std::vector< unsigned char > transform_pcd(const std::vector< unsigned char > &pcd, const std::string &source, const std::string &destination)=0
Express a point cloud in a different reference frame.
static Name public_name()
The full resource name of the machine's frame system. Its short name is kPublicName.
virtual pose_in_frame transform_pose(const pose_in_frame &query, const std::string &destination, const std::vector< WorldState::transform > &additional_transforms)=0
Express a pose in a different reference frame.
API api() const override
Returns the API associated with a particular resource.
static const std::string kPublicName
The reserved name viam-server publishes the machine's frame system under.
Definition framesystem.hpp:61
A name for specific instances of resources.
Definition resource_api.hpp:61
Definition resource.hpp:43
virtual std::string name() const
Return the resource's name.
Definition service.hpp:10
Kinematics data types shared by the components that serve GetKinematics.
Definition resource_api.hpp:46
One frame of the frame system, with the kinematics of the resource it belongs to.
Definition framesystem.hpp:47
ProtoStruct kinematics
The resource's kinematics as a raw file, when served by an older viam-server.
Definition framesystem.hpp:52
boost::optional< KinematicModel > model
The resource's kinematic model, absent for resources without kinematics.
Definition framesystem.hpp:55
Definition proto_convert.hpp:24