8#include <viam/sdk/common/linear_algebra.hpp>
9#include <viam/sdk/common/proto_value.hpp>
10#include <viam/sdk/common/utils.hpp>
11#include <viam/sdk/config/resource.hpp>
12#include <viam/sdk/spatialmath/orientation.hpp>
37 double o_x = 0.0, o_y = 0.0, o_z = 0.0, theta = 0.0;
43 float altitude_m = 0.0f;
49 bool linear_velocity_supported =
false;
50 bool angular_velocity_supported =
false;
51 bool orientation_supported =
false;
52 bool position_supported =
false;
53 bool compass_heading_supported =
false;
54 bool linear_acceleration_supported =
false;
60 inline Vector3 get_linear_velocity() {
61 return get_linear_velocity({});
64 virtual Vector3 get_linear_velocity(
const ProtoStruct& extra) = 0;
66 inline Vector3 get_angular_velocity() {
67 return get_angular_velocity({});
70 virtual Vector3 get_angular_velocity(
const ProtoStruct& extra) = 0;
72 inline compassheading get_compass_heading() {
73 return get_compass_heading({});
76 virtual compassheading get_compass_heading(
const ProtoStruct& extra) = 0;
78 inline orientation get_orientation() {
79 return get_orientation({});
82 virtual orientation get_orientation(
const ProtoStruct& extra) = 0;
85 return get_position({});
88 virtual position get_position(
const ProtoStruct& extra) = 0;
90 inline properties get_properties() {
91 return get_properties({});
94 virtual properties get_properties(
const ProtoStruct& extra) = 0;
96 inline std::unordered_map<std::string, float> get_accuracy() {
97 return get_accuracy({});
100 virtual std::unordered_map<std::string, float> get_accuracy(
const ProtoStruct& extra) = 0;
102 inline Vector3 get_linear_acceleration() {
103 return get_linear_acceleration({});
106 virtual Vector3 get_linear_acceleration(
const ProtoStruct& extra) = 0;
111 virtual ProtoStruct
do_command(
const ProtoStruct& command) = 0;
126 virtual std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra) = 0;
Definition resource_api.hpp:21
Definition component.hpp:10
Definition movement_sensor.hpp:24
virtual ProtoStruct get_status()=0
Get the status of the movement sensor.
API api() const override
Returns the API associated with a particular resource.
virtual ProtoStruct do_command(const ProtoStruct &command)=0
Send/receive arbitrary commands to the resource.
virtual std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra)=0
Returns GeometryConfigs associated with the calling movementsensor.
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling movementsensor.
Definition movement_sensor.hpp:119
Definition resource.hpp:42
virtual std::string name() const
Return the resource's name.
Current position of the motor relative to its home.
Definition resource_api.hpp:46
Definition movement_sensor.hpp:27
double value
A number from 0-359 where 0 is North, 90 is East, 180 is South, and 270 is West.
Definition movement_sensor.hpp:29
Struct version of viam::common::v1::Orientation. TODO: we already have this in orientation_types....
Definition movement_sensor.hpp:36
Definition movement_sensor.hpp:41
Definition movement_sensor.hpp:48
Definition linear_algebra.hpp:25
Definition geometry.hpp:89