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/api/app/v1/robot.pb.h>
9
10#include <viam/sdk/spatialmath/orientation_types.hpp>
11
12namespace viam {
13namespace sdk {
14
15typedef boost::
16 variant<axis_angles, orientation_vector, orientation_vector_degrees, euler_angles, quaternion>
17 orientation;
18
20 public:
21 viam::app::v1::Orientation to_proto() const;
22 static OrientationConfig from_proto(const viam::app::v1::Orientation& proto);
23 OrientationConfig(OrientationType type_,
24 std::vector<std::uint8_t> value,
25 orientation orientation)
26 : type_(std::move(type_)), value_(std::move(value)), orientation_(std::move(orientation)) {}
27 // Defaults to sentinel no rotation value
29
30 OrientationType get_type() const;
31 const std::vector<std::uint8_t>& get_value() const;
32 const orientation& get_orientation() const;
33
34 private:
35 OrientationType type_;
36 std::vector<std::uint8_t> value_;
37 orientation orientation_;
38};
39
40} // namespace sdk
41} // namespace viam
Definition orientation.hpp:19