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