Viam C++ SDK current
Loading...
Searching...
No Matches
pose.hpp
1#pragma once
2
3#include <common/v1/common.pb.h>
4
5namespace viam {
6namespace sdk {
7
8struct coordinates {
9 double x, y, z;
10 friend bool operator==(const coordinates& lhs, const coordinates& rhs);
11};
12
14 double o_x, o_y, o_z;
15 friend bool operator==(const pose_orientation& lhs, const pose_orientation& rhs);
16};
17
18struct pose {
20 pose_orientation orientation;
21 double theta;
22
23 static pose from_proto(const viam::common::v1::Pose& proto);
24 viam::common::v1::Pose to_proto() const;
25
26 friend bool operator==(const pose& lhs, const pose& rhs);
27 friend std::ostream& operator<<(std::ostream& os, const pose& v);
28};
29
31 viam::common::v1::PoseInFrame to_proto() const;
32 static pose_in_frame from_proto(const viam::common::v1::PoseInFrame& proto);
33 pose_in_frame(std::string reference_frame_, struct pose pose_)
34 : reference_frame(std::move(reference_frame_)), pose(std::move(pose_)) {}
35 pose_in_frame() {}
36
37 std::string reference_frame;
38 struct pose pose;
39 friend bool operator==(const pose_in_frame& lhs, const pose_in_frame& rhs);
40 friend std::ostream& operator<<(std::ostream& os, const pose_in_frame& v);
41};
42
43} // namespace sdk
44} // namespace viam
Definition pose.hpp:8
Definition pose.hpp:30
Definition pose.hpp:13
Definition pose.hpp:18