Viam C++ SDK
current
Loading...
Searching...
No Matches
src
viam
sdk
common
pose.hpp
1
#pragma once
2
3
#include <viam/sdk/common/proto_convert.hpp>
4
5
#include <ostream>
6
7
namespace
viam {
8
namespace
common {
9
namespace
v1 {
10
11
class
Pose;
12
class
PoseInFrame;
13
}
// namespace v1
14
}
// namespace common
15
}
// namespace viam
16
17
namespace
viam {
18
namespace
sdk {
19
20
struct
coordinates
{
21
double
x, y, z;
22
friend
bool
operator==(
const
coordinates
& lhs,
const
coordinates
& rhs);
23
};
24
25
struct
pose_orientation
{
26
double
o_x, o_y, o_z;
27
friend
bool
operator==(
const
pose_orientation
& lhs,
const
pose_orientation
& rhs);
28
};
29
30
struct
pose
{
31
struct
coordinates
coordinates
;
32
pose_orientation
orientation;
33
double
theta;
34
35
friend
bool
operator==(
const
pose
& lhs,
const
pose
& rhs);
36
friend
std::ostream& operator<<(std::ostream& os,
const
pose
& v);
37
};
38
39
struct
pose_in_frame
{
40
pose_in_frame
(std::string reference_frame_,
struct
pose
pose_)
41
: reference_frame(std::move(reference_frame_)),
pose
(std::move(pose_)) {}
42
pose_in_frame
() {}
43
44
std::string reference_frame;
45
struct
pose
pose
;
46
friend
bool
operator==(
const
pose_in_frame
& lhs,
const
pose_in_frame
& rhs);
47
friend
std::ostream& operator<<(std::ostream& os,
const
pose_in_frame
& v);
48
};
49
50
namespace
proto_convert_details {
51
52
template
<>
53
struct
to_proto_impl
<
pose
> {
54
void
operator()(
const
pose
&, common::v1::Pose*)
const
;
55
};
56
57
template
<>
58
struct
from_proto_impl
<common::v1::Pose> {
59
pose
operator()(
const
common::v1::Pose*)
const
;
60
};
61
62
template
<>
63
struct
to_proto_impl
<
pose_in_frame
> {
64
void
operator()(
const
pose_in_frame
&, common::v1::PoseInFrame*)
const
;
65
};
66
67
template
<>
68
struct
from_proto_impl
<common::v1::PoseInFrame> {
69
pose_in_frame
operator()(
const
common::v1::PoseInFrame*)
const
;
70
};
71
72
}
// namespace proto_convert_details
73
74
}
// namespace sdk
75
}
// namespace viam
viam::sdk::coordinates
Definition
pose.hpp:20
viam::sdk::pose_in_frame
Definition
pose.hpp:39
viam::sdk::pose_orientation
Definition
pose.hpp:25
viam::sdk::pose
Definition
pose.hpp:30
viam::sdk::proto_convert_details::from_proto_impl
Definition
proto_convert.hpp:24
viam::sdk::proto_convert_details::to_proto_impl
Definition
proto_convert.hpp:18
Generated by
1.10.0