Viam C++ SDK current
Loading...
Searching...
No Matches
orientation.hpp
1#pragma once
2
3#include <string>
4#include <vector>
5
6#include <boost/variant/variant.hpp>
7
8#include <viam/sdk/common/proto_convert.hpp>
9#include <viam/sdk/spatialmath/orientation_types.hpp>
10
11namespace viam {
12namespace app {
13namespace v1 {
14
15class Orientation;
16}
17} // namespace app
18} // namespace viam
19
20namespace viam {
21namespace sdk {
22
23// Note that quaternion must be the first type because this is what is default constructed.
24using Orientation = boost::
25 variant<quaternion, axis_angles, orientation_vector, orientation_vector_degrees, euler_angles>;
26
27OrientationType get_type(const Orientation&);
28
29namespace proto_convert_details {
30
31template <>
32struct to_proto_impl<Orientation> {
33 void operator()(const Orientation&, app::v1::Orientation*) const;
34};
35template <>
36struct from_proto_impl<app::v1::Orientation> {
37 Orientation operator()(const app::v1::Orientation*) const;
38};
39
40} // namespace proto_convert_details
41} // namespace sdk
42} // namespace viam