Viam C++ SDK current
Loading...
Searching...
No Matches
framesystem_client.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include <viam/api/robot/v1/robot.grpc.pb.h>
7
8#include <viam/sdk/rpc/dial.hpp>
10
11namespace viam {
12namespace sdk {
13namespace impl {
14
19 public:
21 FrameSystemClient(std::string name, const ViamChannel& channel);
22
23 const ViamChannel& channel() const {
24 return *channel_;
25 }
26
27 std::vector<frame_system_config> get_frame_system_config(
28 const std::vector<WorldState::transform>& additional_transforms) override;
29 pose_in_frame get_pose(const std::string& component_name,
30 const std::string& destination_frame,
31 const std::vector<WorldState::transform>& supplemental_transforms,
32 const ProtoStruct& extra) override;
34 const pose_in_frame& query,
35 const std::string& destination,
36 const std::vector<WorldState::transform>& additional_transforms) override;
37 std::vector<unsigned char> transform_pcd(const std::vector<unsigned char>& pcd,
38 const std::string& source,
39 const std::string& destination) override;
40
41 private:
42 // There is no FrameSystemService in the API yet: the frame system RPCs live on RobotService,
43 // which is also why this service has a client but no server to register. This alias is the one
44 // place that names RobotService, so when a dedicated stub lands only this line and the
45 // constructor change.
46 using StubType = viam::robot::v1::RobotService::StubInterface;
47 std::unique_ptr<StubType> stub_;
48 const ViamChannel* channel_;
49};
50
51} // namespace impl
52} // namespace sdk
53} // namespace viam
The machine's frame system: the tree of reference frames viam-server builds from the frame config of ...
Definition framesystem.hpp:40
virtual std::string name() const
Return the resource's name.
Definition dial.hpp:25
gRPC client implementation of a FrameSystem service.
Definition framesystem_client.hpp:18
std::vector< unsigned char > transform_pcd(const std::vector< unsigned char > &pcd, const std::string &source, const std::string &destination) override
Express a point cloud in a different reference frame.
pose_in_frame transform_pose(const pose_in_frame &query, const std::string &destination, const std::vector< WorldState::transform > &additional_transforms) override
Express a pose in a different reference frame.
std::vector< frame_system_config > get_frame_system_config(const std::vector< WorldState::transform > &additional_transforms) override
Get the configuration of every frame in the frame system.
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) override
Get the pose of a component in the desired reference frame.
Defines the FrameSystem service.
Definition pose.hpp:39